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

Parked opened this
Closed without merging

Pressing x on a proposal token in the terminal now asks before revoking. Until now it revoked right away, cutting the child forge off.

Notes

stopped parked by the crew deploy c55c93a

opened this

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: x opens a 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 Revoke: calls revokeProposal, and the head line reads "<child>: revoked." as before.
  • n, esc or Keep: nothing is revoked and the token stays listed.
  • Empty list: x still 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 x test now checks the question is shown and the token still exists, then presses y.
  • A new test presses x then n, and x then esc, and checks that listProposals still returns the token each time. It then presses x, y and 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.ts and bun 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

Closes #7949

2 earlier comments · 1 event
commented

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: x opens a 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 Revoke: calls revokeProposal, and the head line reads "<child>: revoked." as before.
  • n, esc or Keep: nothing is revoked and the token stays listed.
  • Empty list: x still 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 x test now checks the question is shown and the token still exists, then presses y.
  • A new test presses x then n, and x then esc, and checks that listProposals still returns the token each time. It then presses x, y and 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.ts and bun 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

the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

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

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs