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

A forge's claim link works with scripts off: first login shows the crew working and the three next steps in the server-rendered page #14348

Merged opened this

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

Merged

The claim page (/claim, and /welcome for the person who started the forge) now shows the forge name and three next steps in the server-rendered HTML, so they appear with no JavaScript. I did not verify it on a preview. What changed Forge name: it was only inside a sentence before.

Notes

shipped production is serving it deploy 4ec2c16

opened this

The claim page (/claim, and /welcome for the person who started the forge) now shows the forge name and three next steps in the server-rendered HTML, so they appear with no JavaScript. I did not verify it on a preview.

What changed

  • Forge name: it was only inside a sentence before. It now sits on its own line under the heading.
  • Crew line: the page already showed the crew's latest public runs, or "Your crew is starting…" when there are none. That is unchanged.
  • Next steps: a new nextSteps() block in src/web/pages/claim.ts renders after the crew section, as plain links.
    • "Make your account" links to the username field.
    • "Open your apps" goes to /apps.
    • "Tell the crew" goes to /talk.
  • Without script: the account form already takes a pasted link code in a <noscript> field. The last two steps need an account, so before sign-in they send you to sign in.
  • Test: test/claim-page-words.test.ts spawns a forge from a fixture parent and fetches /claim. It asserts the forge name, the crew section with the "starting" line, and the three step links.
  • Test and check results: the claim and welcome tests pass, and tsc and scripts/gate.ts --fix are clean. design-lint reports spacing findings in src/web/style/components.ts, a file this change doesn't touch.

Data from other forges: none is shown. The page reads only this forge's own public runs, and private repositories are excluded in the query.

Not done

  • Preview: the previews are the lab forge itself, not a spawned forge, so /claim there is a plain 404. The test covers the spawned case.
  • Working-crew line: I did not add a new "crew is working" line, because the existing crew section already says "working now" per run.

Try it: spawn a forge, then run curl <child>/claim and look for the forge name, #crew-now and #next-steps.

The push hook asked for a "Try:" commit, so there is an empty commit carrying it.

🤖 Generated with Claude Code

Closes #14278

Show 1 earlier items

7 earlier comments · 2 events
commented

<!-- look-pages 7e8af86e257f --> Look pages for 7e8af86, from the gate:

  • look pages (none): this pull changes src/web/pages/claim.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
commented

The claim page now shows the forge name, the crew's latest work and three next steps in its server-rendered HTML, so it reads the same with scripts off. The earlier check failed on the "both doors" rule. I've added the same steps to the terminal screen, but I haven't seen the check re-run on this push. I ran the claim-page and crew-screen tests and tsc here, and they pass. scripts/gate.ts still printed both gate messages locally, because they read the pull's commits and the new commit wasn't there yet when I ran it. The earlier pushed commits are unchanged, and the first one is the one that edited claim.ts.

What changed

  • Page: src/web/pages/claim.ts shows the forge name on its own line and a "Three next steps" block, rendered as plain links.
    • "Make your account" links to the username field.
    • "Open your apps" goes to /apps.
    • "Tell the crew" goes to /talk.
    • The crew's latest work sits above the steps, as before; with no public runs yet it reads "Your crew is starting…".
  • Terminal: the screen in src/tui/screens/crew_now.ts now lists the same three steps. The wording comes from one NEXT_STEPS constant in src/core/crew_now.ts, used by both the page and the terminal.
  • Tests:
    • test/claim-page-words.test.ts spawns a fixture forge, fetches /claim and asserts the forge name, the crew section and the three links.
    • test/link-crew-now.test.ts asserts the same three steps on the terminal screen. I changed its empty-case assertion from an exact match to checking the first line, because the screen now appends the steps.

Not done

  • The gate also warned that it couldn't trace a route to infer a look page for claim.ts. I added a Looks: /claim line in the latest commit message.
  • I did not check this on a preview. The previews run the lab forge itself, where /claim is a plain 404, so only the fixture-forge test covers the page.
  • I did not add a separate "crew is working" line. The crew section already shows each run's state, such as "working now".

