feat(ui): damascus-ui v1 read-only dashboard (P4) #17

Merged
kaykayyali merged 2 commits from feat/entry-points-ui-v1 into main 2026-06-24 14:59:12 +00:00
Owner

P4 read-only dashboard.

Stack: Vite 6 + React 19 + MUI 6 + @tanstack/react-query.
Routes: Dashboard (section 7 widgets: phase bar, open issues count, cost today, last cycle), Items (MUI DataGrid), ItemDrawer (right-side panel for /items/:id).
Filter+sort+limit wired to URL hash for shareable links.
React Query handles caching; 5s staleTime on live-polled dashboard, 0 on items page so URL changes refetch immediately.

Compose: one-shot damascus-ui-build service produces the bundle into named volume damascus_ui. P2's damascus-api will mount that volume at /opt/damascus/ui:ro and serve it via FastAPI StaticFiles.

E2E: 4 Playwright tests (dashboard, items table, drawer with item+open_issues+recent_events, phase filter narrows results) run against an in-repo FastAPI fixture (tests/e2e/fixture_api.py) so they work without a live damascus-api. All 4 green.

Acceptance:

  • cd ui && npm run build exits 0
  • cd ui && npm run test:e2e exits 0 (4/4)
  • docker compose up damascus-ui-build exits 0
P4 read-only dashboard. Stack: Vite 6 + React 19 + MUI 6 + @tanstack/react-query. Routes: Dashboard (section 7 widgets: phase bar, open issues count, cost today, last cycle), Items (MUI DataGrid), ItemDrawer (right-side panel for /items/:id). Filter+sort+limit wired to URL hash for shareable links. React Query handles caching; 5s staleTime on live-polled dashboard, 0 on items page so URL changes refetch immediately. Compose: one-shot damascus-ui-build service produces the bundle into named volume damascus_ui. P2's damascus-api will mount that volume at /opt/damascus/ui:ro and serve it via FastAPI StaticFiles. E2E: 4 Playwright tests (dashboard, items table, drawer with item+open_issues+recent_events, phase filter narrows results) run against an in-repo FastAPI fixture (tests/e2e/fixture_api.py) so they work without a live damascus-api. All 4 green. Acceptance: - cd ui && npm run build exits 0 - cd ui && npm run test:e2e exits 0 (4/4) - docker compose up damascus-ui-build exits 0
kaykayyali added 1 commit 2026-06-24 13:56:12 +00:00
feat(ui): damascus-ui v1 read-only dashboard (P4)
All checks were successful
test / contract-and-unit (pull_request) Successful in 12s
08cd25ac9f
- Vite 6 + React 19 + MUI 6 SPA at ui/
- Routes: Dashboard, Items (MUI DataGrid), ItemDrawer
- /v1/items filter+sort+limit wired to URL hash for shareable links
- React Query hooks (useStats, useListItems, useItemDetail, useRecentEvents)
- Playwright e2e suite: 4 tests against fixture API on :9110
  (dashboard widgets, items table, drawer with item+open_issues+recent_events, phase filter narrows results)
- Multi-stage Dockerfile (node:22-alpine build -> /bundle)
- Compose service damascus-ui-build: one-shot, writes dist/ to
  named volume damascus_ui for the (P2) damascus-api container to mount
- Fixture FastAPI app (tests/e2e/fixture_api.py) for e2e runs without
  a live damascus-api (P4 ships ahead of P2 by design)

Acceptance: build green, 4/4 e2e tests green
kaykayyali added 1 commit 2026-06-24 14:01:52 +00:00
fix(ui): bake VITE_API_BASE_URL into npm test:e2e so the bundled SPA points at the fixture
All checks were successful
test / contract-and-unit (pull_request) Successful in 12s
2bd41fff29
The Playwright webServer boots the fixture FastAPI on 127.0.0.1:9110;
without VITE_API_BASE_URL the SPA fetches /v1/* same-origin from the
vite preview at :4173, gets 500s, and the suite flakes based on
whether dist/ happens to be fresh from a prior build.
kaykayyali merged commit 2a90a9dd1c into main 2026-06-24 14:59:12 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kaykayyali/damascus-orchestrator#17