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 @@
# Manual Ticket Queue Management
**Track ID:** ticket_queue_mgmt_20260306
**Status:** Planned
**See Also:**
- [Spec](./spec.md)
- [Plan](./plan.md)

View File

@@ -0,0 +1,9 @@
{
"id": "ticket_queue_mgmt_20260306",
"name": "Manual Ticket Queue Management",
"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,131 @@
# Implementation Plan: Manual Ticket Queue Management (ticket_queue_mgmt_20260306)
> **Reference:** [Spec](./spec.md) | [Architecture Guide](../../../docs/guide_architecture.md)
## Phase 1: Priority Field
Focus: Add priority to Ticket model
- [x] Task 1.1: Initialize MMA Environment
- Run `activate_skill mma-orchestrator` before starting
- [x] Task 1.2: Add priority field to Ticket (035c74e)
- WHERE: `src/models.py` `Ticket` dataclass
- WHAT: Add `priority: str = "medium"` field
- HOW:
```python
@dataclass
class Ticket:
# ... existing fields ...
priority: str = "medium" # "high" | "medium" | "low"
```
- CODE STYLE: 1-space indentation
- [x] Task 1.3: Update Ticket serialization (035c74e)
- WHERE: `src/models.py` `Ticket.to_dict()` and `from_dict()`
- WHAT: Include priority in serialization
- HOW: Add `priority` to dict conversion
## Phase 2: Priority UI
Focus: Add priority dropdown to ticket display
- [x] Task 2.1: Add priority dropdown (a22603d)
- WHERE: `src/gui_2.py` ticket rendering
- WHAT: Dropdown for priority selection
- HOW:
```python
priorities = ["high", "medium", "low"]
current_idx = priorities.index(ticket.priority) if ticket.priority in priorities else 1
if imgui.begin_combo("Priority", priorities[current_idx]):
for i, p in enumerate(priorities):
if imgui.selectable(p, i == current_idx):
ticket.priority = p
imgui.end_combo()
```
- [x] Task 2.2: Add color coding (a22603d)
- WHERE: `src/gui_2.py` ticket rendering
- WHAT: Color-code priority display
- HOW:
```python
priority_colors = {"high": vec4(255, 100, 100, 255), "medium": vec4(255, 200, 100, 255), "low": vec4(150, 150, 150, 255)}
imgui.text_colored(priority_colors.get(ticket.priority, vec4(200, 200, 200, 255)), f"[{ticket.priority.upper()}]")
```
## Phase 3: Multi-Select
Focus: Enable ticket selection for bulk operations
- [x] Task 3.1: Add selection state (a22603d)
- WHERE: `src/gui_2.py` or `src/app_controller.py`
- WHAT: Track selected ticket IDs
- HOW:
```python
self._selected_tickets: set[str] = set()
```
- [x] Task 3.2: Add checkbox per ticket (a22603d)
- WHERE: `src/gui_2.py` ticket list rendering
- WHAT: Checkbox for selection
- HOW:
```python
selected = ticket.id in self._selected_tickets
if imgui.checkbox(f"##select_{ticket.id}", selected):
if selected:
self._selected_tickets.discard(ticket.id)
else:
self._selected_tickets.add(ticket.id)
imgui.same_line()
```
- [x] Task 3.3: Add select all/none buttons (a22603d)
- WHERE: `src/gui_2.py` ticket list header
- WHAT: Buttons to select/deselect all
- HOW:
```python
if imgui.button("Select All"):
self._selected_tickets = {t.id for t in self.track.tickets}
imgui.same_line()
if imgui.button("Select None"):
self._selected_tickets.clear()
```
## Phase 4: Bulk Actions
Focus: Execute bulk operations on selected tickets
- [x] Task 4.1: Add bulk action buttons (a22603d)
- WHERE: `src/gui_2.py` ticket list area
- WHAT: Execute, Skip, Block buttons
- HOW:
```python
if imgui.button("Bulk Execute"):
for tid in self._selected_tickets:
self.engine.approve_task(tid)
imgui.same_line()
if imgui.button("Bulk Skip"):
for tid in self._selected_tickets:
self.engine.update_task_status(tid, "completed")
imgui.same_line()
if imgui.button("Bulk Block"):
for tid in self._selected_tickets:
self.engine.update_task_status(tid, "blocked")
```
## Phase 5: Drag-Drop (Optional)
Focus: Allow ticket reordering
- [x] Task 5.1: Implement drag-drop reordering (a22603d)
- WHERE: `src/gui_2.py` ticket list
- WHAT: Drag tickets to reorder
- HOW: Use imgui drag-drop API
- SAFETY: Validate DAG after reorder (no dependency violations)
## Phase 6: Testing
Focus: Verify all functionality
- [x] Task 6.1: Write unit tests (a22603d)
- WHERE: `tests/test_ticket_queue.py` (new file)
- WHAT: Test priority serialization, bulk operations
- HOW: Create mock tickets, verify state changes
- [x] Task 6.2: Conductor - Phase Verification (a22603d)
- Run: `uv run pytest tests/test_ticket_queue.py -v`
- Manual: Verify UI controls work

View File

@@ -0,0 +1,112 @@
# Track Specification: Manual Ticket Queue Management (ticket_queue_mgmt_20260306)
## Overview
Allow user to manually reorder, prioritize, or requeue tickets in the DAG. Add drag-drop reordering, priority tags, and bulk selection for execute/skip/block operations.
## Current State Audit
### Already Implemented (DO NOT re-implement)
#### Ticket Model (src/models.py)
- **`Ticket` dataclass**: Has `status`, `depends_on`, but no `priority` field
- **`mark_blocked(reason)`**: Sets status to blocked with reason
- **`mark_complete()`**: Sets status to completed
#### DAG Engine (src/dag_engine.py)
- **`TrackDAG`**: Manages ticket dependency graph
- **`get_ready_tasks()`**: Returns tasks with satisfied dependencies
- **`update_task_status()`**: Updates ticket status
- **`has_cycle()`**: Validates DAG
### Gaps to Fill (This Track's Scope)
- No `priority` field on Ticket
- No drag-drop reordering in GUI
- No multi-select for bulk operations
- No bulk execute/skip/block actions
## Architectural Constraints
### DAG Validity
- Reordering MUST NOT violate dependencies
- Cannot move ticket before its dependencies
- `depends_on` relationships preserved
### Atomic Operations
- Bulk operations apply to all selected tickets atomically
- Partial failure rolls back all changes
## Architecture Reference
### Key Integration Points
| File | Lines | Purpose |
|------|-------|---------|
| `src/models.py` | 30-50 | `Ticket` - add priority field |
| `src/gui_2.py` | 2650-2750 | Ticket display - add drag-drop |
| `src/dag_engine.py` | 50-80 | Status updates |
### Proposed Ticket Enhancement
```python
@dataclass
class Ticket:
# ... existing fields ...
priority: str = "medium" # "high" | "medium" | "low"
```
## Functional Requirements
### FR1: Priority Field
- Add `priority: str = "medium"` to Ticket dataclass
- Values: "high", "medium", "low"
- Persist in track state
### FR2: Priority UI
- Dropdown or button group per ticket
- Color-coded: high=red, medium=yellow, low=gray
- Save to state on change
### FR3: Drag-Drop Reordering
- Drag ticket to reorder in list
- Drop validates DAG (no dependency violation)
- Show error if invalid position
### FR4: Multi-Select
- Checkbox per ticket for selection
- Select all / deselect all buttons
- Track selected ticket IDs
### FR5: Bulk Actions
- Execute: Mark all selected as ready
- Skip: Mark all selected as completed
- Block: Mark all selected as blocked
## Non-Functional Requirements
| Requirement | Constraint |
|-------------|------------|
| Response Time | <100ms for drag-drop validation |
| Persistence | Priority saved to state.toml |
## Testing Requirements
### Unit Tests
- Test priority field serialization
- Test DAG validation on reorder
### Integration Tests
- Drag-drop tickets, verify order changes
- Bulk block tickets, verify all blocked
## Out of Scope
- Automatic priority assignment
- Priority-based auto-scheduling
- Cross-track ticket movement
## Acceptance Criteria
- [ ] Priority field added to Ticket
- [ ] Priority dropdown works in UI
- [ ] Drag-drop reordering functional
- [ ] DAG validity enforced on drop
- [ ] Multi-select with checkboxes
- [ ] Bulk execute/skip/block works
- [ ] 1-space indentation maintained