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 #7999
Check · Review · Land · Live done — Landed and live in production.
On the terminal's Proposal tokens screen, `x` used to revoke the token under the cursor straight away. Now it asks first. It opens `confirmScreen` with `yesNo: 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).
shipped production is serving it deploy b4c82c4
On the terminal's Proposal tokens screen, x used to revoke the token under the cursor straight away. Now it asks first. It opens confirmScreen with yesNo: 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).
y, or choosing Revoke, callsrevokeProposal, and the head line reads "<child>: revoked." as before.n, esc or Keep revokes nothing.xon an empty list still does nothing.
The only code change is in src/tui/screens/proposal_tokens.ts; the rules in actions/proposal_tokens.ts are unchanged.
Tests
- In
test/tui-proposal-tokens.test.ts, the existingxtest now checks that the question is shown and the token still exists, then pressesy. - A new test presses
xthenn, andxthen esc, and checks after each thatlistProposalsstill returns the token. It then pressesx,yand checks the list is empty. - Another new test checks that
xon an empty list opens no question. - With the screen change removed, the existing
xtest and then/esc test both fail. - The earlier attempt (#7958) went red because two terminal tests in
test/proposal-token-doors.test.tspressed onlyx. Those tests were out of date, not the code, so they now pressx,y.
Checks run
bun scripts/gate.tsandbun x tsc --noEmitare clean.bun scripts/fast.tsnamed 212 test files, over its 5-minute budget, so I picked the ones that cover the change:tui-proposal-tokens,proposal-token-doors,palette-roster,proposal-token,tui-screensandtui-vision-direction. All pass.tui-vision-directionis included because it failed on #7958's check.
To try it: press ctrl+k, open "Proposal tokens" and enter alice/lib. Mint a token with n, then press x and answer n; the token stays listed. Press x again and answer y; the head line reads "<child>: revoked."
🤖 Generated with Claude Code
The confirm works and the tests cover it, but two things need fixing in one round:
- (first) The dialog opens with Revoke selected, so a stray Enter revokes. The forge's other danger confirms (signins, invites, appmembers, capacity) default to Keep with
selected: 1. Do the same here, and add a test thatxthen enter keeps the token. - The README/docs still describe
xas an instant revoke. Say in docs/FOLLOWING.md (proposal tokens section, terminal door) thatxasks first:yrevokes,n/esc keeps it.
Also rewrap the file header comment, which is now an overlong line.
On the terminal's Proposal tokens screen, x used to revoke the token under the cursor straight away. Now it asks first. It opens confirmScreen 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).
- The dialog opens with Keep selected (
selected: 1), as the forge's other danger confirms do, so a stray enter revokes nothing. y, or choosing Revoke, callsrevokeProposal, and the head line reads "<child>: revoked." as before.n, esc, enter on Keep, or choosing Keep revokes nothing.xon an empty list still does nothing.
The only code change is in src/tui/screens/proposal_tokens.ts; the rules in actions/proposal_tokens.ts are unchanged. The file's header comment is rewrapped. The terminal part of the proposal tokens section in docs/FOLLOWING.md now says x asks first.
Tests
- In
test/tui-proposal-tokens.test.ts, the existingxtest checks that the question is shown and the token still exists, then pressesy. - A new test presses
xthenn,xthen esc, andxthen enter, and checks after each thatlistProposalsstill returns the token. It then pressesx,yand checks the list is empty. - Another new test checks that
xon an empty list opens no question. - The new test fails without the confirm. Its
xthen enter step also fails when the dialog starts on Revoke. - Two terminal tests in
test/proposal-token-doors.test.tspressed onlyx, which is why #7958 went red. They were out of date, not the code, so they now pressx,y.
Checks run
bun scripts/gate.tsandbun x tsc --noEmitare clean.bun scripts/fast.tsnamed more test files than its 5-minute budget allows, so I ran the ones that cover the change. On the latest commit,tui-proposal-tokens,proposal-token-doorsandpalette-rosterpass, 15 of 15. On the first commit I also ranproposal-token,tui-screensandtui-vision-direction, which passed; the follow-up only addsselected: 1and docs.
To try it: press ctrl+k, open "Proposal tokens" and enter alice/lib. Mint a token with n, press esc to close the secret, then press x. Enter, n or esc each leave the token listed; x then y revokes it.
🤖 Generated with Claude Code
Earlier asks are met. The dialog starts on Keep (selected: 1), so a stray enter revokes nothing. docs/FOLLOWING.md describes the new y/n/esc/enter behaviour. Tests cover x then y, n, esc and enter, and an empty list asking nothing. The two door tests are updated to press x, y. The revoke still goes through revokeProposal, so the repository-write check is unchanged. No new dependencies, no dead code. I did not run the tests or open the preview; the diff since my last head could not be read because that commit is not in the clone, so I judged the change as shown. No blocking findings.
On the terminal's Proposal tokens screen,
xused to revoke the token under the cursor straight away. Now it asks first. It opensconfirmScreenwithyesNo: 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).y, or choosing Revoke, callsrevokeProposal, and the head line reads "<child>: revoked." as before.n, esc or Keep revokes nothing.xon an empty list still does nothing.The only code change is in
src/tui/screens/proposal_tokens.ts; the rules inactions/proposal_tokens.tsare unchanged.Tests
test/tui-proposal-tokens.test.ts, the existingxtest now checks that the question is shown and the token still exists, then pressesy.xthenn, andxthen esc, and checks after each thatlistProposalsstill returns the token. It then pressesx,yand checks the list is empty.xon an empty list opens no question.xtest and then/esc test both fail.test/proposal-token-doors.test.tspressed onlyx. Those tests were out of date, not the code, so they now pressx,y.Checks run
bun scripts/gate.tsandbun x tsc --noEmitare clean.bun scripts/fast.tsnamed 212 test files, over its 5-minute budget, so I picked the ones that cover the change:tui-proposal-tokens,proposal-token-doors,palette-roster,proposal-token,tui-screensandtui-vision-direction. All pass.tui-vision-directionis included because it failed on #7958's check.To try it: press ctrl+k, open "Proposal tokens" and enter
alice/lib. Mint a token withn, then pressxand answern; the token stays listed. Pressxagain and answery; the head line reads "<child>: revoked."🤖 Generated with Claude Code
Closes #7949