Printable idea sheet
active_base_switch
reqlan rq/bases/base.rq:159
Katz 0.093
Changing the active base is a **pointer swap** onto a per-base `WorkspaceIndex` / store.
- Do **not** await soft-sync, hard-rebuild, or a full `.rq` walk on the switch call itself.
- Host surfaces rebind views to the newly active store ( status snapshot, tables, context panes ) immediately.
- If the selected base is not yet ready, show its readiness / progress and **schedule** the normal activate catch-up
( open if needed, then one soft sync ) fire-and-forget — same path as triggers /
indexing_trigger_open, not a special switcher rebuild.
- Idle staleness checks only touch bases that are already open; they must not reopen every discovered base
( release_when_idle ).
- Open failures stay isolated per base so one bad base cannot leave siblings stranded in `uninitialized`.
- Editor-follow must not overwrite a user pin on the same refresh that applies the selection.
- Inactive bases release SQLite artifacts when the active pointer moves away
( sqlite_artifact_lifecycle ).
Surfaces: activity bar workspace_base_picker, Ideas Summary ideas_summary_base_scope.
Implemented by index-service.ts ( `setActiveBaseId` / `scheduleBaseCatchUp` ); engine: base-registry.ts `ensureBaseReady` / `releaseArtifacts`, workspace-index.ts `ensureReady` / `deactivate`.
- implementation
- index-service.ts, base-registry.ts, workspace-index.ts, activity-bar-webview-provider.ts, ideas-summary-panel.ts, workspace_base_picker, ideas_summary_base_scope, sqlite_artifact_lifecycle
- status
- done
- tests
- base-registry-catchup.test.ts:ensureBaseReady opens and soft-syncs an uninitialized base, base-registry-catchup.test.ts:checkStaleAll heals an uninitialized base, base-registry-catchup.test.ts:deactivate returns to uninitialized so a base can be reopened, sqlite-artifact-release.test.ts:BaseRegistry releaseArtifacts closes handles but keeps descriptors
Interactive page: active_base_switch