# Integrate web-agent Project Control work

audience: AI coding agents first.

status: ACTIVE
task IDs: #1
source request: Owner said: “this is a work a web-agent made. integrate it and push to main”. Owner clarified goal: “complete integration push deploy”. After delivery, owner corrected acceptance: expected an “Add Project” button on `/projects` and needs an actual project-onboarding path. Owner requires missing-GOLIVE handling: add project normally; GOLIVE card shows `Setup` CTA; same onboarding modal offers postpone or immediate agent launch; launch lets user choose CLI, account, model, and effort; agent recommends criteria; criteria render as default-checked checkboxes; user may deselect; selected criteria become canonical `GOLIVE.md`; agent builds checker; separate reviewer reviews and fixes; progress replaces GOLIVE numbers and drills into existing agent observability. During agent-observability design, owner required recovery-first handling: because `DiffViewer` was found in submitted work, inspect and resume all valid preserved implementation instead of rebuilding equivalent work. Treat `/home/user/Projects/overdeck/temp-user/project-onboarding/overdeck-project-control-implementation/` as submitted implementation evidence, not trusted repository state.

## Outcome

Integrate only valid, current web-agent changes into Overdeck; fix conflicts or defects; verify affected surfaces; deploy owner-visible runtime; push completed work to `main`.

## Acceptance criteria

- Inventory package bytes, deletions, base assumptions, and verification receipts.
- Reconcile every proposed path against current `main`; NEVER overwrite newer work blindly.
- Apply only changes that remain correct and requested.
- Read mandatory scoped instructions before touching affected areas.
- Run required focused tests, typechecks, builds, and factory suite when factory machinery changes.
- Resolve every warning or failure.
- Independently review final diff.
- Deploy through canonical path and prove installed behavior.
- Add a visible `Add Project` control on `/projects` and provide an end-to-end onboarding flow that persists a validated local repository path into collector configuration, refreshes project data, and reports success/failure honestly.
- Recover every valid preserved component or implementation seam before authoring replacement code. Reconcile `DiffViewer` against current deck-ui conventions, tests, tokens, gallery registration, and the agent-activity use case.

## Preserved WIP

- Submitted package remains unchanged at `/home/user/Projects/overdeck/temp-user/project-onboarding/`.
- Shared checkout pre-existing changes remain untouched.
- Work executes only in `.worktrees/integrate-web-agent-project-control-2`, branch `wt/integrate-web-agent-project-control-2`, base `b6040af91`.

## Constraints

- Package reports collector, deck-ui, and web checks exited `127`; prior verification is incomplete and MUST NOT be trusted as green.
- Package spans web/UI, harness, monitor, buildbox, collector, and root project files; apply scoped project rules per path.
- NEVER use package `apply.sh` until its behavior and every target are reconciled against current main.
- Owner explicitly authorized complete integration, push, and deployment.

## Execution steps

1. Extract exact path inventory, package provenance, apply behavior, and captured failures.
2. Compare package final bytes with current `main`; classify additions, stale overwrites, deletions, and conflicts.
3. Read scoped instructions and relevant existing plans/specs for retained changes.
4. Integrate surgically; repair defects and update tests.
5. Run required focused and repository gates with zero ignored signals.
6. Run independent pre-ship review; fix confirmed findings; reverify.
7. Deploy and prove owner-visible behavior.
8. Commit, reconcile latest `origin/main`, push `main`, and confirm remote receipt.

## Current receipt

- 2026-08-13: task #1 active in main session.
- Guarded worktree `.worktrees/integrate-web-agent-project-control-2` confirmed on branch `wt/integrate-web-agent-project-control-2`, base `b6040af91`.
- Package payload is a broad 485-path checkout snapshot: 430 bytes already equal current main, 49 are stale/different, 2 are unrelated new cursor-orchestrator files, and 4 inventory entries are directories/symlinks without payload bytes.
- Package verification names Project Control source files but neither extracted payload nor ZIP contains them. Current `main` already contains those files through landed commit ancestry; package `apply.sh` would overwrite 49 newer paths and MUST NOT run.
- Current source verification: deck-ui 76 files / 402 tests pass; deck-ui typecheck passes; web build completes including `/projects`; web typecheck reports 0 errors, 0 warnings, 0 hints; permission queue 12 tests pass.
- One dependency-install warning occurred only during concurrent first-run installation (`tsc` bin race). Sequential rerun reused the completed install and all gates passed cleanly; no source or dependency defect remains.
- Independent review found one blocker: bot mention history accepted unbounded time ranges and prompt history. TDD repair now caps time ranges to 52 weeks, database reads to 250 newest messages, and prompt history to 24 KiB while retaining newest fitting messages. Regression tests 2/2 and bot typecheck pass.
- Local deployment completed at source `bbca2df8`; web release reused the matching built release and reports active at `http://127.0.0.1:31337`. Deployment also reported pre-existing uncommitted shim copies in other worktrees; those are unrelated preserved WIP and were not modified.
- 2026-08-14 recovery audit: submitted directory is not a complete checkout. It contains 501 payload files plus a 525-path patch. Against current `origin/main`, payload classification is 385 same, 94 stale/different, 22 new. Broad patch does not apply cleanly because two retired cursor-orchestrator paths are absent; NEVER apply wholesale.
- Preserved implementation is resumable surgically. `DiffViewer.tsx`, `DiffViewer.css`, and `DiffViewer.test.tsx` are complete source artifacts missing from current main; package barrel change is stale and MUST be reconciled rather than copied. Captured deck-ui/web verification never ran (`pnpm` absent, exit 127), so component requires current tests, typecheck, gallery registration, token-law repair, and live integration proof.
- Package status itself marks Project service/API, Project CLI, and Astryx integration incomplete. Verification lists Project UI files not present in extracted payload or ZIP because those files were already integrated separately into main. Resume valid remaining seams; do not treat package status as complete product proof.

## Next executable action

Reconcile preserved `DiffViewer` source as a surgical candidate: compare it with current deck-ui contracts and tokens, retain sound parser/rendering behavior, repair current-law violations, add gallery coverage, run current gates, then expose it to agent-activity Edited rows. Continue inventory of package-marked incomplete Project service/API, CLI, and Astryx seams under this same recovery-first rule.
