docs: record approved single-project UI and background worker plan
This commit is contained in:
1 parent
62e7114211
commit
a93e40ed2a
2 files changed
+57
No files matched your search
@@ -0,0 +1,44 @@
|
||||
# Single-project UI and background worker implementation plan
|
||||
|
||||
> For agentic workers: use subagent-driven-development for the backend task and inline implementation for the UI; review the combined branch before integration.
|
||||
|
||||
Goal: implement the approved single-project workflow and research desktop backend without packaging.
|
||||
|
||||
Architecture: one context read replaces repeated multi-project UI queries; independent process supervision contains CAD automation. Existing persistence and execution safeguards remain authoritative.
|
||||
|
||||
Tech stack: Python 3.12, PySide6, SQLite, Win32/COM, ASCII VBS.
|
||||
|
||||
Spec: docs/superpowers/specs/2026-10-14-single-project-ui-background-design.md
|
||||
|
||||
## Global constraints
|
||||
|
||||
- Keep V1.1.0, do not package; commit each verified feature block.
|
||||
- One immutable bound project per new task; preserve historical data.
|
||||
- Default tests remain fast; no full legacy suite or production CAD writes.
|
||||
- No background claim without native validation; private desktop stays opt-in research.
|
||||
- No empty target fallback, unsaved-plan execution, unrelated CAD attachment or unsafe write interruption.
|
||||
|
||||
## Task 1 — single-project context and isolated worker
|
||||
|
||||
Owned by backend implementer: service.py; new project_context.py, isolated_desktop.py, isolated_worker.py; necessary quick_run/native_helper/VBS boundary edits; tests/v1_1/test_project_context.py and test_isolated_desktop.py. No UI files.
|
||||
|
||||
- [ ] Prove bound context returns one project and cached task facade; reject mutable project membership on bound tasks. Include empty/disabled target plans and legacy read-only context cases.
|
||||
- [ ] Produce service.task_context(task_id), service.refresh_bound_project(task_id), and immutable ProjectTaskContext(task, project, rules, targets, progress, phase, has_evidence, interrupted, legacy).
|
||||
- [ ] Build opt-in private desktop worker using CreateDesktop, STARTUPINFO.lpDesktop, owned process tree and versioned request/evidence. Reject existing unrelated CAD, verify CAD PID/project before COM use and retain safe write-boundary pause semantics. Give root exact API for UI context and backend integration.
|
||||
- [ ] Run focused context/worker safety tests, write task report, commit only owned files.
|
||||
|
||||
## Task 2 — UI cleanup and search
|
||||
|
||||
Owned by root: ui/main_window.py, run_panel.py, project_plan.py, target_table.py, task_list.py; new project_summary.py and execution_state.py if useful; UI tests and docs.
|
||||
|
||||
- [ ] Add behavior checks for no multi-project controls, current-task scope, Find/Next/Clear preserving hidden plan rows and hidden drafts blocking group execution.
|
||||
- [ ] Replace task-details project table with immutable summary and refresh; remove manual-run/project-select code and use ProjectTaskContext for local gates.
|
||||
- [ ] Keep task creation modal; add cached plan search, clear/next, correct visible-row bulk operations and ordered task list.
|
||||
- [ ] Wire execution/retry/recovery/pause controls with consistent labels and one confirmation summary; prevent conflicting edits while workers run.
|
||||
- [ ] Run focused UI tests, inspect offscreen screenshot, document workflow and commit.
|
||||
|
||||
## Task 3 — review and integration
|
||||
|
||||
- [ ] Review combined diffs for target scope, stale UI callbacks, locks, legacy handling and isolated desktop lifecycle. Fix material findings with focused checks.
|
||||
- [ ] Run default behavior suite plus only impacted safety modules; record counts/times and limitations. No packaging.
|
||||
- [ ] Commit review fixes and integrate verified changes locally without overwriting user edits.
|
||||
@@ -0,0 +1,13 @@
|
||||
# Single-project task UI and isolated execution
|
||||
|
||||
User approved this direction on 2026-10-14. This is continued V1.1.0 source development; do not build or package. Commit verified functional increments promptly.
|
||||
|
||||
- New-task dialog scans a root and selects projects; every resulting task owns one immutable project. Task details contain a project summary, refresh action, rules, targets and execution controls, with no project list/select-all/filter/skip/manual-run controls.
|
||||
- Existing data is preserved. Multi-project historical tasks remain inspectable but are read-only in the new single-project UI; create project tasks through the dialog for further execution.
|
||||
- Read task context once per refresh, then compute gates locally. UI changes and table search must not reread SQLite/CAD or regenerate log content unnecessarily. A per-task service facade must be reused without mixing evidence roots.
|
||||
- Target search matches RefDes, UID, old/new part, sheet/schematic and Values case-insensitively; explicit Find filters cached table data, Enter runs Find, Next locates another match, Clear restores all. Filters never remove rows from saved plans. Bulk/select actions operate visible rows while preserving hidden rows.
|
||||
- Execution commands are Execute current task, Execute batch in order, Pause at safe boundary, Retry failed items and Reconcile interruption. Scope, pending unsaved plans, lifecycle and active worker guards must be coherent. No backup-failure bypass control in the streamlined UI.
|
||||
- Desktop isolation is an explicit research backend, not automatically enabled. It creates and owns a private desktop/process tree, validates CAD PID/project identity and reuses the existing UID/Library Wins/backup/save/readback safeguards. Never attach an unrelated CAD instance or fall back to the input desktop. No production CAD writes for validation.
|
||||
- Normal workflows retain direct mapping/target edits, custom Value and default-on editable NC, plus optional spreadsheet import draft followed by explicit save.
|
||||
|
||||
Architecture: service produces a frozen ProjectTaskContext; task bindings remain store-compatible. UI is separated into project summary, plan/search table and execution state presentation. Native isolated worker is an independent backend boundary with evidence and cleanup. Safety checks remain at services and native code as well as UI gates.
|
||||
Reference in new issue
Block a user