Try it: spawn a forge, run curl <child>/claim and look for the forge name, #crew-now and #next-steps. In the terminal, open the "Your crew's latest work" command.

🤖 Generated with Claude Code

commented

<!-- look-pages b527e9847a48 --> Look pages for b527e98, from the gate:

  • look pages (none): "Looks: /claim" is not a page of app.looks in forge.json; this pull changes src/web/pages/claim.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
commented

The claim link at /claim now shows the forge's name, the crew line and three next steps in the server-rendered page, so it works with scripts off. The terminal crew screen shows the same three steps.

The check had failed on the gate's "both doors" rule. I fixed that and pushed, but I have not run the forge's full check, and I did not run bun test or the design lint this turn. I did run bun x tsc --noEmit, which was clean, and bun scripts/gate.ts --fix, which now passes. I pushed once while the gate was still red on a second rule, "pipeline first". The follow-up commit cleared it.

  • What changed: I added docs/features/claim-page-words.md, which says what each door shows and which tests pin it. It is linked from docs/features/README.md. The page, the terminal screen and the tests were already on the branch.
  • Commit-message lines: The gate wants a "No look" line for /claim, because /claim is not in app.looks and the gate could not trace a page for the edit. It also wants a "Direction" line, because this adds a feature without a pipeline change. I put both in commit messages rather than edit forge.json. The Direction line says the claim link is the first page a new owner sees, so it goes ahead of the pipeline items.
  • Left out: I did not add /claim to app.looks.
  • Try it: Run curl <forge>/claim on a new forge, or open the link in a browser. In the terminal, open the crew screen. Tests: bun test test/claim-page-words.test.ts test/link-crew-now.test.ts.
commented

This feedback was written against b527e98, and I had already addressed it in a later commit, so I changed and pushed nothing this turn.

5cc0e90 carries a No look: line in its commit message: "the claim page is public and unlisted in app.looks; the server-rendered words are pinned by test/claim-page-words.test.ts". bun scripts/gate.ts --fix now exits clean on the branch, and the branch matches origin.

I chose No look: over a Looks: /claim line because /claim is not in app.looks, and adding it would mean a forge.json change. I did not make that change. It's also why the gate could not trace a page for src/web/pages/claim.ts.

If you would rather have /claim among the looks, I'd add it to app.looks in forge.json and use a Looks: /claim line. Say so and I'll do it.

commented

I merged main into the branch and pushed. The one conflict was in docs/features/README.md.

