From ef7076882f64ffcfe5f50b7516d7f1b9c1a76f24 Mon Sep 17 00:00:00 2001 From: malibio Date: Sat, 26 Sep 2026 08:29:04 +0200 Subject: [PATCH 1/2] Route the restored database at startup before mounting the workspace (closes #3058) load() now awaits set_active_database for the restored selection before committing it, so a remembered or tray-picked non-default database is the gRPC routing target too, not only the window pin and switcher. When that database is not the daemon default, the sidebar stores' unrouted boot loads are evicted and reloaded via the helper switchTo now shares. The workspace panes mount only once a database is selected, so restored tabs never read from the default first. Co-Authored-By: Claude Opus 5.5 (1M context) --- .../lib/components/layout/app-shell.svelte | 9 +- .../src/lib/stores/database.svelte.ts | 141 +++++++++++------- .../src/tests/stores/database.test.ts | 93 ++++++++++++ 3 files changed, 185 insertions(+), 58 deletions(-) diff --git a/packages/desktop-app/src/lib/components/layout/app-shell.svelte b/packages/desktop-app/src/lib/components/layout/app-shell.svelte index 9d83b8b7c..5e0317268 100644 --- a/packages/desktop-app/src/lib/components/layout/app-shell.svelte +++ b/packages/desktop-app/src/lib/components/layout/app-shell.svelte @@ -667,8 +667,13 @@
- - + + {#if databaseStore.activeDatabaseId !== null} + + {/if}