Public: anyone can read this; the crew can change it.
Revoking a proposal token in the terminal asks first: `x` names the child, `y` revokes, `n` or esc keeps it #7958
Pressing x on a proposal token in the terminal now asks before revoking. Until now it revoked right away, cutting the child forge off.
stopped parked by the crew deploy c55c93a
2 earlier comments · 1 event
Pressing x on a proposal token in the terminal now asks before revoking. Until now it revoked right away, cutting the child forge off.
- The question:
xopens aconfirmScreen(withyesNo: true) titled "Revoke the token for <child>?", with one body line: "<child> can no longer propose here until it is handed a new token." The buttons are Revoke (danger) and Keep (ghost). yor Revoke: callsrevokeProposal, and the head line reads "<child>: revoked." as before.n, esc or Keep: nothing is revoked and the token stays listed.- Empty list:
xstill does nothing. - Unchanged: the rules in
actions/proposal_tokens.ts.
The dialog box is narrower than the body line, so a 140-column terminal shows it cut off after "until it is ha…". I kept the line as the issue words it, and the test checks only its start ("<child> can no longer propose here").
Tests (test/tui-proposal-tokens.test.ts):
- The existing
xtest now checks the question is shown and the token still exists, then pressesy. - A new test presses
xthenn, andxthen esc, and checks thatlistProposalsstill returns the token each time. It then pressesx,yand checks the list is empty. - Without the screen change, both of these fail. With it, all 4 tests in the file pass, and so do
bun scripts/gate.tsandbun x tsc --noEmit.
To try it, open the palette with ctrl+k → "Proposal tokens" → alice/lib. Mint a token with n, then press x on it and answer n, then press x again and answer y.
🤖 Generated with Claude Code
Pressing x on the terminal's Proposal tokens screen now opens a "Revoke the token for <child>?" dialog before anything is removed. y or Enter on Revoke revokes the token and shows "<child>: revoked."; n, esc or Keep leaves it as it was. The change is in src/tui/screens/proposal_tokens.ts. test/tui-proposal-tokens.test.ts proves each path, including that nothing changes until the confirm.
This push fixes the two failing tests in test/proposal-token-doors.test.ts. They were written before the dialog existed and pressed only x, so they now answer it with y. These tests were out of date; the code is unchanged.
The third failure, "without a docs/VISION.md the no-vision line is followed by the Direction section" in test/tui-vision-direction.test.ts, is not touched by this change. It passed three runs out of three on its own here. It may be flaky when other tests share its shard; this pull doesn't change it.
Before pushing, bun scripts/gate.ts and bun x tsc --noEmit were clean. The token tests, the vision test and test/vitals-release.test.ts (the check flagged it as failing only beside the token tests) passed: 17 of 17. I didn't run the full suite here; the forge runs it on this push.
To try it: open Proposal tokens for a repository with ctrl+k, select a token with j/k, press x, then n to keep it or y to revoke it.
🤖 Generated with Claude Code
Parked by the crew: the check stayed red through 2 automatic tries
Pressing
xon a proposal token in the terminal now asks before revoking. Until now it revoked right away, cutting the child forge off.xopens aconfirmScreen(withyesNo: true) titled "Revoke the token for <child>?", with one body line: "<child> can no longer propose here until it is handed a new token." The buttons are Revoke (danger) and Keep (ghost).yor Revoke: callsrevokeProposal, and the head line reads "<child>: revoked." as before.n, esc or Keep: nothing is revoked and the token stays listed.xstill does nothing.actions/proposal_tokens.ts.The dialog box is narrower than the body line, so a 140-column terminal shows it cut off after "until it is ha…". I kept the line as the issue words it, and the test checks only its start ("<child> can no longer propose here").
Tests (
test/tui-proposal-tokens.test.ts):xtest now checks the question is shown and the token still exists, then pressesy.xthenn, andxthen esc, and checks thatlistProposalsstill returns the token each time. It then pressesx,yand checks the list is empty.bun scripts/gate.tsandbun x tsc --noEmit.To try it, open the palette with ctrl+k → "Proposal tokens" →
alice/lib. Mint a token withn, then pressxon it and answern, then pressxagain and answery.🤖 Generated with Claude Code
Closes #7949