Code reference detail
vscode.ts
packages/extension/webviews/ideas-summary/lib/vscode.ts
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| persistence_tiers | done | 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]. | 0.050 | |
| postmessage_clone_safety | done | Before `postMessage` from a Svelte webview, JSON-clone payloads ( `JSON.parse(JSON.stringify(...))` ) so `$state` proxies remain structured-clone safe. Shared helpers live in each webview's `lib/vscode.ts`. | 0.040 | |
| scope | TypeScript package standards for `packages/extension` ( npm `reqlan-extension` ), especially UI state. Complements [development_core.rust_mindset] and [extension_architecture.state_machine_mindset]. Webview inventory: [webview_doc.webview]. Package role: [core_architecture.extension_package]. | 0.040 | ||
| graph_loading | the extension pushes graphSlice when the index is ready — no empty waitingForIndex wedge. ["../../../../packages/extension/src/ideas_summary_module/ideas-summary-panel.ts"] sets graphSlicePending on loadGraph and delivers the slice when the index becomes ready ( including via index status updates ). Index status posts must not await graph slice builds, so sync progress keeps updating the Index tab. webview state in ["../../../../packages/extension/webviews/ideas-summary/state/app.svelte.ts"] is query, slice, loading, rendering, and error only. App. init attaches the window message listener during App. svelte script setup ( before child onMount ) so loadGraph replies are never dropped. GraphView marks a slice as synced only in onRendered ( after cytoscape flush + layout ), not before syncSlice is queued. Webview → extension posts go through ["../../../../packages/extension/webviews/ideas-summary/lib/vscode.ts"] which JSON-clones payloads so Svelte $ state proxies are structured-clone safe. GraphView remount reuses app. graph. slice when present; it only loadGraphs when there is no slice and nothing in flight, or force-retries after an error. GraphView mounts only while the graph tab is active ( see TabPanels ); per [graph_cy_controller] do not keep cytoscape alive under display: none. | 0.045 | ||
| graphical_graph | There should be a tab that renders requirement ideas and references as a force-directed web. The graph tab lives in the Ideas Summary webview per [ideas_summary]. UI is implemented in ["../../../../packages/extension/webviews/ideas-summary/components/GraphView.svelte"]. Graph slices are built in ["../../../../packages/analytical/src/index-store/webview-graph-queries.ts"] and served by ["../../../../packages/extension/src/ideas_summary_module/ideas-summary-panel.ts"]. By default the view focuses on the active editor file's first idea; without a focus it shows a capped slice of matching ideas rather than dumping the full graph. Users can filter by search text, path, multi-select @ status, and multi-select tags per [graph_status_tag_filters]. An " Indirect references " toggle expands neighbourhood depth from 1 to 2 hops. A " Wildcard refs " toggle includes or hides edges expanded from path + idea wildcards per [wildcard_refs_toggle] ["@/reqlan rq/language/imports.rq".wildcard_references] A " Files " dropdown selects hosting- `.rq` treatment per [file_treatment_toggle] ( hidden / compound containers / linked ideaset nodes ), with per-option info tooltips. Interactive graph controls that also exist on HTML export must stay aligned per [webview_export_graph_parity]. Clicking a node opens its source; double-click or " Focus graph " recenters the slice on that idea. Linked file ideaset nodes and file-compound titles open the hosting `.rq` file per [file_treatment_toggle]. External file references render as dashed edges to file nodes; wildcard-fan-out edges render dotted. A toggleable key explains node colours and edge styles and toggles node-type visibility per [key_panel_toggle]; a toggleable [control_panel] exposes layout, physics, and node-budget settings. Key and Controls state persist per workspace via [graph_ui_persistence]. Pan, zoom, and drag repositioning per [view_controls]. [manual_reframe] via " Fit to view " in [ui_controls]; [auto_reframe] when the loaded node set changes; [reframe_animation] for smooth transitions after the first paint. Node text labels per [graph_labels], [graph_label_modes], and [graph_label_auto]. Layout, compound grouping, and live physics behaviour per [layout_physics], [layout_options], [physics_options], and [compound_graph]. Cytoscape lifecycle and threading constraints per [graph_cy_controller] and [webview_threading]. | 0.207 |
Reference labels
"../../../../packages/extension/webviews/ideas-summary/lib/vscode.ts", "../../packages/extension/webviews/ideas-summary/lib/vscode.ts", ../../../../packages/extension/webviews/ideas-summary/lib/vscode.ts, ../../packages/extension/webviews/ideas-summary/lib/vscode.ts