Roo-Code/packages
James Mtendamema 67ea856fd0
feat: add per-workspace indexing opt-in and stop/cancel control (#11456)
* feat: add per-workspace indexing opt-in and stop/cancel control

- Add codeIndexWorkspaceEnabled flag in workspaceState (default: false)
- Thread AbortController/AbortSignal through orchestrator → scanner
- Add Stop Indexing button and Stopping state to UI
- Fix handleSettingsChange() to abort active scan when disabling toggle
- Add translations for all 18 locales

* fix: correct abort handling in indexing scanner and orchestrator

- Re-throw AbortError in scanner's file processing catch block to prevent
  abort signals from being silently swallowed as file errors
- Reorder stopWatcher() before setSystemState() in orchestrator abort
  catch path to ensure watcher cleanup before state transition
- Update scanner test to assert AbortError propagation on mid-scan abort

* fix: optimize workspace check ordering, translate new i18n keys, fix abort handling

- Move workspace-enabled check before _recreateServices() in initialize()
  to avoid creating Qdrant/embedder connections for disabled workspaces
- Translate new i18n keys (indexingStopped, indexingStoppedPartial, stopping,
  stopIndexingButton, stoppingButton, workspaceToggleLabel,
  workspaceDisabledMessage) in all 17 non-English locales
- Re-throw AbortError in scanner catch block to prevent silent swallowing
- Reorder stopWatcher() before setSystemState() in orchestrator abort path
- Update scanner test to assert AbortError propagation on mid-scan abort
- Fix recoverFromError test for workspace-enabled check ordering

* fix: per-folder enablement key, abort-safe dispose and back-pressure, translate i18n

Addresses 0xMink review feedback:
- Store workspace enablement keyed by folder path to support multi-root
  workspaces (codeIndexWorkspaceEnabled:<path> instead of single boolean)
- Add test proving folder A enabled does not enable folder B
- dispose() now calls stopIndexing() to abort orphaned scans on folder removal
- Scanner back-pressure loop checks abort signal to avoid spin-waiting
- Move workspace-enabled check before _recreateServices() in initialize()
- Translate new i18n keys in all 17 non-English locales
- Fix abort handling in orchestrator and scanner catch blocks

* fix: flush debounced cache writes on abort to preserve indexing progress

* feat: add global auto-enable default for backward-compatible workspace indexing

* fix: stop/start indexer when auto-enable default changes effective state

* fix: URI-keyed enablement, throw AbortError in back-pressure, stopWatcher on early-return

* fix: iterate all managers when auto-enable default changes in multi-root workspaces

---------

Co-authored-by: James Mtendamema <jmtendamema@geologicai.com>
2026-02-18 23:09:17 -07:00
..
build Custom tool calling (#10083) 2025-12-21 12:43:06 -08:00
cloud Reapply Batch 1: 22 clean non-AI-SDK cherry-picks (#11473) 2026-02-14 13:47:12 -07:00
config-eslint Upgrade to ESLint 9 + share eslint config across workspaces (#3815) 2025-05-21 21:30:21 -07:00
config-typescript Move @roo-code/cloud to the Roo-Code repo (#7503) 2025-08-28 11:18:45 -07:00
core Add back post-revert bug fixes and features (Step 2) (#11463) 2026-02-13 18:40:28 -05:00
evals Reapply Batches 3-4: Skills, browser removal, provider removals (6 major-conflict cherry-picks) (#11475) 2026-02-14 22:06:24 -07:00
ipc feat: add DeleteQueuedMessage IPC command (#11464) 2026-02-18 10:42:48 -07:00
telemetry fix(condense): remove custom condensing model option (#10901) 2026-01-22 20:06:04 -05:00
types feat: add per-workspace indexing opt-in and stop/cancel control (#11456) 2026-02-18 23:09:17 -07:00
vscode-shim Some cleanup in ExtensionHost (#10600) 2026-01-10 02:29:33 -08:00