Public: anyone can read this; the crew can change it.
The terminal access-codes screen says when an admin's code acts as admin, and asks before minting one #12483
Check · Review · Land · Live done — Landed and live in production.
The terminal's access-codes screen now marks an admin's codes as acting as admin, and asks for the same confirm on any scope that the web form does. The new test and `bun x tsc --noEmit` pass, and so does `bun scripts/gate.ts`. I ran only `test/tui-signins.test.ts`, not the full suite, which the forge runs on push.
shipped production is serving it deploy 9cda780
The terminal's access-codes screen now marks an admin's codes as acting as admin, and asks for the same confirm on any scope that the web form does. The new test and bun x tsc --noEmit pass, and so does bun scripts/gate.ts. I ran only test/tui-signins.test.ts, not the full suite, which the forge runs on push.
- Rows: an admin's token rows now read
name · scope · acts as admin, for examplecarol-ci · ro · acts as admin. An everyday account's rows are unchanged. - Minting: when an admin mints in the terminal,
roandrwnow meet the same "Make an admin access code" confirm asadmin. The confirm names the scope, and cancel is the default. An everyday account still mintsro/rwwith no confirm and is still refusedadmin. - Test:
test/tui-signins.test.tshas one new test covering both points. It checks the row text for an admin and for an everyday account, that mintingroas admin shows the confirm and then mints, and that the everyday account mints with no confirm. - Plan: I did not post a plan on the issue; the
keep_plantool isn't available in this session. - Push hook: the pre-push hook refused my first push for lacking a "Try:" commit, so I added an empty commit carrying one.
The change is in src/tui/screens/signins.ts. To try it, open the terminal as an admin, go to Signed in, press m, take the defaults, and the confirm appears.
In the terminal's Signed in screen, an admin's access codes now read name · scope · acts as admin. An admin minting any scope (ro, rw or admin) now meets the same "Make an admin access code" confirm that only admin met before. An everyday account's rows and minting are unchanged. ro or rw from an everyday account mints straight away, and admin is still refused.
- Code: the change is in
src/tui/screens/signins.ts. The confirm now names the scope, and cancel is the default. - Tests:
test/tui-signins.test.tshas one new test that shows both behaviours for an admin and for an everyday account. - Check failure fixed:
test/tokens-oauth-client.test.tsfailed in the forge's check because its account is an admin. Its two expected row strings now includeacts as admin; the old expectations were stale, not the code. - Not fixed: the six
packs mirrorsfailures in the check passed when I rantest/packs-mirror.test.tshere. I changed nothing for them, and the next check run will show whether they recur. - Run here:
bun x tsc --noEmit,bun scripts/gate.ts, and the two test files above all pass. I did not run the full suite.
To try it, open the terminal as an admin, go to Signed in and press m. Take the defaults and the confirm appears.
Clean. The admin flag comes from the verified session user, not client input. Admin rows say acts as admin, and every scope an admin mints goes through the confirm with cancel as the default. An everyday account is unchanged and admin is still refused to it. The new test covers both cases, and the stale expectations in tokens-oauth-client.test.ts are right to change because that account is an admin. No dependency, no secret, and no README change. Not blocking: the header comment line in signins.ts runs long.
The terminal's access-codes screen now marks an admin's codes as acting as admin, and asks for the same confirm on any scope that the web form does. The new test and
bun x tsc --noEmitpass, and so doesbun scripts/gate.ts. I ran onlytest/tui-signins.test.ts, not the full suite, which the forge runs on push.name · scope · acts as admin, for examplecarol-ci · ro · acts as admin. An everyday account's rows are unchanged.roandrwnow meet the same "Make an admin access code" confirm asadmin. The confirm names the scope, and cancel is the default. An everyday account still mintsro/rwwith no confirm and is still refusedadmin.test/tui-signins.test.tshas one new test covering both points. It checks the row text for an admin and for an everyday account, that mintingroas admin shows the confirm and then mints, and that the everyday account mints with no confirm.keep_plantool isn't available in this session.The change is in
src/tui/screens/signins.ts. To try it, open the terminal as an admin, go to Signed in, pressm, take the defaults, and the confirm appears.Closes #12476