Idea detail
ui_state_management
reqlan rq/codestyle/typescript.rq:18
block
done
Summary
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.
Navigation
Attributes
| Key | Value |
|---|---|
| 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 |
Ancestor context
No ancestor chain recorded.
Outbound references
Inbound references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | extension_package | reqlan rq/core-architecture.rq | ui_state_management |
| references | state_machine_mindset | reqlan rq/extension/host/architecture.rq | ui_state_management |
| references | webview | reqlan rq/extension/presentation/webview.rq | ui_state_management |
Unresolved references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| wildcard_reference | reqlan rq/extension/local-context/activitybar-panels/*.rq.*_pane | *.rq".*_pane | |
| wildcard_reference | reqlan rq/extension/**/*.rq.*webview* | *.rq".*webview* | |
| wildcard_reference | reqlan rq/extension/presentation/graph.rq.graph_* | graph.rq".graph_* |
Local graph
Initialising graph…