SSE reconnect, task switcher state/inbox/new task, stream throttle

This commit is contained in:
Ian Gulliver
2026-10-14 22:28:25 -07:00
parent 8e4c40eb5f
commit 33e682a9d5
27 changed files with 418 additions and 182 deletions
+14
View File
@@ -19,6 +19,15 @@ const views: Record<View, { label: string; mount: (root: HTMLElement) => () => v
const order: View[] = ["transcript", "changes", "tasks", "inbox", "admin", "settings"];
const panes: Pane[] = [];
export function openTranscript(): void {
if (panes.some((p) => p.current() === "transcript")) {
return;
}
(panes.find((p) => p.current() !== "tasks") ?? panes[0])?.show("transcript");
}
export class Pane {
readonly el: HTMLElement;
private readonly tabs: HTMLElement;
@@ -34,6 +43,11 @@ export class Pane {
const saved = localStorage.getItem(this.storageKey()) as View | null;
this.view = saved && saved in views ? saved : fallback;
this.show(this.view);
panes.push(this);
}
current(): View {
return this.view;
}
show(view: View): void {