feat(content): update installed content atomically

This commit is contained in:
objz committed 2026-08-04 23:57:49 +02:00
1 parent aa03dac34d
commit bbf0317775
14 files changed
+877 -101

No files matched your search

+2
View File
@@ -92,6 +92,8 @@ impl UiHarness {
pending_editor: None,
reconciliation_for: None,
content_manifest: None,
content_update_snapshot: None,
content_update_popup: None,
provider_conflict: None,
dismissed_provider_conflicts: HashSet::new(),
};
@@ -735,6 +735,7 @@ fn dependency_resolution_opens_the_existing_confirmation() {
cleanup_eligible: false,
replacement: false,
}],
root_count: 1,
optional_dependencies: 0,
}),
},
+5 -11
View File
@@ -633,13 +633,12 @@ fn provider_metadata_fills_a_missing_installed_description() {
project_id: "shader-project".to_owned(),
bytes: Vec::new(),
description: "A cached shader description".to_owned(),
update_available: true,
});
assert!(state.drain_provider_icons());
assert_eq!(state.entries[0].description, "A cached shader description");
assert!(state.entries[0].provider_description);
assert_eq!(state.entries[0].title_suffix.as_deref(), Some("Update"));
assert_eq!(state.entries[0].title_suffix, None);
}
#[tokio::test]
@@ -682,16 +681,11 @@ async fn provider_metadata_loads_from_cache_without_network() {
project_id: "cached-project".to_owned(),
version_id: "cached-version".to_owned(),
};
let (bytes, description, update_available) = load_provider_metadata(
&crate::net::HttpClient::new(),
temp.path(),
&installed,
None,
)
.await
.unwrap();
let (bytes, description) =
load_provider_metadata(&crate::net::HttpClient::new(), temp.path(), &installed)
.await
.unwrap();
assert_eq!(bytes, png);
assert_eq!(description, "Cached description");
assert!(!update_available);
}