You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Conflicts store loads from the default database at startup and is not reloaded on database switch #3067
app-shell.svelte's loadConflicts() calls conflictsStore.load() (list_conflicts, a routed command) in onMount, alongside databaseStore.load(). When the restored database is not the daemon default, that call goes out before routing is set, so the startup "N unresolved conflicts" notice and the cached conflictsStore.records reflect the default database's journal.
A database switch has the same gap: switchTo / evictAndReloadActiveDatabase never reloads conflictsStore, so its records keep describing the previous database until the Conflicts view is opened (which reloads).
conflictsStore.load() has no generation guard, so calling it again on a switch is not enough on its own: a stale in-flight load can resolve after the reload and overwrite it.
Suggested fix
Add a generation guard to conflictsStore.load() plus an invalidateForDatabaseSwitch(), matching the collections/schemas/ai-chats stores.
Call invalidate + load from databaseStore.evictAndReloadActiveDatabase().
Start the startup conflicts notice only after databaseStore has a selection, so its count describes the routed database.
Acceptance Criteria
After launching into a non-default database, the startup conflicts notice counts that database's open conflicts
After a database switch, conflictsStore.records describes the new database
A conflicts load issued before a switch cannot overwrite the post-switch records
Activity
Address review: skip startup routing while a tray switch is in flight
Route the restored database at startup before mounting the workspace (c…
malibio commentedon Sep 26, 2026
Frontend baseline: 5366 passed, 1 failed (architecture-benchmarks perf threshold, known load-flaky)