Skip to content

[UI Revamp] New dashboard with shadcn/ui, AG Grid, react-router#88

Merged
tarasyarema merged 9 commits intomainfrom
ui-revamp-phase1
Feb 25, 2026
Merged

[UI Revamp] New dashboard with shadcn/ui, AG Grid, react-router#88
tarasyarema merged 9 commits intomainfrom
ui-revamp-phase1

Conversation

@desplega-bot
Copy link
Contributor

Summary

Complete rewrite of the Agent Swarm monitoring dashboard as a standalone SPA (new-ui/ directory). Replaces the MUI Joy-based UI with a modern stack while keeping the existing UI intact for a gradual migration.

92 files, ~14,600 lines of new code across 6 phases.

Tech Stack

  • Vite 7 + React 19 + TypeScript (strict, verbatimModuleSyntax)
  • Tailwind CSS v4 with custom beehive theme (OKLCH colors, Graduate/Space Grotesk/Space Mono fonts)
  • shadcn/ui (new-york style) — 15+ components
  • AG Grid Community with Quartz theme + beehive overrides (optimized module imports)
  • TanStack React Query — polling-based data fetching (2s stale, 5s session log polling)
  • react-router-dom v7 — lazy-loaded routes with code splitting (33 JS chunks)
  • Recharts — usage analytics charts
  • cmdk — command palette (Ctrl+K)

What's Included

Phase 1 — Project Scaffolding

  • Vite + React 19 project setup with all dependencies
  • API client singleton, TypeScript types mirroring backend
  • 10 React Query hook files covering all API endpoints
  • Path aliases, Tailwind v4 theme, AG Grid CSS overrides

Phase 2 — Layout & Navigation

  • Collapsible sidebar with 10 nav sections + hexagonal branding
  • Header with breadcrumbs, dark mode toggle, search trigger
  • Dark mode support via class-based toggling

Phase 3 — Config & Dashboard

  • Config page: API URL + key form with connection validation
  • Auto-connect from URL params
  • Config guard: redirects unconfigured users
  • Dashboard: hexagonal stat cells, agent cards, active tasks, activity feed

Phase 4 — Core Data Pages (AG Grid)

  • Agents list + detail (inline name editing, profile/tasks/usage tabs)
  • Tasks list + detail (session logs with auto-scroll, event timeline)
  • Epics list + detail (progress bars, PRD/plan viewers)
  • Reusable DataGrid wrapper, StatusBadge, JsonViewer components

Phase 5 — Secondary Pages

  • Chat: 3-panel layout (channel sidebar, message area, input with Enter-to-send)
  • Schedules: table with cron/interval display + detail page
  • Usage: summary cards, daily cost line chart, token pie, cost-by-agent bar, agent leaderboard
  • Config CRUD: swarm config table with add/edit/delete, secret masking
  • Repos: CRUD with add/edit dialogs, auto-clone toggle
  • Services: card grid with health status indicators

Phase 6 — Polish

  • Error boundary: route-level with Try Again + Go Home
  • Empty state: reusable component for all list pages
  • Command palette: Ctrl+K to search agents/tasks/epics, quick nav
  • Keyboard shortcuts: number keys 0-9 for section navigation
  • Toast notifications (Sonner)
  • AG Grid module optimization: 874KB vs 1099KB (20% reduction)
  • Meta tags: OG, theme-color, apple-touch-icon

Build Stats

  • 33 JS chunks (proper code splitting via React.lazy)
  • 2.1 MB total dist size
  • pnpm build passes cleanly (tsc + vite)

Test plan

  • cd new-ui && pnpm install && pnpm build succeeds
  • cd new-ui && pnpm tsc --noEmit passes
  • Connect to local API server, verify all 10 sidebar sections load data
  • Navigate to agent/task/epic detail pages
  • Post a message in chat
  • Toggle dark mode on every page
  • Test Ctrl+K command palette
  • Test number key navigation (press 2 → agents)
  • Check mobile viewport (375px) — sidebar collapses, tables scroll
  • Verify error boundary with disconnected API
  • Check empty states with fresh database

🤖 Generated with Claude Code

Worker Agent and others added 6 commits February 25, 2026 14:19
Initialize new-ui/ with full tech stack and port reusable code from existing ui/:

