Files
dxdesigner-part-replacement/docs/superpowers/plans/v1.1.0-task-2-brief.md
T

38 lines
2.7 KiB
Markdown

# V1.1.0 Project Tasks Implementation Plan
> **For agentic workers:** Use superpowers:subagent-driven-development task-by-task. Steps use checkbox syntax.
**Goal:** Iterate the existing replacement application with single-project tasks, editable per-component plans, optional Excel imports and serial task execution.
**Architecture:** Reuse the existing desktop service/store and native replacement helper. Add focused plan/inventory/queue modules with stable target identities and transactional persistence. Keep historic jobs and an explicit legacy test entry point.
**Tech Stack:** Python 3.12, SQLite, PySide6, ASCII VBScript; openpyxl for XLSX files.
**Spec:** docs/superpowers/specs/2026-10-14-v1.1.0-project-tasks-design.md
## Global Constraints
- Version 1.1.0; retain existing task view and direct editing.
- Each directory-created task owns exactly one .prj; historical tasks are preserved.
- Explicit empty targets never mean all matches.
- UID + schematic + sheet + expected RefDes + old Part Number identify targets.
- Default NC synchronization remains on and is editable in UI/import; independent /NC only.
- Existing Replace Part + Library Wins, backup and saved readback remain required.
- No production CAD writes for interface research or tests.
- Default tests are fast behavior tests; historic regressions are explicit and preserved.
---
## Task 2: Cross-task scheduler and existing UI integration
Files: task_queue.py; ui/main_window.py, task_list.py, mapping_table.py; tests/v1_1/test_task_queue.py, test_project_task_ui.py.
Consumed APIs: Task 1 report; existing service.execute_quick_run_queue/quick_run_progress and safe pause. Produced APIs: fixed ordered task queue runner and UI directory wizard/inventory target table/Excel optional entry points.
- [ ] Write failing scheduler test with fake runner logging starts/ends: A completes before B starts; pause leaves B unstarted; uncertain A prevents B; safe ordinary A failure allows B and summary records both.
- [ ] Implement scheduler with per-task evidence paths and fixed IDs/plan fingerprints; reject same-project concurrent tasks, preserve active task evidence on resume.
- [ ] Add directory scanner/create dialog to existing New action with project checkboxes and async scan; existing edit/name notes and historical view survive. Show counts and execution order, support ordering and group start/pause.
- [ ] Add Collect Targets action and editable target table: per row enabled/new part/custom Value/NC controls; preserve existing rule dialog/full-match path. Excel import/export optional actions use same plan validation; blank typed target lists rejected rather than matching all.
- [ ] Verify Qt widgets with offscreen smoke interactions and scheduler failure/lock tests. Commit after tests pass.