fix(ui): companion rail loads current space on initial page load

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
root
2026-06-01 19:39:18 +10:00
parent f49282b00c
commit 15d45a8fd6
2 changed files with 16 additions and 13 deletions

View File

@@ -35,6 +35,10 @@ async function renderView(ctx) {
} else {
state.view = null;
}
// Notify subscribers (right rail) of the active Space. The state bus replays
// the last value on subscribe, so this covers both the initial route() call
// and every subsequent navigation with one path.
emit('space-active', state.spaceId);
const main = document.getElementById('main');
const loader = VIEWS[ctx.name] || VIEWS.home;