Skip to content

feat(dashboard): rebuild Storage tab for SurrealDB (replace dead multi-backend tab) [follow-up #31]#34

Merged
acidkill merged 1 commit into
mainfrom
feat/dashboard-storage-tab-surrealdb
Jun 22, 2026
Merged

feat(dashboard): rebuild Storage tab for SurrealDB (replace dead multi-backend tab) [follow-up #31]#34
acidkill merged 1 commit into
mainfrom
feat/dashboard-storage-tab-surrealdb

Conversation

@acidkill

@acidkill acidkill commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Follow-up to #31. Rebuilds the dead dashboard Storage tab for the SurrealDB-only backend.

Problem

The Storage tab (MigrationCard/StorageStatusCard/useStorage.ts) called /api/dashboard/storage/{status,migrate,backend} — sqlite↔infinitydb migration endpoints the SurrealDB-only backend no longer exposes (dead tab → 404s).

Changes

  • Backend: new GET /api/dashboard/storage/status returning SurrealDBStorageStatus (backend, url/namespace/database, healthy, counts) in dashboard_api.py.
  • Frontend: StoragePage + StorageStatusCard rewritten for the SurrealDB shape; types.ts updated; useStorage.ts drops the dead migration mutation hooks (keeps useStorageStatus + useTierStats); MigrationCard.tsx + MigrationProgress.tsx deleted; dist rebuilt.
  • Tests: +3 in test_dashboard_api.py (TestStorageStatusEndpoint).

Test plan

  • 14/14 test_dashboard_api.py pass; route registered; ruff/mypy clean; dashboard built.
  • CI green.
  • Manual: open Storage tab against live SurrealDB → shows backend status.

Base main · branch feat/dashboard-storage-tab-surrealdb. Implemented by the run-002 follow-up workflow; ship completed manually after the ship-agent stalled ~3h on a local pip/multi-worktree env conflict (unrelated to the change).

- Add GET /api/dashboard/storage/status returning backend/url/namespace/
  database/healthy/counts/health_grade (SurrealDB-only)
- Rewrite StoragePage.tsx to use new endpoint via useStorageStatus()
- Rewrite StorageStatusCard.tsx accepting SurrealDBStorageStatus (not old
  SQLite/InfinityDB shape)
- Delete MigrationCard.tsx + MigrationProgress.tsx (dead since SurrealDB-only)
- Drop dead hooks (useMigrationJob, useStartMigration, useSetBackend) from
  useStorage.ts; keep useTierStats
- Replace StorageStatusResponse/MigrationJobStatus/SetBackendResponse types
  with SurrealDBStorageStatus in types.ts
- Add 3 unit tests: 200+surrealdb backend, healthy=false on stats-fail,
  url/ns/db passthrough
- Rebuild dist
@acidkill acidkill marked this pull request as ready for review June 22, 2026 23:47
@acidkill acidkill merged commit c0ab73d into main Jun 22, 2026
7 checks passed
@acidkill acidkill deleted the feat/dashboard-storage-tab-surrealdb branch June 22, 2026 23:47
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.

1 participant