Roo-Code/packages/types
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
..
npm Release: v1.112.0 (#11589) 2026-02-18 16:01:44 -08:00
scripts Fix publish-npm script (#7093) 2025-08-14 03:17:56 -07:00
src feat: add per-workspace indexing opt-in and stop/cancel control (#11456) 2026-02-18 23:09:17 -07:00
.gitignore Task metadata (#7092) 2025-08-14 03:14:17 -07:00
eslint.config.mjs Task metadata (#7092) 2025-08-14 03:14:17 -07:00
package.json feat: add AI SDK dependencies and message conversion utilities (#11047) 2026-01-28 14:05:53 -05:00
tsconfig.json Task metadata (#7092) 2025-08-14 03:14:17 -07:00
tsup.config.ts Bump @roo-code/types to v1.42.0 (#6610) 2025-08-02 13:27:59 -07:00
vitest.config.ts Convert jest tests to vitest and disable default watch mode for vitest (#4568) 2025-06-11 14:48:01 -07:00