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

Start now with your own Claude account: one paste on a waiting build (#16490) #16571

Merged opened this

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

Merged

The owner: "if we dont have any tokens to provide it should have a clean add your token here dialog so the user can get started right away".

Notes

shipped production is serving it deploy f411bbe

opened this

The owner: "if we dont have any tokens to provide it should have a clean add your token here dialog so the user can get started right away". Where a person's own build waits for an account with room (rate-limited, week full, credit spent, none at all), the run page, Talk's crew pane and the terminal (a) offer one step: paste a claude setup-token value or an API key; it is tested with Anthropic first, sealed, never shown again, granted only to that person's repositories, and the held run starts at once. Stacked on #16495 (land that first).

🤖 Generated with Claude Code

1 earlier comment · 1 event
commented

<!-- look-pages cfd29402bdb1 --> Look pages for cfd2940, from the gate:

  • look pages (inferred): "Looks: /alice/tip-calculator/runs" is not a page of app.looks in forge.json; this pull changes src/web/own_token.ts, src/web/pages/talk.ts, src/web/pages/talk_preview.ts and 1 more; the forge pictures /board (src/web/own_token.ts), /talk (src/web/own_token.ts), /settings/crew (src/web/own_token.ts) and 6 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Changes requested — before the latest push

The security path is sound: the POST checks sign-in, same-origin through readForm, and that the run belongs to this repo. offersOwnToken then requires the owner and a held run. The token is tested before it is kept, sealed, and never echoed back. Nothing here is high. Three things stop it landing as it is, and all three are needed in one round.

  1. Tests do not cover two of the three doors. The page and the JSON answer are tested. The terminal key a in src/tui/screens/runlog.ts has no test: the offer line, the masked prompt, the toast. The Talk crew pane box in talk_preview.ts has no test that it appears for the owner of a held run and not for anyone else. The no-script path (form post, then flashTo back to the run) also has none. Each one would pass today with the code removed.
  2. The test seam useTokenTester is production code that exists only for tests, and it needed an unused-exports allow entry. Pass the fetcher in instead, or use the repo's existing seam for the meter reader, and drop the allow entry. Also remove the stray blank line at the end of token_check.ts, and the file header that repeats the tokenWorks doc.
  3. Design, principles 1, 6 and 7. The box explains itself twice: the heading, then a paragraph that repeats what the heading and the label say, with START_NOW_LINE added on top. The run page already says why it waits just above. Keep one sentence. The box is also a card around a single form. Make it a plain row under the wait line: heading, field, button.

Also check that the box keeps what was typed when the live region (data-live="run.*") redraws on Talk. Today a run event can swap the region and empty the token field mid-paste. Keep the field outside the swapped node, or skip the swap while the field has focus or a value.

Add a review block of JSON steps to the pull description, since this is a page change.

commented

<!-- look-pages b6231a80dd9c --> Look pages for b6231a8, from the gate:

  • look pages (inferred): "Looks: /alice/tip-calculator/runs" is not a page of app.looks in forge.json; this pull changes src/web/own_token.ts, src/web/pages/talk.ts, src/web/pages/talk_preview.ts and 1 more; the forge pictures /board (src/web/own_token.ts), /talk (src/web/own_token.ts), /settings/crew (src/web/own_token.ts) and 6 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Approved

Earlier asks, all met: the box is now a plain form row, not a card (6, 7); the swap seam is gone and tokenWorks takes the fetcher; the a key, masked prompt and toasts have a test in test/tui-own-token.test.ts; the copy is cut down. Security reads clean: the POST checks sign-in, same-origin and body cap through readForm, and the run must belong to the repo. Only the owner of a held run in their own repo is offered the box, the token is tested before it is kept and stored sealed, and it is never echoed back. The page, Talk and the terminal share one action, and the how-to is in docs/features. Non-blocking: the heading and the line under it still say nearly the same thing; one of them could go.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs