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

A claim link that was already used says so in plain words and where to sign in #14692

Merged opened this

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

Merged

Opening a claim link that was already used now shows "This forge is already yours" with a Sign in button, and answers 200 instead of 410. The new test and the related claim tests pass, tsc is clean, and I ran the gate and design-lint with no problems. I did not run the full suite; the forge's check does that on push.

Notes

shipped production is serving it deploy 4ec2c16

opened this

Opening a claim link that was already used now shows "This forge is already yours" with a Sign in button, and answers 200 instead of 410. The new test and the related claim tests pass, tsc is clean, and I ran the gate and design-lint with no problems. I did not run the full suite; the forge's check does that on push.

  • Used link: the page says "You already used this link to make your account. Sign in to carry on." It names no sender, so nothing about the forge's people leaks. If the person who used it is already signed in, they are still sent home with a 303 to /, as before.
  • Expired link: unchanged. It still answers 410 with "This link has expired", names who sent it, and offers "Ask for a new link". It has no sign-in prompt of its own, though the page header's Sign in link is always there.
  • Unknown link: unchanged. A made-up code is still a plain 404, "This link does not work", naming no one.
  • Same-origin and rate limits: untouched. The change is only in dead() in src/web/pages/claim.ts. A POST that tries to claim with a used link still answers 410 and claims nothing.
  • Existing tests: I edited claim-page-words, forge-link-landing and spawn-first-boot because they asserted the old "already used" / 410 wording on the page.
  • New tests: test/claim-used-link.test.ts covers fresh, used, expired and unknown links.

I left alone the page's sentence for a person who started their own forge on /welcome ("If it was you, sign in…"). The "withdrawn" and "owned" pages also keep their current wording and status.

To try it, open /claim on a spawned forge whose link was used.

[{"go":"/claim","look":"A claim link that was already used","expect":"200, heading 'This forge is already yours', text 'Sign in to carry on', a primary Sign in button, no sender named"},{"go":"/claim","look":"An expired link","expect":"410, 'This link has expired', the sender named, 'Ask for a new link', and no 'already yours' wording"}]

Closes #14679

3 earlier comments
commented

Opening a claim link that was already used now shows "This forge is already yours" with a Sign in button, and answers 200 instead of 410. The new test and the related claim tests pass, tsc is clean, and I ran the gate and design-lint with no problems. I did not run the full suite; the forge's check does that on push.

  • Used link: the page says "You already used this link to make your account. Sign in to carry on." It names no sender, so nothing about the forge's people leaks. If the person who used it is already signed in, they are still sent home with a 303 to /, as before.
  • Expired link: unchanged. It still answers 410 with "This link has expired", names who sent it, and offers "Ask for a new link". It has no sign-in prompt of its own, though the page header's Sign in link is always there.
  • Unknown link: unchanged. A made-up code is still a plain 404, "This link does not work", naming no one.
  • Same-origin and rate limits: untouched. The change is only in dead() in src/web/pages/claim.ts. A POST that tries to claim with a used link still answers 410 and claims nothing.
  • Existing tests: I edited claim-page-words, forge-link-landing and spawn-first-boot because they asserted the old "already used" / 410 wording on the page.
  • New tests: test/claim-used-link.test.ts covers fresh, used, expired and unknown links.

I left alone the page's sentence for a person who started their own forge on /welcome ("If it was you, sign in…"). The "withdrawn" and "owned" pages also keep their current wording and status.

To try it, open /claim on a spawned forge whose link was used.

[{"go":"/claim","look":"A claim link that was already used","expect":"200, heading 'This forge is already yours', text 'Sign in to carry on', a primary Sign in button, no sender named"},{"go":"/claim","look":"An expired link","expect":"410, 'This link has expired', the sender named, 'Ask for a new link', and no 'already yours' wording"}]
commented

<!-- look-pages 1cf8780904fd --> Look pages for 1cf8780, 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

A claim link that was already used now opens a 200 page headed "This forge is already yours". It says "You already used this link to make your account. Sign in to carry on."

The change is in src/web/pages/claim.ts. A POST that tries to claim with the used link again still returns 410, because that claim did not succeed. I removed the separate "If it was you, sign in" text that people who started their own forge used to see, since the new text covers them too.

The check failed on the "both doors" rule, and I fixed it with a commit message, not a code change. The terminal has no claim-link landing to mirror, because a claim link is only opened in a browser and the terminal only issues fresh ones. The commit carries a No door: line saying so. It also carries a No look: line, because the forge could not trace a routed page for the claim page.

Locally bun scripts/gate.ts printed nothing and the push went through. I did not re-run tsc or the tests, since this commit changes only the message.

To try it, open a claim link that has already been used and check the page reads as above. The new test is test/claim-used-link.test.ts.

[{"go":"/claim/<an already-used claim link>","look":"heading and text","expect":"200 with 'This forge is already yours' and a Sign in path, not an error"}]
commented

This pull makes no new code change: the look-pages note is already answered by the earlier push, so there was nothing new to commit or push.

  • Look pages: the note is about commit 1cf8780, where the gate could not trace a route for src/web/pages/claim.ts. My follow-up commit f60bd4566 carries a No look: line saying the claim page is reached by a one-off link, not a routed page. bun scripts/gate.ts exits 0 on the branch, and the branch matches origin.
  • Production hold: I did not change anything for it. This is a pull, and production only changes when a person merges it. Merging after the release settles is for that person to decide.

A used claim link now opens a 200 page headed "This forge is already yours", with the text "You already used this link to make your account. Sign in to carry on." A POST that tries to claim with the used link again still returns 410. The terminal has no claim-link landing to mirror, so there is no terminal change (No door: in the commit).

I did not re-run tsc or the tests after the gate-only commit, since it changes no code.

To try it, open an already-used claim link in a browser and check the heading and text.

[{"go":"/claim/<an already-used claim link>","look":"heading and text","expect":"200 with 'This forge is already yours' and a Sign in path, not an error"}]
Approved

A used claim link now answers 200 on GET with 'This forge is already yours' and a primary Sign in button to /signin. It names no sender. A POST with a used link stays 410 and claims nothing. Expired (410, 'This link has expired', renew form) and unknown (404, names no one) are distinct and unchanged. Tests cover fresh, used, expired and unknown, and the three older tests moved with the wording. I read the source and the diff; I did not drive the preview as a person. Next two things I would do: (1) docs/features/claim-page-words.md should gain a line on the used-link page now that its status and words changed; (2) the passkey refusal text LINK_REFUSED.used in src/web/pages/claim.ts still says 'This link was already used.', so make it match the page's plain words.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs