Idea detail
webview_app_state
reqlan rq/codestyle/typescript.rq:42
Summary
Complex webviews ( activity bar, Ideas Summary ) own a single `AppState` class in `state/app.svelte.ts`.
Fields that drive UI are Svelte 5 `$state` properties on that class; side effects and host I / O are methods.
Export one module singleton ( `export const app = new AppState()` ) and inject it via svelte_app_context.
Do not use `svelte/store` writable / readable stores for new UI, and do not put zustand inside webview code
( zustand_boundary ).
Simple panels ( export form, onboarding, index diagnostics ) may keep `$state` on the root `App.svelte`
instead of a separate AppState module when the surface is a single form / flow.
Related: table_column_filters `$derived` binding rule;
graph_ui_persistence.
Navigation
Attributes
| Key | Value |
|---|---|
| apply_to | *.rq".*_pane, *.rq".*, webview |
| implementation | app.svelte.ts, app.svelte.ts, App.svelte, App.svelte, App.svelte |
| status | done |
| tests | graph-ui-state.test.ts |
Ancestor context
No ancestor chain recorded.
Outbound references
Inbound references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | ui_state_management | reqlan rq/codestyle/typescript.rq | webview_app_state |
| references | persistence_tiers | reqlan rq/codestyle/typescript.rq | webview_app_state |
| references | webview | reqlan rq/extension/presentation/webview.rq | webview_app_state |
Unresolved references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| wildcard_reference | reqlan rq/extension/local-context/activitybar-panels/*.rq.*_pane | *.rq".*_pane | |
| wildcard_reference | reqlan rq/extension/workspace-summary/ideas_summary/*.rq.* | *.rq".* |
Local graph
Initialising graph…