Skip to content

feat: add Next.js dashboard with tRPC + CORS support#3

Merged
github-actions[bot] merged 1 commit intomasterfrom
feat/dashboard
Mar 18, 2026
Merged

feat: add Next.js dashboard with tRPC + CORS support#3
github-actions[bot] merged 1 commit intomasterfrom
feat/dashboard

Conversation

@broomva
Copy link
Owner

@broomva broomva commented Mar 18, 2026

Summary

  • Add a React dashboard (Next.js 16 + tRPC + shadcn/ui) forked from chat-js, stripped of all chat domain logic, rebuilt for Symphony orchestration monitoring
  • Add CORS layer to the Rust HTTP server (symphony-observability) for cross-origin dashboard access
  • Add @symphony/client TypeScript package mirroring Rust API types
  • Add Dockerfile + railway.toml for dashboard deployment

Dashboard pages

Route Description
/overview Live stat cards (running, retrying, tokens, runtime) + token area chart
/issues Running + retrying session tables with drill-down links
/issues/[identifier] Issue detail page with state, tokens, retry info
/workspaces Workspace cards with status badges
/metrics Token breakdown, session counts, config, runtime stats
/controls Trigger poll + graceful shutdown with confirmation

Architecture

Browser → Next.js (port 3000) → tRPC → SymphonyClient → Symphony daemon (port 8080)
                                         (server-side)     /api/v1/*
  • tRPC routers run server-side, calling Symphony's REST API
  • SYMPHONY_API_TOKEN stays server-side (never sent to browser)
  • React Query auto-polls at 5s intervals
  • Configurable CORS via SYMPHONY_CORS_ORIGINS env var

Rust changes

  • crates/symphony-observability/src/server.rs: Added CorsLayer with configurable origins
  • New test: cors_preflight_returns_headers
  • All 260 Rust tests pass

Test plan

  • make smoke — all Rust tests pass (including new CORS test)
  • tsc --noEmit — zero TypeScript errors
  • bun run build compiles (needs .env.local with DATABASE_URL + AUTH_SECRET)
  • Start daemon → bun run dev → verify live data on localhost:3000
  • Deploy dashboard to Railway/Vercel with Postgres

🤖 Generated with Claude Code

Add a React dashboard (Next.js 16, tRPC, shadcn/ui) forked from chat-js,
stripped of all chat domain logic and rebuilt for Symphony orchestration
monitoring. Adds CORS layer to the Rust HTTP server for cross-origin
dashboard access.

Dashboard features:
- Overview page with live stat cards and token usage chart
- Issues table with running/retrying sessions and drill-down
- Workspaces grid with status badges
- Metrics page with token breakdown and config display
- Controls page with trigger-poll and graceful shutdown
- Auto-polling via React Query (5s refetchInterval)
- TypeScript client package mirroring Rust API types

Infrastructure:
- symphony-client package with typed HTTP client
- tRPC routers (symphony + settings) calling Rust API server-side
- Better Auth with Drizzle ORM (minimal schema)
- Dockerfile + railway.toml for deployment
- Configurable CORS via SYMPHONY_CORS_ORIGINS env var

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@railway-app railway-app bot temporarily deployed to symphony / symphony-pr-3 March 18, 2026 04:46 Destroyed
@railway-app
Copy link

railway-app bot commented Mar 18, 2026

🚅 Deployed to the symphony-pr-3 environment in symphony

Service Status Web Updated (UTC)
symphony 🕒 Building (View Logs) Web Mar 18, 2026 at 4:46 am

@github-actions github-actions bot merged commit 5ce3e67 into master Mar 18, 2026
9 of 10 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.

1 participant