Code reference detail
sqlite-store.ts
packages/analytical/src/index-store/sqlite-store.ts
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| file_search | done | Rank indexed `.rq` files and comment-bearing code files by basename, stem, and path using the same separator-insensitive matching as [fuzzy_search] / [fuzzy_search_whitespace]. Hits use kind `file`; id is the indexed file URI; name is the basename; line start is 0. Empty query does not dump the file catalog. Mixed into [fuzzy_search] so one list ranks ideas and files together. Code files are those persisted by ["../indexer/indexer.rq".index_code_files]. Surfaces: native `fuzzy_search` via [native_workspace_index], ["../extension/local-context/activitybar-panels/search.rq".search_pane_file_hits]. ["../cli/click.rq".click_input] uses this mix when click has no exact match. | 0.244 | |
| search | Search over the requirement graph — find ideas by name, body, tags, and related signals. Surfaces: [fuzzy_search], [file_search], [contextual_search], [semantic_search], [katz_search]. Consumed by CLI `reqlan search`, MCP / chat tools, Ideas Summary, and the activity-bar search pane. Rust ranking engine: ["./rust_port.rq".search_rust]. | 0.046 | ||
| extension_startup_reliability | done | Reqlan startup must make the activity-bar shell and contributed commands available before optional indexing, parser construction, database initialization, or language-client startup can monopolize the extension host. The implementation contract is [first_paint_contract], [webview_claim_race], [deferred_startup_sequence], [lazy_runtime_dependencies], and [development_bundle_freshness]. Operational diagnosis follows [startup_diagnostics]. [activation.activation_sequence] [activitybar.loading_state] [indexer.nonblocking_index] [build.extension_bundle] | 0.046 | |
| lazy_runtime_dependencies | done | Base discovery must be cheap: - Constructing `WorkspaceIndex` does not construct Langium / Chevrotain services; index sync uses the core native engine ( rusqlite ). - The host-matching `reqlan_napi` `.node` is required at activate; there is no sql. js vendor bundle in the extension host. - Export / physics source is generated at build time rather than read via extension-runtime URLs. ["../../../packages/analytical/src/index-store/workspace-index.ts"] ["../../../packages/analytical/src/index-store/sqlite-store.ts"] ["../../../packages/analytical/src/index-store/index-diagnostics-store.ts"] ["../../../packages/extension/esbuild.mjs"] | 0.046 | |
| git_dates_background_indexing | done | Host wiring for [git_idea_timeline_analysis] / [indexer.git_dates]: after the ideas index is ready ( and when the catalog updates ), missing idea git dates must be filled by a mostly silent background process: - small batches - yields between batches so the extension host stays interactive - no progress UI / no blocking of Activity Bar context load or Timeline tab open - session-scoped attempted set so failed lookups are not hammered repeatedly - queue priority: ideas in the active `.rq` editor file are attempted before the global backlog; switching the active editor re-prioritises ( in-flight wave may stop and reschedule ) - catalog / save scheduling follows [git_dates_rate_cap] - git / node helper processes stay hidden per ["../../core_analysis/core.rq".consumption_silence] Consumers only read indexed columns; they must not invoke `git_dates` on the UI path. [git_idea_timeline_analysis] [indexer.git_dates] [git_dates_rate_cap] [ideas_summary_webview.timeline_page] | 0.158 | |
| git_idea_timeline_analysis | done | Idea creation and last-modified dates, plus change count, are derived from git history by the `git_dates` analyser and stored on the ideas index ( `git_created_at` / `git_modified_at` / `git_change_count` ). Calculation is owned by [git_dates_background_indexing] / [indexer.git_dates] — not by on-the-fly editor, Activity Bar focus, Timeline open, or Ideas table load. Active-editor queue priority for fill-in is specified on [git_dates_background_indexing]. Implemented by ["../../../crates/reqlan-index/src/git_dates.rs"] and ["../../../packages/analytical/src/index-store/sqlite-store.ts"]. [git_dates_background_indexing] [git_dates_rate_cap] [indexer.git_dates] [ideas_summary_webview.ideas_list] | 0.091 | |
| complementary_information_rendering | The extension should render computed information inline in the editor as complementary text. Complementary rendering should include resolved references and optionally indirect references behind a toggle. Complementary rendering should not mutate source files unless the user explicitly applies a change. | 0.040 | ||
| file_inbound_code_lens | done | The editor shows inbound file references in a ["../vsc-primitives.rq".codelens] at the top of the file. The CodeLens uses the same `@referenced-by: (name, …)` list form as idea inlay hints ( [view_references_as_inlay_hints] ). Idea declarations keep `@referenced-by` for idea-to-idea inbound. The file CodeLens lists ideas that point at this file with a ["../../../reference_types.rq".file_reference] ( path-only and path-with-symbol ). Click the CodeLens to open the inbound referencers summary for this file. Hide the CodeLens when the file has no inbound file references. Read referencers from the SQLite inbound snapshot ( ["../../../indexer/cache-reuse.rq".unify_inbound_indexes] ). Show the CodeLens when that snapshot arrives ( ["../support/open-file-sequencing.rq".lazy_features_after_outbound] ). Do not scan Langium IndexManager. The file CodeLens is independent of the outbound classification toggle on [code_lens_reference_types]. Applies to `.rq` files and to other indexed files that ideas reference. Implemented by ["../../../../packages/language/src/reqlan-code-lens-provider.ts"], ["../../../../packages/language/src/reqlan-file-inbound-code-lens.ts"], ["../../../../packages/language/src/reqlan-inbound-snapshot.ts"], ["../../../../packages/analytical/src/core/inbound-file-referencers.ts"], ["../../../../packages/analytical/src/index-store/sqlite-store.ts"], ["../../../../packages/extension/src/extension/inbound-file-snapshot.ts"], ["../../../../packages/extension/src/extension/register-inbound-sqlite-sync.ts"], ["../../../../packages/extension/src/extension/register-file-inbound-code-lens.ts"], ["../../../../packages/extension/src/ideas_summary_module/register-webview.ts"], and ["../../../../packages/language/src/reqlan-inlay-hint-settings.ts"]. [view_references_as_inlay_hints] [code_lens_reference_types] [inbound_inlay_index_performance] | 0.120 | |
| todo_pane | done | Workspace todo list in the activity bar — ideas that carry the `@todo` special attribute ( [ai_support.special_attributes] ), not ideas whose `@status` happens to be `todo`. Complements the planned Overview todos rollup in [ideas_summary_doc.overview_page]; this pane stays open for quick triage beside the editor. Layout matches [search_panel.search_pane_layout]: flat list in the pane body, not a nested boxed subsection. - List ideas in the active base where the `todo` attribute is present ( bare `@todo` / flag, or `@todo` with a note ). - Each row: idea name, source path, and the todo note when present ( omit empty / bare-true values ). - Click opens the idea in the editor ( same navigation as [search_panel.search_pane_results] ). - Results fill the pane body ( 100 % width ) and scroll inside the pane; do not nest a second capped NestedSection scroll. - List capped ( default ~ 40 ) with a “ showing N of M ” meta line when truncated; do not dump unbounded index results into the pane. - Soft-wait when the index is not ready; scoped errors stay in the pane. - Pane header **Refresh** reloads the list; also reload on index health / sync completion for the active base. - Optional affordance to create a stub via [commands.pallete_function_create_todo] when that command ships — do not block the list on it. Host query + wire: [activity_bar_webview] / [activity_bar_data] / [activity_bar_messages] / [app_state]; store query [sqlite_store]. Implemented by [TodoPane] under [CollapsiblePane]; same scroll / fill pattern as [SearchPane]. | 0.046 | |
| graph_design | The graph should show nodes for ideas and files and edges for references. Used by Ideas Summary, activity-bar minigraph, and export previews. | 0.040 | ||
| graph_status_tag_filters | done | Status and tag graph filters are searchable checkbox dropdowns ( still a dropdown trigger; multi-select via checkboxes; OR within each field ). They must distinguish attribute absence from an empty declaration and from a literal unspecified value: - Not present — attribute key absent ( no `@status` / no `@tags` ) - Empty — attribute declared with no value ( `@status`, `@tags`, `@status ""`, bare flag ) - unspecified — literal authored value " unspecified " Do not invent unspecified for missing attributes in rollups, clusters, or filter options. Special options render differently from concrete values ( italic muted Not present; info-tint Empty; warning-tint unspecified ). Shared helpers live in ["../../../packages/analytical/src/core/filter-specials.ts"]. Surfaces: Ideas Summary SearchableCheckboxDropdown; HTML export SCD in ["../../../crates/reqlan-export/assets/app.js"]. | 0.134 | |
| ideas_list | done | ideas, git, table | - [IdeasTable] - filterable and sortable via [TableToolbar], [ColumnFilterRow], and [SortableTh] - column show / hide via [TableOptionsMenu] / [table_column_options] - wide tables scroll horizontally in a `.table-scroll` viewport ( columns keep min widths; no crush-to-fit ) - groupable by idea kind ( block / oneliner ) per [group_by_type] - other attributes shown as expandable chips per [ChipList] - clicking an attribute chip adds a column, filters to ideas with a non-null value for that attribute, and sorts by it ( combinable with other filters ) - references split into outbound and inbound chip columns with counts - clicking a reference chip filters ideas that share that edge ( combinable with other filters ) - block idea bodies shown in a scrollable cell per [IdeaBodyCell] - columns for [git_idea_timeline_analysis]: first committed, last modified, and change count - read from indexed `git_created_at` / `git_modified_at` / `git_change_count` only - empty cells until ["../../index-host/git-codelens.rq".git_dates_background_indexing] fills them; main table load never runs git [ideas_list_git_columns_performance] [ideas_list_git_date_format] | 0.079 |
| ideas_list_git_columns_performance | done | ideas, git, performance | Ideas table pages that show [git_idea_timeline_analysis] columns must read indexed `git_created_at` / `git_modified_at` / `git_change_count` only — never invoke git or the `git_dates` analyser on the UI query path. At ~ 2 k ideas, a 50 - row page ( including sorts by git modified / change count ) must stay interactive: absolute budgets plus relative guards vs path sort and vs a simulated per-row git walk. Missing-id backlog queries for background fill must also stay fast once the index is filled. Implemented by ["../../../../packages/analytical/src/index-store/sqlite-store.ts"] ( `listIdeasPage`, `listIdeaIdsMissingGitDates` ). [ideas_list] [git_idea_timeline_analysis] | 0.050 |
| simple_views | Ideas Summary tables cover ideas ( title, path / namespace, main and other attributes, reference counts ) and references ( source and target path / namespace, whether in `.rq`, reference type ). | 0.058 | ||
| timeline_page | done | timeline, ideas, git | Timeline tab shows the evolution of ideas for the active base — not raw file-index noise. Sources: - Git idea lifecycle from indexed `git_created_at` / `git_modified_at` ( created + last edited as separate events when they differ ) - Session idea reindex activity ( one event per idea persisted, with name / status / summary when available ) Missing git dates are filled by the silent background indexer ( ["../../../indexer/indexer.rq".git_dates] / ["../../index-host/git-codelens.rq".git_dates_background_indexing] ) — opening Timeline must not run git log on the UI path. Reindex must preserve existing git dates across upsert. Entries are reverse-chronological, filterable by source ( git / reindexed ), and clickable to open the idea. Each event surfaces idea-centric info: name, short summary, status, kind / tags, and path. Full live multi-commit git log browsing remains out of scope; this surfaces indexed idea history first. | 0.085 |
| index_cache_reuse | draft | Identify where the ideas index, diagnostics store, or in-process caches already hold data that other modules recompute. Goal: one walk, one sync, one open store where possible; reuse SQLite edges and mtime maps instead of rebuilding graphs from scratch. Related: [nonblocking_index], [indexing_incrementality], [consumers.index_consumers], [sequencing.index_sequencing]. | 0.164 | |
| unify_inbound_indexes | done | Inlay hints and code lens must read inbound edges from [ideas_schema.edges_table], not Langium IndexManager. Query: edges whose `target_id` is an idea in the open file, plus `comment_link` / `file_reference` rows whose `target_file` matches that file. File-top CodeLens uses the `file_reference` subset ( ["../extension/language/syntax/features-syntax-highlighting.rq".file_inbound_code_lens] ). The extension host runs the query and pushes a snapshot to the language server. The language server does not open SQLite ( [consumers.extension_ui_consumers] ). Updates follow index sync independently of open-file parse ( ["../language/syntax.rq".open_file_reference_sequencing], [inbound_snapshot_events] ). Mutation hooks already use the same store. Share one graph. Related: [index_cache_reuse], ["../indexer/indexer.rq".local_symbolic_analysis], ["../extension/language/syntax/features-syntax-highlighting.rq".inbound_inlay_index_performance]. | 0.213 | |
| definition | The indexer should live in the [core_analysis] module. On-disk schema: [sqlite_schema.ideas_index_sqlite] and [diagnostics_schema.diagnostics_sqlite]. Layout and WAL sidecars: [sidecars.reqlan_directory_layout]. Consumers: [consumers.index_consumers] ( extends [consumption] ). Sequencing and triggers: [sequencing.index_sequencing] ( extends [triggers] ). Cache reuse opportunities: [cache_reuse.index_cache_reuse]. | 0.040 | ||
| git_dates | done | Creation and last-modified dates, and change count, for ideas via git history where available. Values are written into the ideas index by the `git_dates` analyser as a silent background job after soft-sync / catalog updates ( batched, yielded ) — not triggered by Activity Bar focus, opening Timeline, or Ideas table load. Host queue and rate caps: ["../extension/index-host/git-codelens.rq".git_dates_background_indexing]. | 0.143 | |
| local_symbolic_sidebar | done | The activity bar reference lists and current-file scope must consume [local_symbolic_analysis] for the open buffer text so same-file inbound backlinks and outbound refs appear even when the SQLite index is stale or not ready. Merge live local rows with indexed `listReferencesForIdea` / hop-depth rows; dedupe by direction plus edge id ( and by idea id for scope idea chips ). Prefer the referencer name as the inbound label ( not the edge target label ). | 0.108 | |
| wildcard_reference_edges | done | Native extract ( `["../../crates/reqlan-index/src/extract.rs"]` ) expands each AST wildcard against the idea catalog ( `match_wildcard` / workspace candidate list ). Persist one edge of kind `wildcard_reference` per matching idea ( label = target idea name ); never emit plain `references` for wildcard forms. Zero matches → one unresolved edge of the same kind ( `isResolved: false`, label = pattern text ). Edge ids use `edgeId(source, 'wildcard_reference', targetOrUnresolvedKey)`. Sync walks sorted `.rq` files and grows the catalog as it goes, so a wildcard file is expanded against ideas already stored plus files earlier in that walk ( ["../../crates/reqlan-index/src/sync.rs"] ). Ancestor / reference-chain walks treat `wildcard_reference` like `references` ( ["../../packages/analytical/src/index-store/sqlite-store.ts"] ). Ideas Summary references table groups them under sub-idea with other idea-to-idea links; graph visibility is [ideas_summary_doc] / ["../extension/workspace-summary/ideas_summary/graphical_graph.rq".wildcard_refs_toggle]. Soft mtime sync skips unchanged files — after introducing this edge kind, reindex ( or touch ) `.rq` files that contain wildcards so stored rows leave any legacy `references` fan-out. Langium `idea-extractor` keeps the same kind for remaining TS extract paths. Open-file local extract ( [local_symbolic_analysis] ) does not expand wildcards against a catalog. Related: ["../language/imports.rq".wildcard_references], [index], [indexer_rust], ["../extension/workspace-summary/ideas_summary/graphical_graph.rq".wildcard_refs_toggle], [local_symbolic_analysis]. | 0.353 | |
| ideas_index_sqlite | done | The ideas graph for one [base_ownership] lives at `<base>/.reqlan/ideas-index.sqlite` under [application_memory]. Schema version is in ( `SCHEMA_VERSION` in [schema_ts] and [schema_rust] ). Runtime migrate runs in Rust ( [store_rust] ); TypeScript opens the store and calls native migrate ( [sqlite_store] ). Keep [schema_ts] aligned with [schema_rust]. Related: [index], [indexer_rust], [ownership], [sidecars.sqlite_wal_sidecars], [diagnostics_schema.diagnostics_sqlite], [consumers.index_consumers]. | 0.226 |
Reference labels
"../../../../packages/analytical/src/index-store/sqlite-store.ts", "../../../packages/analytical/src/index-store/sqlite-store.ts", "../../packages/analytical/src/index-store/sqlite-store.ts", ../../../../packages/analytical/src/index-store/sqlite-store.ts, ../../../packages/analytical/src/index-store/sqlite-store.ts, ../../packages/analytical/src/index-store/sqlite-store.ts