archiving tracks

This commit is contained in:
2026-03-08 13:29:53 -04:00
parent b44c0f42cd
commit 66338b3ba0
83 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
# Track Progress Visualization
**Track ID:** track_progress_viz_20260306
**Status:** Planned
**See Also:**
- [Spec](./spec.md)
- [Plan](./plan.md)

View File

@@ -0,0 +1,9 @@
{
"id": "track_progress_viz_20260306",
"name": "Track Progress Visualization",
"status": "planned",
"created_at": "2026-03-06T00:00:00Z",
"updated_at": "2026-03-06T00:00:00Z",
"type": "feature",
"priority": "medium"
}

View File

@@ -0,0 +1,95 @@
# Implementation Plan: Track Progress Visualization (track_progress_viz_20260306)
> **Reference:** [Spec](./spec.md) | [Architecture Guide](../../../docs/guide_architecture.md)
## Phase 1: Progress Calculation
Focus: Calculate progress metrics from ticket states
- [x] Task 1.1: Initialize MMA Environment (34673ee)
- Run `activate_skill mma-orchestrator` before starting
- [x] Task 1.2: Implement progress calculation function (87902d8)
- WHERE: `src/gui_2.py` or helper in `src/project_manager.py`
- WHAT: Calculate completion percentage from tickets
- HOW:
```python
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}
```
## Phase 2: Progress Bar Rendering
Focus: Display visual progress bar
- [x] 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:
```python
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
## Phase 3: Ticket Breakdown Display
Focus: Show status breakdown
- [x] Task 3.1: Add status breakdown text (1e188fd)
- WHERE: `src/gui_2.py` `_render_mma_dashboard()`
- WHAT: Show counts per status
- HOW:
```python
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']}")
```
## Phase 4: ETA Estimation
Focus: Estimate time remaining
- [x] Task 4.1: Track ticket completion times (1e188fd)
- WHERE: `src/gui_2.py` or `src/app_controller.py`
- WHAT: Track average time per completed ticket
- HOW:
```python
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
```
- [x] Task 4.2: Calculate and display ETA (1e188fd)
- WHERE: `src/gui_2.py`
- WHAT: Show estimated time remaining
- HOW:
```python
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)")
```
## Phase 5: Testing
Focus: Verify all functionality
- [x] 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
- [x] Task 5.2: Conductor - Phase Verification (1e188fd)
- Run: `uv run pytest tests/test_progress_viz.py -v`
- Manual: Verify progress bar displays correctly

View File

@@ -0,0 +1,111 @@
# Track Specification: Track Progress Visualization (track_progress_viz_20260306)
## Overview
Progress bars and percentage completion for active tracks and tickets. Better visualization of DAG execution state.
## Current State Audit
### Already Implemented (DO NOT re-implement)
#### Track Model (src/models.py)
- **`Track` dataclass**: Has `tickets: list[Ticket]` field
- **`Ticket.status`**: "todo" | "in_progress" | "completed" | "blocked"
#### Track Listing (src/project_manager.py)
- **`get_all_tracks()`**: Returns list of track metadata with progress
- **Progress calculation exists**: Counts completed vs total tickets
#### DAG Engine (src/dag_engine.py)
- **`TrackDAG`**: Manages ticket dependency graph
- **Status tracking via `update_task_status()`**
### Gaps to Fill (This Track's Scope)
- No visual progress bar in GUI
- No percentage completion display
- No ETA estimation
- No ticket breakdown display
## Architectural Constraints
### Accurate State
- Progress MUST reflect actual ticket status
- Count completed, in_progress, blocked, todo separately
### Efficient Updates
- Status changes trigger immediate UI update
- No polling - event-driven via MMA state updates
## Architecture Reference
### Key Integration Points
| File | Lines | Purpose |
|------|-------|---------|
| `src/gui_2.py` | 2650-2750 | MMA Dashboard - add progress display |
| `src/project_manager.py` | 289-320 | `get_all_tracks()` - progress data |
| `src/dag_engine.py` | 50-80 | Status tracking |
### Progress Calculation
```python
def calculate_progress(tickets: list[Ticket]) -> dict:
total = len(tickets)
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) if total > 0 else 0
return {
"total": total, "completed": completed, "in_progress": in_progress,
"blocked": blocked, "todo": todo, "percentage": percentage
}
```
## Functional Requirements
### FR1: Progress Bar
- Visual progress bar using `imgui.progress_bar()`
- Show 0-100% completion
- Color based on progress (red < 25%, yellow < 75%, green >= 75%)
### FR2: Percentage Text
- Display "X% complete" below bar
- Show "X/Y tickets completed"
### FR3: Ticket Breakdown
- Show counts: completed, in_progress, blocked, todo
- Use colored indicators per status
### FR4: ETA Estimation
- Track average time per completed ticket
- Estimate remaining time: `avg_time * remaining_tickets`
- Display as "ETA: ~Xm"
## Non-Functional Requirements
| Requirement | Constraint |
|-------------|------------|
| Update Latency | <100ms after status change |
| Memory | <100 bytes for ETA state |
## Testing Requirements
### Unit Tests
- Test progress calculation accuracy
- Test ETA estimation logic
### Integration Tests
- Complete tickets, verify progress updates
- Verify ETA recalculates
## Out of Scope
- Historical progress tracking
- Progress export
- Multi-track comparison
## Acceptance Criteria
- [ ] Progress bar renders correctly
- [ ] Percentage accurate (X/Y completed)
- [ ] Ticket breakdown displayed
- [ ] ETA estimation works
- [ ] Updates on ticket status change
- [ ] 1-space indentation maintained