Skip to content

feat: add multi-workspace persistence#410

Merged
BorisTyshkevich merged 3 commits into
mainfrom
feat/multi-workspace-persistence-406
Jul 23, 2026
Merged

feat: add multi-workspace persistence#410
BorisTyshkevich merged 3 commits into
mainfrom
feat/multi-workspace-persistence-406

Conversation

@BorisTyshkevich

Copy link
Copy Markdown
Collaborator

What & why

Closes #406.

Replace the fixed current aggregate with a real local workspace collection. StoredWorkspaceV2 separates immutable opaque id, immutable stable URL key, and mutable display name; IndexedDB stores one validated record per workspace with a unique key index and separate last-used metadata.

The repository now lists summaries and loads, creates, replaces, and deletes individual workspaces. Implicit startup uses the persisted last-used key, then injected-clock lastOpenedAt ordering when that preference is invalid; explicit ?ws= never falls back. Workspace import creates a fresh local workspace, active mutations reload by immutable ID, and Dashboard URLs resolve stable keys. Corrupt records remain fail-closed and reserve their keys.

The roadmap #68, issue contract, README, ADR-0001/ADR-0003, and [Unreleased] changelog are reconciled. Existing development IndexedDB data is intentionally not migrated, per the issue decision.

Validation:

  • npm test: 5,080 tests passed with the per-file coverage gate
  • npm run build: single-file artifact built successfully
  • Playwright: 288/291 passed in the initial 10-worker full matrix; three Firefox page-start timeouts passed on serial retry (13/13), and the changed persistence harnesses passed across Chromium/Firefox/WebKit after the final fixes (9/9)
  • Independent read-only review: no remaining actionable findings

Checklist

  • npm test passes (the per-file coverage gate is non-negotiable)
  • Tests added/updated in the same change as the code
  • npm run build succeeds (single-file dist/sql.html)
  • Layers kept honest: pure logic in src/core/, network in src/net/ (injected fetch), DOM in src/ui/
  • No new runtime dependency (or it is a deliberate, justified addition — see CONTRIBUTING)
  • README / CHANGELOG.md ([Unreleased]) updated if behavior or the deployed surface changed
  • Reconciled affected tracked work (roadmap Roadmap to 1.0.0 #68, the issue body, ADR/CHANGELOG) if this change reshaped it

Replace the fixed current aggregate with StoredWorkspaceV2 records keyed by immutable IDs and unique stable URL keys. Add collection repository operations, separate last-used metadata with timestamp fallback, additive imports, active-ID mutations, and key-based Dashboard routing.

Reconcile the roadmap, ADRs, README, and changelog; extend IndexedDB, application, routing, import, and cross-tab coverage.

Co-Authored-By: OpenAI Codex <noreply@openai.com>

Claude-Session: unavailable (OpenAI Codex)
@BorisTyshkevich BorisTyshkevich mentioned this pull request Jul 23, 2026
81 tasks
Prevent workspace-scoped query IDs from rebinding existing editor tabs, and defer last-used Dashboard metadata until the requested Dashboard resolves.

Co-Authored-By: OpenAI Codex <noreply@openai.com>

Claude-Session: unavailable (OpenAI Codex)
Make the ship merge gate launch npm run local and remove stale references to the retired legacy workspace migration.

Co-Authored-By: OpenAI Codex <noreply@openai.com>

Claude-Session: unavailable (OpenAI Codex)
@BorisTyshkevich
BorisTyshkevich merged commit e74f2fc into main Jul 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi-workspace persistence: keyed repository, stable workspace keys, list/create/delete

1 participant