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
Startup database restore pins the window but never sets the gRPC routing database #3058
On launch, databaseStore.load() (packages/desktop-app/src/lib/stores/database.svelte.ts) picks a database: the tray-requested one, then the remembered one, then the daemon default. It calls pin_window_database and activateProSync with that id, but never set_active_database. The only set_active_database call is in switchTo(), and nothing on the Rust side sets it at startup either.
So when the restored database is not the daemon default (a remembered selection, or a tray pick), the window pin and the switcher show database X, while GrpcClient.active_database_id stays None. Node, import, embeddings, agent-session and local-agent requests go out with no x-ns-database-id header and reach the daemon's default database. The node-event watcher also watches the default database. This lasts until the user switches databases by hand.
Repro
Register two databases, A (default) and B.
Switch to B, then quit and relaunch.
The switcher shows B, but reads and writes go to A.
Suggested fix
Have load() also invoke set_active_database(resolved), or merge "pin window" and "set routing database" into one command so the two can't drift apart.
Found while reviewing PR #3056. Import progress still arrives in this state, because an unrouted (None) event goes to the focused window.
Activity
Address review: document None routing for import progress and test it
Route import-progress events to the window showing the import's datab…
malibio commentedon Sep 26, 2026
Frontend: 5355 passed (273 files)