Skip to content

feat(dashboard): add family dashboard SPA (Vite + React)#1

Merged
kevinten10 merged 22 commits intomainfrom
worktree-family-dashboard
Mar 21, 2026
Merged

feat(dashboard): add family dashboard SPA (Vite + React)#1
kevinten10 merged 22 commits intomainfrom
worktree-family-dashboard

Conversation

@kevinten10
Copy link
Copy Markdown
Member

Summary

  • New package @openoctopus/dashboard — Vite 6 + React 19 SPA with Tailwind CSS v4, Zustand 5, React Router 7, React Flow, i18next
  • 5 pages: Home (Realm grid + Timeline), Route View (Hub-and-Spoke topology graph), Members, Entities (with SOUL editor), Settings
  • WebSocket RPC client with auto-reconnect, typed JSON-RPC protocol, event subscription
  • Zustand stores for gateway connection, realms/entities, family members/route events
  • Ink gateway integration — dashboard build output served as static files at /dashboard/ on HTTP port 19790
  • i18n with Chinese (default) and English translations
  • Updated root configs — tsconfig references, vitest alias, knip workspace, pnpm scripts

Architecture

Browser → /dashboard/ (static SPA on port 19790)
       → WebSocket RPC (port 19789) for real-time data

Build output: packages/ink/public/dashboard/ (475KB JS + 31KB CSS gzipped to ~160KB)

Key Decisions

  • @xyflow/react instead of @reactflow/core (package renamed in v12)
  • @tailwindcss/vite plugin instead of PostCSS (Tailwind v4 requirement)
  • CSS @theme for brand colors/tokens instead of tailwind.config.ts
  • Placeholder data in all pages — will be wired to real stores in follow-up

Test plan

  • All 390 unit tests pass
  • Dashboard builds successfully (pnpm dashboard:build)
  • TypeScript compiles (only pre-existing chat-pipeline.ts error)
  • Manual: Verify all 5 pages render at http://localhost:19790/dashboard/
  • Manual: Verify responsive layout (desktop sidebar, mobile bottom nav)
  • Manual: Verify React Flow topology graph on Route View

🤖 Generated with Claude Code

kevinten10 and others added 22 commits March 17, 2026 22:16
Initialize the @openoctopus/dashboard package as a Vite 6 + React 19 SPA
with Tailwind CSS v4, React Router v7, Zustand, i18next, React Flow, and
Recharts. Adds placeholder routes for home, route view, members, entities,
and settings pages. Integrates into the monorepo with root tsconfig
references, vitest alias, and convenience scripts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add static file serving for the built dashboard SPA at /dashboard/
with SPA fallback for client-side routing. Also fix tsconfig.node.json
composite setting for project references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add use-gateway hook for WebSocket connection management
- Migrate to @tailwindcss/vite plugin (Tailwind v4 requirement)
- Replace postcss.config.js + tailwind.config.ts with CSS @theme
- Add dashboard workspace to knip config
- Dashboard builds successfully to packages/ink/public/dashboard/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…llbacks

RealmGrid, Timeline, RouteView, Members, and Entities now read live data
from their respective Zustand stores and fall back to placeholder data
when the gateway is disconnected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ve unused deps

- Fix setStatus to preserve existing error instead of clearing with undefined
- Wire Settings page to show live gateway status and data counts
- Remove unused recharts, @tailwindcss/postcss, autoprefixer, postcss deps
- Add tests for error preservation behavior

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Auto-fix 52 curly brace violations (if/for without braces)
- Fix 5 unused variables (prefix with _ or remove)
- Fix 2 consistent-function-scoping issues (hoist mockEmbed)
- Replace 2 new Array() with Array.from()
- Downgrade no-explicit-any and no-await-in-loop to warn
  (67+12 pre-existing violations, all in test mocks and
  intentional sequential processing)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract NAV_ITEMS to shared nav-items.ts (eliminates duplication
  between Sidebar and MobileNav)
- Add ErrorBoundary component to catch rendering errors gracefully
- Wire ErrorBoundary at App root level

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ndling

BrowserRouter's basename prop doesn't strip the path correctly in
React Router v7.13. Using createBrowserRouter with basename option
in the router config fixes route matching under /dashboard/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kevinten10 kevinten10 merged commit 014fe1b into main Mar 21, 2026
1 check 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.

1 participant