Marketplace: item diff, manager, refresh and update detection

Adds diff::item_diff (similar), MarketplaceManager with snapshots,
persisted sync reports, the gh-login slot and a repo lock held across
fetches (pre-flight F11a), refresh_marketplace, load_cached_snapshot,
compute_updates, pins_by_marketplace, head_for, and the GitFixture test
helper on top of git::test_support (F3). AppState gains marketplace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-27 09:17:17 -07:00
co-authored by Claude Opus 5.5
parent 51490a534e
commit 9a1833d792
6 changed files with 859 additions and 1 deletions
+9
View File
@@ -49,6 +49,7 @@ pub struct AppState {
/// preview is not actually binding on what gets applied.
pub pending_settings_import:
Arc<tokio::sync::Mutex<Option<commands::settings_export_commands::PendingSettingsImport>>>,
pub marketplace: Arc<marketplace::MarketplaceManager>,
}
// ─────────────────────────────────────────────────────────────────────────────
@@ -225,6 +226,13 @@ pub fn run() {
let exec_manager = Arc::new(ExecSessionManager::new());
let auth_bridge = Arc::new(AuthBridgeManager::new());
let lifecycle = Arc::new(Lifecycle::new());
let marketplace = Arc::new(marketplace::MarketplaceManager::new(
dirs::data_dir()
.map(|d| d.join("triple-c"))
.unwrap_or_else(|| std::env::temp_dir().join("triple-c")),
));
let marketplace_setup = marketplace.clone();
let _ = &marketplace_setup;
// Clone Arcs for the setup closure (web terminal auto-start)
let projects_store_setup = projects_store.clone();
@@ -243,6 +251,7 @@ pub fn run() {
web_terminal_server: Arc::new(tokio::sync::Mutex::new(None)),
lifecycle,
pending_settings_import: Arc::new(tokio::sync::Mutex::new(None)),
marketplace,
})
.manage(file_viewer::registry::ViewerRegistry::default())
.setup(move |app| {