feat(web): library homepage, chain in settings

Implements the §9.7 shell rulings (issue #173): "/" renders the library
and the board route is gone — every former board target (Esc, cleared
search, detail parent routes, the not-found fallback) lands on the
library. The signal chain moves into /settings as its first section,
lamps still driven by the health poll; the master lamp stays on the
rail. The wordmark is now a real anchor that navigates home.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Miguel Palhas
2026-08-24 16:39:07 +01:00
co-authored by Claude Fable 5
parent 60642d8709
commit 7ef24088a5
5 changed files with 143 additions and 173 deletions
+4 -5
View File
@@ -226,7 +226,7 @@ interface SettingsView {
open: () => void;
}
export function settingsMain(board: HTMLElement, views: { hide: () => void }[]): SettingsView {
export function settingsMain(views: { hide: () => void }[], goHome: () => void): SettingsView {
const view = must<HTMLElement>("#settings");
const deck = must<HTMLElement>("#deck");
const nav = must<HTMLButtonElement>("#nav-settings");
@@ -705,7 +705,6 @@ export function settingsMain(board: HTMLElement, views: { hide: () => void }[]):
for (const sibling of views) {
sibling.hide();
}
board.hidden = true;
deck.hidden = true;
view.hidden = false;
nav.setAttribute("aria-pressed", "true");
@@ -720,7 +719,7 @@ export function settingsMain(board: HTMLElement, views: { hide: () => void }[]):
function close() {
hide();
board.hidden = false;
goHome();
nav.focus();
}
@@ -729,7 +728,7 @@ export function settingsMain(board: HTMLElement, views: { hide: () => void }[]):
navigate({ kind: "settings" });
open();
} else {
navigate({ kind: "board" });
navigate({ kind: "library" });
close();
}
});
@@ -748,7 +747,7 @@ export function settingsMain(board: HTMLElement, views: { hide: () => void }[]):
(event) => {
if (event.key === "Escape" && !view.hidden) {
event.stopImmediatePropagation();
navigate({ kind: "board" });
navigate({ kind: "library" });
close();
}
},