3.7 KiB
3.7 KiB
Implementation Plan: Track Progress Visualization (track_progress_viz_20260306)
Reference: Spec | Architecture Guide
Phase 1: Progress Calculation
Focus: Calculate progress metrics from ticket states
-
Task 1.1: Initialize MMA Environment (
34673ee)- Run
activate_skill mma-orchestratorbefore starting
- Run
-
Task 1.2: Implement progress calculation function (
87902d8)- WHERE:
src/gui_2.pyor helper insrc/project_manager.py - WHAT: Calculate completion percentage from tickets
- HOW:
def calculate_track_progress(tickets: list[Ticket]) -> dict: total = len(tickets) if total == 0: return {"percentage": 0, "completed": 0, "total": 0, "in_progress": 0, "blocked": 0, "todo": 0} completed = sum(1 for t in tickets if t.status == "completed") in_progress = sum(1 for t in tickets if t.status == "in_progress") blocked = sum(1 for t in tickets if t.status == "blocked") todo = sum(1 for t in tickets if t.status == "todo") percentage = (completed / total) * 100 return {"percentage": percentage, "completed": completed, "total": total, "in_progress": in_progress, "blocked": blocked, "todo": todo}
- WHERE:
Phase 2: Progress Bar Rendering
Focus: Display visual progress bar
- Task 2.1: Add progress bar to MMA Dashboard (
1e188fd)- WHERE:
src/gui_2.py_render_mma_dashboard() - WHAT: Visual progress bar with percentage
- HOW:
progress = calculate_track_progress(self.track.tickets) imgui.text(f"Progress: {progress['completed']}/{progress['total']} tickets") imgui.progress_bar(progress['percentage'] / 100.0, size=(300, 20)) imgui.same_line() imgui.text(f"{progress['percentage']:.1f}%") - SAFETY: Handle empty ticket list
- WHERE:
Phase 3: Ticket Breakdown Display
Focus: Show status breakdown
- Task 3.1: Add status breakdown text (
1e188fd)- WHERE:
src/gui_2.py_render_mma_dashboard() - WHAT: Show counts per status
- HOW:
imgui.text(f"Completed: {progress['completed']}") imgui.text(f"In Progress: {progress['in_progress']}") imgui.text(f"Blocked: {progress['blocked']}") imgui.text(f"Todo: {progress['todo']}")
- WHERE:
Phase 4: ETA Estimation
Focus: Estimate time remaining
-
Task 4.1: Track ticket completion times (
1e188fd)- WHERE:
src/gui_2.pyorsrc/app_controller.py - WHAT: Track average time per completed ticket
- HOW:
self._ticket_start_times: dict[str, float] = {} self._avg_ticket_time: float = 0.0 self._completed_count: int = 0 # On ticket start: self._ticket_start_times[ticket.id] = time.time() # On ticket complete: elapsed = time.time() - start; update average
- WHERE:
-
Task 4.2: Calculate and display ETA (
1e188fd)- WHERE:
src/gui_2.py - WHAT: Show estimated time remaining
- HOW:
remaining = progress['total'] - progress['completed'] eta_seconds = self._avg_ticket_time * remaining eta_minutes = int(eta_seconds / 60) imgui.text(f"ETA: ~{eta_minutes}m ({remaining} tickets remaining)")
- WHERE:
Phase 5: Testing
Focus: Verify all functionality
-
Task 5.1: Write unit tests for progress calculation (
1e188fd)- WHERE:
tests/test_progress_viz.py(new file) - WHAT: Test percentage calculation, edge cases
- HOW: Create mock tickets with various statuses
- WHERE:
-
Task 5.2: Conductor - Phase Verification (
1e188fd)- Run:
uv run pytest tests/test_progress_viz.py -v - Manual: Verify progress bar displays correctly
- Run: