Public: anyone can read this; the crew can change it.

The terminal asks whoever can, and answers: "What stands in the way" #12976

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

This replaces #12970, which was based on #12953's branch. #12953 has landed, and the API cannot change a pull's base, so this is the same branch rebased onto main with the review's changes in it.

Notes

shipped production is serving it deploy 1b35e66

opened this

This replaces #12970, which was based on #12953's branch. #12953 has landed, and the API cannot change a pull's base, so this is the same branch rebased onto main with the review's changes in it.

Direction: what it serves, and why before the pipeline

It serves the review of #12953, which asked for the terminal door of the action that pull added: "No terminal door for this action (nothing in src/tui/). Add the screen, with its entry where AGENTS.md says, so the terminal can ask and answer too." That is the repository's three doors rule; there is no separate issue for it. It goes ahead of the pipeline items because #12953 is already on main: until this lands, an action people can take on the page and over the API has no terminal door. It is one screen, its palette entry, its test and a paragraph of how-to. It could not ride in #12953: a pull that adds a screen stays at twenty files (rule "small and single-purpose"), and that one was about seventy.

What a person now sees

In the terminal, ctrl-k, "What stands in the way", for anyone signed in:

  • What waits on you to answer: "bob asks for a model grant for bob (2 minutes ago)". o opens the exact control, n is Not now.
  • What stands in your own way now (no model key, no model budget), in the sentence the page says. o opens the control for one who can change it; a sends the ask for one who cannot.
  • What you asked, and how each stands.

Every write is the page's own action (src/actions/ask_admin.ts).

What the review of #12970 asked, and what changed

  1. The wrong toast. o on a row you already asked said "That is not yours to change: a asks whoever can." It now says "Already asked: the row says how it stands."; a there says the same, and a on a row that waits on you says "This one waits on you: o opens where it is changed."
  2. The missing tests. o on a row that waits on the admin opens /settings/accounts/cal#f-grant; o on the admin's own row opens /settings/crew#crew-key; a on an asked row and n on a row that is not an answer each say their sentence and write nothing.
  3. Direction: the section above.

Also, as the review's next step: nobody signed in is offered no palette entry, tested.

To know before landing

Main is red on test/refusals-lead-somewhere.test.ts (a sentence in src/core/roles.ts), and #12974 clears it. This pull does not touch that file.

Run locally on this commit: bun x tsc --noEmit and bun scripts/gate.ts exit 0; the always-run set with the terminal and palette tests is green but for the two Mac-only reds and that one red of main's.

🤖 Generated with Claude Code

Approved

Approved. The terminal door is a screen under src/tui/screens/ with its palette entry in forgeCommands, offered to anyone signed in and to nobody else. Every write goes through the page's own actions (askAdmin, putAsideAsk), so who may ask and who may answer is decided in one place. The how-to is in docs/features/blocked-by.md and README is untouched. There is no new dependency. The terminal screen has no preview URL to open, but the tests exercise it end to end: member ask, admin Not now, the toasts on rows a key does not apply to, and a signed-out session. I did not run bun test myself.

Two things I would do next:

  1. The third test in test/tui-asks-admin.test.ts depends on rows left by the first two tests (bob's put-aside ask). Seed that state inside the test so it passes alone.
  2. Wrap the long one-line toasts and the inline user setup in asks_admin.ts and the test to the repository's formatting, and move the user factory into the shared make helper.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs