Code reference detail
workspace-index-sync.ts
reqlan rq/indexer/packages/analytical/src/index-store/workspace-index-sync.ts
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| index_diagnostics_timing | Soft sync and per-file index paths record durations into the diagnostic index under [app_memory_doc.index_diagnostics_store]. See ["../extension/index-host/index-diagnostics.rq".index_diagnostics_metrics]. Must not block [nonblocking_index]; recording failures are swallowed / logged by the store and must not fail the sync. | 0.096 | ||
| indexing_incrementality | Indexing should be incremental: watcher-driven single-file updates, and soft full syncs that skip unchanged files by stored mtime. Hard rebuilds reparse everything. Detail and UX ( progress, cancel, non-blocking UI ): [nonblocking_index]. | 0.161 | ||
| nonblocking_index | done | Index sync must stay non-blocking for the host UI ( notably [activity_bar_doc.activity_bar] and [workspace_pane_doc.workspace_loading] ). Editor startup is gated by ["../extension/host/activation.rq".first_paint_startup]; discovering a base must not construct Langium services, which are initialized lazily on the first parse. While syncing, surface progress — state, processed / total, and the current file — in [workspace_pane_doc.workspace_pane] and [ideas_summary_doc.index_panel]. In-flight sync must be cancellable from those surfaces; cancel keeps already-indexed rows and returns the index to ready. Incremental behaviour ( see also [indexing_incrementality] ): - Single-file create / change / delete via watchers indexes only that file — never a full base walk. - Soft full sync ( `syncWorkspace` / Refresh ) skips parse + persist when the file's mtime matches the value stored on the documents row. - Hard refresh ( `clearAndRebuildIndex` / Clear & rebuild ) wipes the store and reindexes every file. - Every sync and stale check applies `.rqignore` to the paths it receives, the same as the base walk; the native single-file index also drops an ignored path. Thus base discovery cannot make the first sync index ignored files. Implemented by [workspace_index]; editor adapter [editor_index_adapter]. | 0.372 |
Reference labels
index_diagnostics_timing, indexing_incrementality, nonblocking_index