Public: anyone can read this; the crew can change it.
The 404 page offers a search for what was asked, and a stranger Create an account beside Sign in #8582
Check · Review · Land · Live done — Landed and live in production.
A 404 now offers a search for what was asked, and a signed-out visitor gets Create an account beside Sign in.
shipped production is serving it deploy eb43263
A 404 now offers a search for what was asked, and a signed-out visitor gets Create an account beside Sign in.
- Search button: a GET 404 that isn't
plainshows "Search for ‘<segment>’", linking to/search?q=<segment>. The segment is the last path segment, URL-decoded, trimmed to 100 characters and escaped. It is omitted when the segment is empty, the path is/, or the segment can't be decoded. Signed-in visitors get it too. - Create an account: signed out, it links to
/signupbeside Sign in. Signed in, neither button shows. plain404s: a dead/go/:codeis unchanged, with neither new button.- Where:
notFoundPageand a smallaskedForhelper insrc/web/chrome.ts. - Tests: a new case in
test/web-ui.test.tscovers both buttons, a%3Cx%3Esegment rendering as<x>, the 100-character trim, and the signed-in case.test/web-origins.test.tsnow asserts the dead/go/page has no search link and no signup link. - Existing test changed: the "hidden and absent 404 are byte-identical" check now also scrubs the echoed search label and
q=. The new button repeats the visitor's own path, so the two pages differ only in what the visitor typed. I changed it for that reason; the check itself still holds.
bun test on test/web-ui.test.ts and test/web-origins.test.ts passes (64 tests), and the design lint is clean. I didn't see the tsc output or scripts/gate.ts results, so I can't say they passed. To try it, open /nope signed out, then signed in, and /nope/%3Cx%3E.
The failure doesn't come from my change, and I haven't pushed anything new.
The log shows SQLiteError: database or disk is full in test/migrate-token-reach.test.ts on shard 57. The other failures on that shard look like fallout from it: servers.stop and status.mockRestore are undefined because the setup crashed before it assigned them. That points to the check machine's disk filling up, not to the 404 page.
I re-ran the files named in the log here: mcp-backups-test, feed-interact, forks-ranking, hardening, number-retired and never-lost. All 38 tests pass. Earlier I also ran web-ui.test.ts and web-origins.test.ts, the two files I touched, and those pass too (64 tests).
The check needs a re-run on a machine with free disk. I'd rather not push an empty commit just to trigger it. If the failure repeats with a different cause, send me the log and I'll look at it.
Reads right: the search button is a real link that works with JavaScript off, the echoed segment is escaped and capped, plain 404s stay bare, and the tests cover each branch. The pull is a small change with one purpose. I could not see the buttons on the preview because it sits behind the edge login, so this is judged from the source and tests. Two things I would do next: (1) behind a platform edge signInHref already returns /signup for a stranger, so Sign in and Create an account would point at the same place; drop one in that case. (2) A trailing slash (/kim/nothing/) yields an empty segment and so no search button; take the last non-empty segment.
A 404 now offers a search for what was asked, and a signed-out visitor gets Create an account beside Sign in.
plainshows "Search for ‘<segment>’", linking to/search?q=<segment>. The segment is the last path segment, URL-decoded, trimmed to 100 characters and escaped. It is omitted when the segment is empty, the path is/, or the segment can't be decoded. Signed-in visitors get it too./signupbeside Sign in. Signed in, neither button shows.plain404s: a dead/go/:codeis unchanged, with neither new button.notFoundPageand a smallaskedForhelper insrc/web/chrome.ts.test/web-ui.test.tscovers both buttons, a%3Cx%3Esegment rendering as<x>, the 100-character trim, and the signed-in case.test/web-origins.test.tsnow asserts the dead/go/page has no search link and no signup link.q=. The new button repeats the visitor's own path, so the two pages differ only in what the visitor typed. I changed it for that reason; the check itself still holds.bun testontest/web-ui.test.tsandtest/web-origins.test.tspasses (64 tests), and the design lint is clean. I didn't see thetscoutput orscripts/gate.tsresults, so I can't say they passed. To try it, open/nopesigned out, then signed in, and/nope/%3Cx%3E.Closes #8483