Add Machine: enroll's approvals step has its own named row

TE
6d ago
+158-7

Fixes manaflow-ai/cmuxterm-hq#4877 (break 9: "an unnamed enroll step").

Leo, 2026-10-28 (the recovery and setup ask this issue covers): "after you've connected something remotely and whatever, that whole setup situation, like after we set it up, how good is it in terms of that whole, like, recovery flow, and, like, that kind of connection situation, and how reliable things are?"

What was wrong

acpmux host enroll ends with an approvals step (cmux-tui/crates/acpmux/src/cli/host_enroll.rs:115, host_approvals.rs): the machine lists this Mac's cmux app key, so the app may allow the prompts of chats it reaches through its own daemon. The app's HostStep had no case for it, so the Add Machine checklist showed the raw word approvals under "Name the machine", as an extra row added after the last line came in.

The change

  • HostStep.approvals, last in HostStep.known, in the order enroll runs it.
  • Its row is named Let this Mac allow its prompts (addMachine.step.approvals), with 20 translations marked needs_review, like the other step names.
  • A run that never emits the step (an older cmux-tui, or a doctor run) marks the row skipped when the report arrives (HostChecklist.finish), as it does for every other step.

Tests

  • AddMachineFlowTests.theApprovalsStepHasItsOwnRow (new): the line parses to .approvals, it is the last known step, its name is the plain-words label, and the checklist gives it one row marked done. It fails on base: HostStep.approvals does not exist, and AddMachineStrings.step returned "approvals".
  • okSteps and the raw-name row order now include approvals. The ready screenshot fixture (AddMachineShotsTests) emits it too.

Red/green: cmux-ci run --class light --script scripts/ci/package-test-lane.sh with the filter AddMachineFlowTests. On base the new test does not compile (HostStep.approvals doesn't exist), and AddMachineStrings.step(HostStep(rawValue: "approvals")) returns "approvals". On the head it should pass.

Observed / Not run

  • Observed: python3 scripts/cmux-next/prepush-gate.py passes. An Astra review at high gave SHIP at 9f6ff95b48ba. The xcstrings file parses as JSON with the new key in all 21 locales.
  • Not run: no Swift compile or test, and no capture, from my host (a Linux lane VM with no fleet client). The PR's CI is the first compile.

Changelog

Fixed: The Add Machine checklist names enroll's last step ("Let this Mac allow its prompts") instead of showing the raw word "approvals".

Screenshots

No capture: this names one checklist row that already showed (as the raw word "approvals"). It adds no layout, control or style. The ready-card fixture in AddMachineShotsTests draws it, but I can't capture from this host (no fleet client). A capture of the ready card can follow from a host that has one.

Risk

Low (risk:low): one more known step value, a string and a table entry.

Agent session: agent session

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the Add Machine checklist showing the raw word "approvals" for enroll's last step (manaflow-ai/cmuxterm-hq#4877). The step now has its own named row, "Let this Mac allow its prompts", instead of joining unnamed after the identity row.

  • Adds HostStep.approvals last in HostStep.known, in the order acpmux host enroll runs it, with 20 translations marked needs_review.
  • Runs that never emit the step (older cmux-tui or doctor) still mark the row skipped when the report arrives.