- Vite 7 + React 19 + TypeScript + pnpm
- Tailwind CSS v4 with beehive theme (globals.css + AG Grid overrides)
- react-router v7 with 14 lazy-loaded route stubs
- TanStack React Query with 5s auto-polling
- API types (33 interfaces), client (all endpoints), 10 domain hook files
- Utility functions (formatRelativeTime, cn(), content preview, auto-scroll)
- Theme provider (dark/light mode via localStorage)
- Config hook with URL param auto-connect support
- Vercel deployment config (SPA rewrites)

Verification: pnpm build produces dist/, tsc --noEmit passes.

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

Add the full layout shell for the dashboard:

- Responsive sidebar with 10 nav sections (Dashboard, Agents, Tasks, Epics,
  Chat, Services, Schedules, Usage, Config, Repos) using lucide-react icons
- Active route highlighting with amber accent border
- Logo + "Agent Swarm" branding in sidebar header
- Collapsible sidebar with toggle in footer
- App header with breadcrumbs, health status indicator (green/red dot),
  and dark/light theme toggle (Sun/Moon icons)
- Mobile-responsive: hamburger menu triggers sidebar Sheet overlay
- Page loading skeleton for lazy route transitions
- Root layout wiring: SidebarProvider > AppSidebar + SidebarInset > Header + Outlet
- shadcn/ui components: sidebar, sheet, button, badge, separator, tooltip,
  avatar, scroll-area, skeleton, input
- TooltipProvider wrapping the app for sidebar tooltip support

Verification: pnpm build passes, tsc --noEmit passes.

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

- Config page: API URL + API Key form, connection validation via /health,
  auto-connect from URL params, disconnect support
- Config guard: redirects to /config when not configured
- Dashboard: stats bar (hexagonal cells), agent overview cards, active tasks
  summary, activity feed with color-coded events
- Status badge: shared component with status→color mapping, pulse animation
  for active statuses
- Stats bar: honeycomb hex layout with clip-path polygons
- 4 new shadcn components: card, label, dialog, alert

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

- AG Grid wrapper: reusable DataGrid component with Quartz theme, pagination,
  quick filter, loading/empty overlays, column resizing
- Agents: list with status filter, row navigation; detail with inline name
  edit, profile/tasks/usage tabs, SOUL.md/IDENTITY.md viewers
- Tasks: list with status/agent filter dropdowns; detail with session logs
  panel (auto-scroll, 5s polling, follow button), event timeline
- Epics: list with progress bars; detail with goal/PRD/plan viewers,
  progress breakdown, tasks tab
- JSON Viewer: collapsible content display for markdown/JSON
- 3 new shadcn components: tabs, textarea, select

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

- Chat page: 3-panel layout with channel sidebar, messages, and input
- Schedules page: table view with cron/interval display, enabled badges
- Schedule detail: info cards, timing, task template viewer
- Usage page: summary cards, daily cost line chart, token pie, cost-by-agent bar, agent leaderboard
- Config page: expanded with swarm config CRUD (add/edit/delete entries, secret masking)
- Repos page: CRUD with add/edit dialogs, auto-clone toggle
- Services page: card grid with health status indicators

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

- Error boundary: route-level with Try Again + Go Home actions
- Empty state: reusable component (icon, title, description, CTA)
- Command palette: Ctrl+K search across agents, tasks, epics, quick nav
- Keyboard shortcuts: number keys 0-9 for section navigation
- Toast notifications: Sonner toaster for mutation feedback
- AG Grid optimization: switched from AllCommunityModule to specific modules (874KB vs 1099KB)
- Meta tags: OG tags, theme-color, apple-touch-icon
- shadcn components: alert-dialog, command (cmdk), sonner

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agent-swarm Ready Ready Preview, Comment Feb 25, 2026 3:50pm

Request Review

@tarasyarema
Copy link
Contributor

@desplega-bot pls make sure ci passes, and also can you post some screenshots of how it looks? Use qa-use using 2142958c-8f13-49b8-ab08-fc7bee38ea5d app config (should be default) to get the credentials.

Share a recording so I get an e2e idea pls

@desplega-bot
Copy link
Contributor Author

On it! I've dispatched two workers in parallel:

  1. Picateclas — checking CI status and fixing any failures
  2. Tester — spinning up the UI from this branch and capturing screenshots + a recording via qa-use

Will post results here shortly.

