Printable idea sheet
ui_state_management
reqlan rq/codestyle/typescript.rq:18
Katz 0.080
Extension UI state is explicit, typed, and layered — not a single global store shared across host and webview.
Choose the layer by lifetime and owner:
- Host session / durable prefs live in the extension process ( `ExtensionContext`, plain modules ).
- Webview view-models live in Svelte 5 runes ( `$state` / `$derived` / `$effect` ).
- Cross-boundary traffic uses typed `postMessage` contracts only.
Prefer small state machines ( named phases, request ids, clear transitions ) over ad-hoc flags.
Related: webview_app_state, persistence_tiers, zustand_boundary, host_webview_ownership.
- apply_to
- *.rq".*_pane, *.rq".*webview*, graph.rq".graph_*
- implementation
- app.svelte.ts, app.svelte.ts, graph-ui-state.ts, table-ui-state.ts, context-session.ts
- status
- done
Interactive page: ui_state_management