Code reference detail
GraphKeyPanel.svelte
packages/extension/webviews/ideas-summary/components/GraphKeyPanel.svelte
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| 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 | ||
| key_panel_toggle | the key panel should be able to toggle inclusion / visibility of the different node types. Node-type rows in ["../../../../packages/extension/webviews/ideas-summary/components/GraphKeyPanel.svelte"] are toggle buttons; hidden types render dimmed with a struck-through label. Toggleable types are block, one-liner, ideaset, focused idea, and external file — GraphNodeTypeId in ["../../../../packages/extension/webviews/shared/graph/graph-theme.ts"], classified per node by graphNodeTypeId ( same priority as node fill colour ). Linked file ideaset nodes ( `isFileIdeaset` ) classify as ideaset for Key toggles; file compound containers are legend-only ( " File group " ) and follow member visibility like other compounds. GraphView tracks hidden types and calls GraphCyController. setHiddenNodeTypes in ["../../../../packages/extension/webviews/shared/graph/graph-cy-controller.ts"], which flags matching nodes with data typeHidden; a display: none stylesheet rule in ["../../../../packages/extension/webviews/shared/graph/graph-cytoscape.ts"] hides them, and cytoscape hides edges whose endpoint is hidden. Compound containers whose members are all hidden are hidden too. Hiding is client-side visibility only: the slice still contains the nodes, node / edge counts are unchanged, and flags reapply after every slice sync. Key open state and hidden node types persist per [graph_ui_persistence]. | 0.067 | ||
| ui_controls | Controls live in ["../../../../packages/extension/webviews/ideas-summary/components/GraphControls.svelte"] and dispatch events to GraphView. [manual_reframe] — " Fit to view " calls GraphCyController. reframeToViewport per [reframe_view]. [auto_reframe] and [reframe_animation] are handled by the shared controller; no extra UI beyond pan / zoom / drag. Labels control cycles [graph_label_modes] ( auto / on / off ) and applies [graph_label_auto] via GraphCyController. setLabelMode. Files dropdown ( [file_treatment_toggle] ) uses ["../../../../packages/extension/webviews/ideas-summary/components/FileTreatmentSelect.svelte"] with Hidden / Compound / Linked options and info tooltips; selection patches `fileTreatment` in [graph_ui_persistence]. Status and tag filters are multi-select dropdowns per [graph_status_tag_filters]. The Key button toggles a draggable legend panel in ["../../../../packages/extension/webviews/ideas-summary/components/GraphKeyPanel.svelte"] over the graph canvas. The Controls button toggles [control_panel]. Overlay panels ( Key and Controls ) are siblings of the cytoscape mount inside a graph-surface-wrap — never children of the cy container — so native form controls receive pointer events. | 0.167 |
Reference labels
"../../../../packages/extension/webviews/ideas-summary/components/GraphKeyPanel.svelte", ../../../../packages/extension/webviews/ideas-summary/components/GraphKeyPanel.svelte