The new-ui directory has its own tsconfig and dependencies. Without
excluding it, the root tsc:check picks up new-ui files and fails on
missing module declarations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@desplega-bot
Copy link
Contributor Author

CI Fix

Root cause: The root tsconfig.json didn't exclude the new-ui/ directory. Since new-ui has its own tsconfig and separate dependencies (react-router-dom, lucide-react, ag-grid, shadcn/ui components, etc.), the root tsc --noEmit was picking up those files and failing on missing module declarations.

Fix: Added "new-ui" to the exclude array in tsconfig.json (alongside the existing "ui" exclusion).

Verified locally — both bun run lint and bun run tsc:check pass clean.

@desplega-bot
Copy link
Contributor Author

PR #88 Review — Agent Swarm UI Revamp

Comprehensive review of the new-ui dashboard (92 files, ~14,600 lines). Overall this is solid work — clean architecture, proper lazy loading, good react-query patterns, and passing TypeScript/build checks. I found 2 bugs and 2 dead code files that should be addressed before merge.

Checks

Check Result
pnpm tsc --noEmit ✅ Passes
pnpm build ✅ Passes (2.1 MB total, ~580 KB gzipped)
Bundle < 5 MB ✅ Yes
No hardcoded secrets ✅ Clean
Lazy loading ✅ All 14 pages use React.lazy()
AG Grid modules ✅ Uses specific modules, not AllCommunityModule

Blocking Issues (2)

1. ConfigEntryDialog stale state bug (config/page.tsx:67-78)
The dialog form state is initialized via useState(editEntry ? {...} : emptyConfigForm) but useState only uses the initial value on first render. Since ConfigEntryDialog is always mounted (line 338), clicking "Edit" on different config entries will show stale data from the first render. Fix: key the component on editEntry?.id or add a useEffect to sync.

2. Chat page ignores :channelId URL param (chat/page.tsx)
Router defines /chat/:channelId at router.tsx:33, but the chat page never calls useParams(). It uses local state activeChannelId instead. Direct links to /chat/some-channel-id won't select the correct channel. Fix: read channelId from useParams() and use it to initialize activeChannelId.

Dead Code (2)

3. use-swarm-config.ts — Byte-for-byte duplicate of use-config-api.ts. The barrel index.ts exports from use-config-api.ts, while config/page.tsx:4 imports from use-swarm-config.ts. Delete one and fix the import.

4. content-preview.ts (208 lines) — Not imported anywhere in the codebase. Should be removed or connected.

Suggestions (non-blocking)

5. No 404 route — Missing path: "*" catch-all in router.tsx. Unmatched URLs show a blank page.

6. Triple-maintained navigation — Routes defined independently in app-sidebar.tsx:28-39, use-keyboard-shortcuts.ts:4-15, and command-menu.tsx:28-39. Consider extracting to a shared NAV_ITEMS constant.

7. Chat agentMap not memoizedchat/page.tsx:142-143 creates a new Map on every render. Wrap in useMemo.

8. Hardcoded dark theme in chart tooltips — Usage page (usage/page.tsx) hardcodes background: "#18181b" and border: "1px solid #333" in Recharts tooltip styles. These won't adapt to light mode.

9. Large chunks — Build warns about 3 chunks > 500 KB: AG Grid (874 KB), main (510 KB), usage/recharts (390 KB). Consider manualChunks in vite config to split vendor libraries.

Positive Notes

  • Clean project structure with proper separation of concerns
  • All 14 page routes lazy-loaded with shared Suspense boundary
  • Consistent react-query patterns with proper cache invalidation
  • AG Grid uses specific module imports (not AllCommunityModule) — good for tree-shaking
  • ConfigGuard + URL parameter auto-connect is a nice UX touch
  • Error boundary with recovery actions
  • Command palette with entity search (agents, tasks, epics)
  • Types are comprehensive and well-defined (357 lines)
  • Proper dev proxy configuration in Vite

Verdict: REQUEST_CHANGES — Fix the 2 bugs and clean up the 2 dead files, then this is ready to ship.

Reviewed by Reviewer (a09d19a4)

@desplega-bot
Copy link
Contributor Author

UI Screenshots - Agent Swarm Dashboard (PR #88)

Automated QA screenshots of the new UI from the ui-revamp-phase1 branch. All pages captured via headless browser automation.

Agents Tab (Landing Page - Light Mode)

Agents Tab

Tasks Tab

Tasks Tab

Epics Tab

Epics Tab

Chat Tab

Chat Tab

Services Tab

Services Tab

Schedules Tab

Schedules Tab

Usage Tab

Usage Tab

Config Tab

Config Tab

Repos Tab

Repos Tab

Dark Mode (Agents Tab)

Dark Mode

Settings Modal

Settings Modal


Notes

  • All screenshots taken against a fresh local database (empty state) — shows the UI structure and layout clearly
  • UI has 9 main tabs: Agents, Tasks, Epics, Chat, Services, Schedules, Usage, Config, Repos
  • Dark/light mode toggle works via the sun/moon button in the header
  • Settings modal provides API URL and API Key configuration
  • The UI version shown: v1.26.0
  • Screenshot URLs are presigned R2 URLs valid for 7 days

🤖 Automated QA by Tester agent (worker-201b92d8)

- ConfigEntryDialog: add useEffect to sync form state when editEntry prop
  changes, fixing stale data when clicking different Edit buttons
- ChatPage: read channelId from URL params so /chat/:channelId links work
- Delete use-swarm-config.ts (duplicate of use-config-api.ts)
- Delete content-preview.ts (208 lines, never imported)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tarasyarema
Copy link
Contributor

dude the url you tested is the old uo, you should run it locally and browser that one! cc @desplega-bot

@desplega-bot
Copy link
Contributor Author

Got it — the previous screenshots were from the wrong URL. Re-running the test against the local new-ui/ dev server now. Will post updated screenshots shortly.

@desplega-bot
Copy link
Contributor Author

NEW UI Screenshots — new-ui/ (shadcn/ui + AG Grid + react-router)

Note: These screenshots are from the correct new-ui/ directory (port 5274), NOT the old ui/ directory. Previous comment had screenshots from the wrong directory.

Dashboard

Dashboard

Agents

Agents

Tasks

Tasks

Epics

Epics

Chat

Chat

Services

Services

Schedules

Schedules

Usage

Usage

Config / Settings

Config

Repos

Repos

Dark Mode (Dashboard)

Dark Mode

Config — Connection Form (pre-connect)

Connection Form


Key Observations

  • Stack: React 19 + Vite 7 + shadcn/ui + Tailwind CSS v4 + react-router-dom
  • Layout: Sidebar navigation with collapsible toggle, breadcrumbs, and top status bar
  • Pages: Dashboard, Agents, Tasks, Epics, Chat, Services, Schedules, Usage, Config, Repos (10 pages)
  • Features: Dark/light theme toggle, API connection management with auto-connect URL params (?apiUrl=&apiKey=), Command Palette (Cmd+K), config guard redirects to /config if not authenticated
  • Config page has both connection settings and swarm config management (add/edit/delete entries with scope filtering)
  • Screenshot URLs are presigned R2 URLs valid for 7 days

🤖 Automated QA by Tester agent (worker-201b92d8) — using new-ui/ directory

@tarasyarema
Copy link
Contributor

few notes @desplega-bot

  1. Seems like light and dark mode are swapped
  2. Side-panel items seem to not be selected when moving from one section to another
  3. Make sure to use the config with url https://agent-swarm-mcp.desplega.sh and key pk_830... so I can see some data (check using qa-use info --show-secrets)
  4. Show detail page of agent, task and epic
  5. Mobile screenshots too pls

@desplega-bot
Copy link
Contributor Author

Thanks for the feedback! Working on all 5 items now:

  1. Light/dark mode swap — fixing
  2. Side-panel selection — fixing
  3. Production config — will test with https://agent-swarm-mcp.desplega.sh
  4. Detail pages — implementing agent, task, and epic detail views
  5. Mobile screenshots — will capture after fixes

Will post updated screenshots when ready.

Theme: restructured CSS to standard Tailwind v4 + shadcn pattern where
@theme has light base colors and .dark/.dark * overrides to dark. This
fixes the swap caused by dark: variant classes (from shadcn components)
conflicting with a dark-by-default @theme base. ThemeProvider now only
toggles the .dark class — no .light class needed.

Sidebar: pass isActive prop from route matching via useLocation() to
SidebarMenuButton, so data-[active=true] styling applies correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tarasyarema tarasyarema merged commit 7f74ddc into main Feb 25, 2026
6 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.

2 participants