mirror of
https://github.com/BradGroux/veritas-kanban.git
synced 2026-09-07 08:55:57 +00:00
- fix(REL-001): Add withFileLock to 5 unguarded services - fix(REL-002): Replace plain objects with useRef in useFeatureSettings - fix(REL-003): Only clear dirty state on mutation success in useDebouncedSave - fix(REL-004): Fix ActivityFeed knownIdsRef stale reference - fix(REL-005): Fix ArchiveSidebar useMemo used as useEffect - fix(REL-006): Fix ConflictResolver render-time setState - fix(REL-007): Fix useSortableList stale rollback + array mutation - feat(A11Y-001): Add aria-labels to icon-only buttons - feat(A11Y-002): Add keyboard support to clickable divs - feat(#41): Lessons Learned Field - UI component + API endpoint Co-authored-by: Veritas <veritas@digitalmeld.io>
5.6 KiB
5.6 KiB
Design: Parallel Work Stream Visualization
Status: Design Draft GitHub Issue: #43 Priority: Medium
Overview
Add a timeline/swimlane view to visualize parallel task execution, showing which tasks ran concurrently, how long each took, and where bottlenecks occurred.
Use Cases
- Multi-agent sprint review — After spawning 12 parallel agents, see which completed first, where time was spent
- Bottleneck detection — Identify tasks that blocked others or took unexpectedly long
- Capacity planning — Understand actual parallelism achieved vs theoretical max
- Sprint retrospective — Visualize sprint execution for process improvement
Proposed Architecture
Data Model
The timeline view will use existing data:
task.timeTracking.entries[]— Start/end times per tasktask.status— Current statetask.agent— Assigned agentactivity-log.json— Status change timestamps
New fields (optional):
task.parallelismGroup— Group related parallel taskstask.dependsOn[]— Explicit dependencies for visualization
API Endpoints
// Timeline data for a date range
GET /api/analytics/timeline
Query: { from: ISO, to: ISO, agent?: string, project?: string }
Response: {
tasks: [{
id: string,
title: string,
agent: string,
segments: [{ start: ISO, end: ISO, status: string }]
}],
metrics: {
parallelismFactor: number,
throughput: number,
avgLeadTime: number
}
}
// Aggregate metrics for a sprint
GET /api/analytics/metrics
Query: { sprint?: string, from?: ISO, to?: ISO }
Response: {
tasksCompleted: number,
avgDuration: number,
parallelismPeak: number,
agentUtilization: Record<string, number>
}
UI Components
┌─────────────────────────────────────────────────────────────┐
│ [Kanban] [Timeline] [Dashboard] 🔍 Filter 📅 │
├─────────────────────────────────────────────────────────────┤
│ 2026-02-05 8:00 9:00 10:00 11:00 │
├─────────────────────────────────────────────────────────────┤
│ veritas │███████████████████████│ │
│ │ REL-001 │ │
├─────────────────────────────────────────────────────────────┤
│ codex-1 │ │█████│ │
│ │ │REL-2│ │
├─────────────────────────────────────────────────────────────┤
│ codex-2 │ │████████│ │
│ │ │ REL-3 │ │
├─────────────────────────────────────────────────────────────┤
│ codex-3 │ │██████████████│ │
│ │ │ REL-4 │ │
└─────────────────────────────────────────────────────────────┘
Components needed:
TimelinePage.tsx— New page at/timelineTimelineChart.tsx— Gantt-style visualization (use @nivo/gantt or custom)TimelineFilters.tsx— Date range, agent, project filtersParallelismMetrics.tsx— Key metrics cards
Implementation Phases
Phase 1: Data Layer (2-3 hours)
- Add timeline API endpoint
- Aggregate time tracking data into segments
- Calculate parallelism metrics
Phase 2: Basic UI (4-6 hours)
- Create TimelinePage with navigation
- Implement basic Gantt chart (horizontal bars)
- Add date range picker
Phase 3: Polish (2-4 hours)
- Add swimlanes per agent
- Color-code by task type/status
- Zoom levels (hour/day/week)
- Hover tooltips with task details
Phase 4: Integration (2 hours)
- Link from task cards to timeline position
- Add to dashboard as widget option
Technical Decisions
Chart Library Options:
@nivo/gantt— React-native, good for static Gantt chartsreact-gantt-schedule-timeline-calendar— Feature-rich but heavy- Custom with D3 — Maximum flexibility, more work
- CSS Grid + custom — Simplest, good for MVP
Recommendation: Start with CSS Grid + custom for MVP, migrate to @nivo if needed.
Dependencies
- Existing time tracking data must be populated
- Status history service provides state change timestamps
Risks
- Data gaps — Tasks without time tracking won't appear
- Performance — Large date ranges with many tasks may be slow
- Complexity — Full Gantt features (drag, resize, dependencies) add significant scope
Success Metrics
- Users can identify which tasks ran in parallel
- Average parallelism factor is visible
- Sprint retrospectives use the timeline view