LUKE-346: integrate the planning MVP, route the talk key to the open plan, and capture the planning window as Mac evidence

Merged
CH
25d ago
+507-43

Linear: LUKE-346 (integration part; this PR does not close LUKE-346)

What this does

Integration pass over the merged planning MVP (#1729, #1730, #1732–#1737). It fixes the seams found in review, closes one LUKE-340 leftover, makes the planning window part of the Mac evidence run, and records what was and was not validated.

Seams fixed (each with a test that fails without the fix)

  • Switching plans could bind the mic to the plan being left (packages/host/src/compose-planning.ts). planning.open used to wait for the old plan's call to close before it made the new plan active. A mic press or offer inside that wait read the old plan, so it could open a call about plan A while plan B loaded, and the model would then save to A while B was on screen. Now the plan becomes active first, then the old call is ended (same for starting a plan). Test: a plan opened while the old plan's call is still closing is already the active one.
  • The setup sheet could stay on "Reading your repositories…" if the act was refused. There was no Try again. Now readRepositoryList turns a refusal into the failed list with Try again (setup-sheet.tsx, test in planning-parts.test.ts).

LUKE-340 leftovers

  • Talk key → the open plan's call (fixed). When the planning window holds the keyboard, main tags the talk-key press with the window's open plan (HotkeyHost.talkPlanId, onVoiceHotkeyPress now carries an optional { planId }). LiveVoiceOrchestrator.beginTalk(planId) then speaks into that plan's call. It opens one if no call stands, and hangs up a desk call or another plan's call first, as the window's button does. It stays hold-to-talk. With the window unfocused, the key behaves as before. This matches docs/PLANNING.md's voice bar. Tests: orchestrator and hotkey registrar.
  • Thinking dots (not fixed, now a known limitation). Nothing on the Mac reports delegated work. The sessions route forwards session.delegation.created, but the host's live session holder ignores it. A fix needs a new field on the host's live-session change event and on VoiceView, and I don't count that as small. The window still passes thinking={false}.

Mac evidence made runnable

  • New RUN_PROFILE.PLANNING. In any fixture run (--fixture … or --capture-evidence …), --profile planning opens the planning window at launch. The window draws a synthetic plan from renderer/planning/planning-fixture.ts: the reference "Teammate invitations" plan on an invented acme/relay at an invented commit, with two confirmed assumptions and one unconfirmed. It has no account and no credentials, and a live run never draws it.
  • The capture waits for the planning window's own ready report and ignores the panel's (register-desktop-ipc.ts). The planning window now sizes by content (useContentSize: true), so the frame is exactly 1080×760 points.
  • scripts/evidence.sh captures artifacts/…/app-smoke-planning.png and checks its dimensions, so the one ./scripts/verify.sh run on a Mac produces it. You can also look at it by hand with ./scripts/run.sh --fixture smoke --profile planning.

Docs

docs/PLANNING.md gains Known limitations and validation. It covers what was actually validated (portable checks, hermetic tests) and what wasn't (real-Mac verify.sh, real voice, a live GitHub connection). It also lists the pending GitHub connection (production answers not-connected, and Connect GitHub is refused), the thinking dots, the DNS-rebinding residual in read_web_page (addresses are looked up, not pinned to the socket), and the 3 s polling.

Scope check

No dependency, version, revision, confirmation-evidence, approval, or export engine was found in the merged work. Searching the added lines for these finds only the test asserting there is no Approve/Version/History, plus unrelated strings (the GitHub API version header, isIP). The plan table has no revision column.

Validation

  • ./scripts/check.sh exits 0 here (Linux).
  • CI could not verify this. It touches the Mac window, the voice path, and the evidence script. This Linux VM has no Mac, so ./scripts/verify.sh was not run and app-smoke-planning.png has never been captured. Real voice and a live GitHub connection were not exercised.

Still open for LUKE-346

  • A real-Mac ./scripts/verify.sh run, plus a real voice pass.
  • The GitHub connection flow and the PRIVACY.md disclosures, both in a separate LUKE-338 follow-up waiting on a user decision. Until that lands, a deployed build cannot start a plan.

🤖 Generated with Claude Code


Open workspace in Conductor