Files
dxdesigner-part-replacement/docs/superpowers/plans/2026-10-14-single-project-ui-background.md
T

3.4 KiB

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.

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.