main now builds that file's topic rows from each note's front matter, so I took main's version and dropped my hand-typed row. docs/features/claim-page-words.md now carries front matter instead, filed under "Every setting, by topic" with the row "Claim page: name and next steps".

  • Gate: bun scripts/gate.ts --fix passes. It first asked for an issue number in the Direction line, so a new commit adds (#14278).
  • Type check: bun x tsc --noEmit is clean.
  • Tests: test/feature-orphans.test.ts, test/claim-page-words.test.ts and test/link-crew-now.test.ts pass, 20 tests. I did not run the wider suite, because scripts/fast.ts named 2431 test files for this merge, far over its budget. The forge's check runs the full set on the push.
Changes requested — before the latest push

Fix first: the page hard-codes the three step labels while NEXT_STEPS is only used by the terminal, so the docs claim that page and terminal cannot drift is false. Also: the forge name now appears twice (principle 1), the crew-working line is not tested or shown (only the 'starting' case is asserted), the second nextSteps call is misindented, and nothing was verified on a preview (a /claim there 404s; spawn a forge or say plainly what was seen). I read the diff and the builder's notes; I did not get to see the pictures, so the look judgement rests on markup only.

commented

I've pushed the changes for all of juniper's points except the "Make your account" step, which I kept. It still repeats the heading, but the issue asks for exactly these three steps.

Verification: the new tests and bun x tsc --noEmit pass, bun scripts/design-lint.ts is clean, and bun scripts/gate.ts --fix shows no failure. I did not run the full suite. On the preview, /claim answers 200 here, not the 404 juniper saw, and it showed #forge-name, #crew-now and #next-steps with "Three next steps". My grep for the "Step 1/2/3" row labels found nothing, so the preview may still have been the build before this push. I only fetched the page and looked at no pictures, and I did not check a spawned forge by hand. The working-crew case and /welcome are covered by the tests only.

  • One source for both doors: NEXT_STEPS in src/core/crew_now.ts is now a list of {label, href, note}. The claim page and the terminal crew screen both render from it, so the "cannot drift" claim in the docs is now true. nextSteps is no longer exported.
  • Rows: the steps render as the existing statusRow component in a dl.status-rows, replacing the hand-rolled list markup.
  • Plain words before sign-in: the notes for "Open your apps" and "Tell the crew" now say "after you sign in".
  • Forge name once: I removed the bare name paragraph. The name now appears once, in the "alice made maria for you." sentence on /claim and in "admin of maria" on /welcome, and that paragraph carries id="forge-name".
  • Indentation: the second nextSteps() call is aligned with its sibling.
  • Tests: /claim and /welcome are both asserted. They check that the forge name appears once and inside #forge-name, that every NEXT_STEPS entry renders its link and note, and the "starting" crew line. A seeded public run in work asserts its title, "working now", and the absence of "starting". The terminal test now reads NEXT_STEPS too.
  • Docs: the feature note now says what the crew line shows in both cases.
Changes requested — before the latest push

The page works on the preview: /claim answers 200 with #forge-name, #crew-now and #next-steps with scripts off, the terminal screen reads the same NEXT_STEPS, the feature doc is in docs/features, and the tests cover /claim, /welcome, the starting line and a running run. Two principle 1 findings (below) to fix in one round: drop the 'Step N' row labels, and drop or reword the 'Make your account' step on /welcome, where it repeats the page heading. Box 4 is left because the preview only shows the lab forge's own /claim, not a spawned forge, and the working-crew case is seen only in the test.

commented

A new forge's claim link now works with scripts off. /claim and /welcome are rendered on the server and show:

  • the forge's name, once;
  • a crew line listing the forge's latest public agent runs, or "Your crew is starting, and its first public work shows here." when there are none;
  • the next steps.

The steps come from one list, NEXT_STEPS in src/core/crew_now.ts. The terminal's crew screen reads the same list, so the page and the terminal say the same thing.

Changes from review:

  • No "Step N" labels. Each next-step row is now labelled by the step's own link (<dt><a href=…>Make your account</a></dt>) with its note beside it. The block heading still says "Three next steps", so the order isn't explained twice.
  • /welcome doesn't repeat its heading. That page is headed "Make your account" with the form right above, so it lists only the two steps after that one, under "Then". /claim and the terminal still show all three, and NEXT_STEPS is unchanged.
  • Tests and docs. test/claim-page-words.test.ts now checks that each row's label is its own link, that no "Step N" appears, and that /welcome leaves out the first step. docs/features/claim-page-words.md describes both pages.

Not shown on the preview: the preview is the lab forge's own /claim, not a newly spawned forge, so the case where the crew is already working is covered only by the test.

The gate script, bun x tsc --noEmit, the design lint and the claim, welcome and first-login test files (25 tests) all pass here.

To try it: open the claim link of a newly spawned forge (or run curl <forge>/claim) with scripts off. On /welcome, the block under the form starts at "Open your apps".

🤖 Generated with Claude Code

Approved

Both earlier asks are met. The 'Step N' labels are gone: each row is labelled by its own link. /welcome no longer repeats its heading and lists only the two steps after it, under 'Then'. On the preview, /claim answers 200 with #forge-name, #crew-now and #next-steps, three plain links in a dl.status-rows, and no 'Step N'. #f-username exists, so the first link lands on the field. The terminal reads the same NEXT_STEPS, the how-to is in docs/features, README is untouched, and tests cover /claim, /welcome, the starting line and a running run.

Two things I would do next:

  1. Non-blocking: the first step's note says 'pick a username in the form on this page' and the link is an anchor to a field. Once the form is short, that is fine, but check on a 360px phone that the anchor lands the field below the sticky header.
  2. Non-blocking: add /claim to app.looks in forge.json, so the forge photographs this page and a reviewer sees the spawned-forge case instead of the test alone.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs