-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
P3-post-betaLow priority - can wait until after beta (v2.0)Low priority - can wait until after beta (v2.0)architectureSystem architecture and design patternsSystem architecture and design patternsux
Description
Problem
Dashboard.tsx at 934 lines handles 6 tabs, 20+ state variables, and 10+ effects. Too much responsibility in one component.
Current State
- File:
web-ui/src/components/Dashboard.tsx(~934 lines) - Manages: Overview, Tasks, Quality Gates, Checkpoints, Metrics, Context tabs
- Contains: Complex conditional rendering, tab-specific logic mixed together
Impact
- Hard to maintain and extend
- Performance concerns with unnecessary re-renders
- New developers overwhelmed by file size
- Testing requires mocking too much state
Required Decomposition
New Structure
web-ui/src/components/dashboard/
├── Dashboard.tsx # Shell with tab navigation (~200 lines)
├── DashboardOverview.tsx # Overview tab content
├── DashboardTasks.tsx # Tasks tab (existing TaskList integration)
├── DashboardQualityGates.tsx # Quality gates tab
├── DashboardCheckpoints.tsx # Checkpoints tab
├── DashboardMetrics.tsx # Metrics tab
└── DashboardContext.tsx # Context tab
Shared State
- Keep
AgentStateContextfor shared state - Each tab component subscribes to what it needs
- Dashboard shell manages active tab only
Acceptance Criteria
- Dashboard.tsx reduced to <250 lines
- Each tab component is independently testable
- Tab switching performance unchanged
- All existing tests pass
- No visual regression
Committee Report Reference
Frontend Architect rated Dashboard as "Too High" complexity. Quote: "6 tabs, 20+ state variables, 10+ effects... Should be split."
coderabbitai
Metadata
Metadata
Assignees
Labels
P3-post-betaLow priority - can wait until after beta (v2.0)Low priority - can wait until after beta (v2.0)architectureSystem architecture and design patternsSystem architecture and design patternsux