Skip to content

feat: unify workspace and dashboard routing (#407)#411

Merged
BorisTyshkevich merged 4 commits into
mainfrom
feat/unified-sql-routing-407
Jul 23, 2026
Merged

feat: unify workspace and dashboard routing (#407)#411
BorisTyshkevich merged 4 commits into
mainfrom
feat/unified-sql-routing-407

Conversation

@BorisTyshkevich

@BorisTyshkevich BorisTyshkevich commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

What & why

Closes #407.

Unifies Workbench and Dashboard under the canonical /sql entry point. Both surfaces use the original shared Workbench header row and share the SQL Browser/Dashboard selector. Dashboard keeps its route chrome on one top row: host, tile count, File, active layout menu, dashboard title, View/Edit, Updated, Refresh, and theme. The layout trigger and list use the same button/menu grammar as File with no extra Style label, and Refresh matches the Edit control dimensions. Workbench-only connection, GitHub, keyboard, and user controls are omitted on Dashboard.

Surface and Dashboard view mode live in URL query state, surface changes stay in the same tab, and both surfaces project the same active workspace. This also removes the detached Dashboard snapshot/handoff subsystem and preserves state-bound OAuth return routes.

Navigation enters a synchronous inert loading route before awaiting storage. Global shortcuts fail closed unless the ready Workbench route and projected workspace agree. An independent surface generation prevents obsolete Dashboard and Workbench async callbacks from settling into replacement renderers while allowing durable commits to finish and refresh the current surface. Empty Dashboards react to cross-tab creation.

The ClickHouse version probe starts from shared signed-in startup for direct Dashboard routes, after the initial surface is mounted. An authentication rejection can therefore replace the application with Login without a delayed workspace load overwriting Login afterward.

Checklist

  • npm test passes (5,056 tests; 100% statements and lines)
  • 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/, DOM in src/ui/
  • No new runtime dependency
  • README / CHANGELOG.md ([Unreleased]) updated
  • Reconciled roadmap Roadmap to 1.0.0 #68, issue Unified /sql routing for workspace and dashboard surfaces with live view/edit modes #407, ADR-0003, architecture docs, and deployment routes
  • Full E2E baseline: 294 tests across Chromium, Firefox, and WebKit (--workers=1)
  • Current header/menu regression passes Chromium and WebKit; Firefox launch was blocked locally in an OS-level uninterruptible state before navigation and is covered by PR CI

Review notes

The active surface and Dashboard mode buttons are intentionally disabled. Surface changes use pushState; Dashboard View/Edit changes use replaceState. Cross-workspace navigation immediately replaces and disables the old surface before awaiting storage, while same-workspace history changes render without a repository reload. OAuth callback restoration remains tied to the matching CSRF state and returns to the exact pre-auth /sql query route.

Route Workbench and Dashboard through one canonical /sql entry point, keep workspace state live across surface changes, and retire detached dashboard handoff storage.

Preserve state-bound OAuth return routes, harden asynchronous workspace navigation, and update deployment, architecture, and regression coverage.

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

Claude-Session: unavailable (OpenAI Codex)
Co-Authored-By: OpenAI Codex <noreply@openai.com>

Claude-Session: unavailable (OpenAI Codex)
Co-Authored-By: OpenAI Codex <noreply@openai.com>

Claude-Session: unavailable (OpenAI Codex)
Co-Authored-By: OpenAI Codex <noreply@openai.com>

Claude-Session: unavailable (OpenAI Codex)
@BorisTyshkevich
BorisTyshkevich merged commit 1077e01 into main Jul 23, 2026
9 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.

Unified /sql routing for workspace and dashboard surfaces with live view/edit modes

1 participant