Printable idea sheet
persistence_tiers
reqlan rq/codestyle/typescript.rq:125
Katz 0.050
Three persistence tiers — pick the shallowest that matches lifetime:
1. `acquireVsCodeApi().getState` / `setState` — ephemeral webview session ( pane expand / heights, active tab ).
2. `ExtensionContext.workspaceState` — durable UI prefs shared across reloads ( graph / table UI keys under
`reqlan.ideasSummary.*`, optionally per-base ). Normalize + default on read
( `normalizeGraphUiState` / table defaults ); never trust raw JSON shape.
3. `ExtensionContext.globalState` — install / user-level flags ( e. g. onboarding ), not pane view-models.
Debounce persist posts ( ~ 200 – 250 ms ) when UI controls churn. Related: webview_app_state.
- apply_to
- *.rq".*ui*, *.rq".graph_*
- implementation
- graph-ui-state.ts, table-ui-state.ts, onboarding-state.ts, vscode.ts, vscode.ts
- status
- done
Interactive page: persistence_tiers