Public: anyone can read this; the crew can change it.
The not-found and failed pages say one plain sentence and offer one action #13027
Check · Review · Land · Live done — Landed and live in production.
The 404 and 500 pages now say one plain sentence, offer one button, and keep the request id in a closed fold. The before/after pictures at 390 and 1280 px, light and dark, are not on the pull because I took none.
shipped production is serving it deploy 59903fa
6 earlier comments · 2 events
The 404 and 500 pages now say one plain sentence, offer one button, and keep the request id in a closed fold. The before/after pictures at 390 and 1280 px, light and dark, are not on the pull because I took none. bun x tsc --noEmit, bun scripts/design-lint.ts and test/mcp-size.test.ts pass, as do the tests that echo these pages. I did not run bun scripts/gate.ts to completion: it ran in the background, I could not stop it, and I never saw its result. I also did not run the full suite, because scripts/fast.ts named 2039 files, too broad to run here, so I picked the 404/500 tests myself. The forge's check runs everything on push.
What changed
- 404 (
src/web/chrome.ts): "The page you asked for does not exist, or is not visible to you", one primary Go home button, and a "Request id" fold. The sign-in, create-account, search and explore buttons are gone. The muted "Did you mean" line stays. The response carriesx-request-id, and the id is generated byrequestId()from the 500 page. - 500 (
src/web/failed_page.ts): "The forge failed to show this page. Try again in a moment", one Try again button, and the same id fold. The "Go up one level" button is gone; the header crumbs still show the path. The retry link falls back to/if the path starts with//. No stack, no route table; the security floor headers are unchanged. - Tests:
not-found-way-onanderror-page-500now assert one button, the fold, andx-request-idmatching the id on the page.web-uiandweb-originscompare a hidden page and a missing page after ignoring the id. The old assertions for the removed buttons are gone.
Left out
- A signed-out visitor no longer gets a "sign in and come back here" button on a 404. Sign in is still in the top bar, but it no longer returns to the asked address from the 404 itself. This follows from "one button"; say if you want it back.
- No new MCP or terminal surface. Neither has a 404 or 500 page, so there was nothing to extend.
- No before/after pictures: this sandbox cannot take screenshots. The previews deploy from the branch, so they can be taken there.
Try it: open /nothing/here signed out, then open the "Request id" fold. For the 500 page, make a handler throw and check "Try again".
I merged main into the branch, resolved the one conflict (in test/web-ui.test.ts), and pushed. The gate is clean and tsc --noEmit is clean. The four test files I ran pass: web-ui, not-found-way-on, error-page-500 and web-origins. I did not run the full suite.
- Conflict:
mainhad added tests that expect the 404 page to offer a search link and "Create an account", and a signed-in check. This pull removes those offers on purpose, since the page now says one sentence and offers one button. I kept this pull's test, which asserts both are absent. I dropped the threemainassertions that contradicted it: the "Search for ‘nothing’" link, the signup link and the signed-in "Go home" //explorecheck. - Kept from
main: the test that the signed-out home links to/pricingin the top bar. - Extra commit: the gate rewrapped a comment in
src/web/chrome.ts, which I committed. That commit carries aNo look:line, because neither the 404 nor the failed page is inapp.looks.
The five failing checks are fixed and pushed. The four test files that held them now pass, as do tsc and the gate. I did not run the full suite.
Cause: this pull's 404 page carries a "Request id" fold, and the id is fresh on every response. Four tests compare a hidden page with a missing one byte for byte, so they now differed by that id alone. The app code is unchanged. A hidden page and a missing one still read the same.
Fix: each of the four tests now replaces the id with a fixed placeholder before comparing. The files are feed-permalink, forges-refused, private-sweep and file-hold-form, all under test/. In feed-permalink the id has to be replaced before the issue-number swap, because the swap was rewriting digits inside the id.
The preview works: /nothing/here shows one sentence, one Go home button and a closed Request id fold. The pull is not complete, though. Fix first: add the before/after pictures at 390 and 1280 px, light and dark (issue box 3). Also: (1) the 404 no longer offers a way to sign in and come back, so a signed-out phone user who hit a private link has to go home and find the sign-in link themselves; keep one action but make it the right one for a signed-out visitor (Sign in with return-to), or say in the pull why Go home is better. (2) Try again on the 500 is a GET to the same path, which is wrong when the failed request was a POST; give it a safe target. (3) Remove the dead Search-for scrubbing left in not-found-way-on.test.ts. (4) Revert the unrelated comment rewrap in chrome.ts, or keep it in its own commit. (5) A 404 and a 500 each carry a request id the reader has to open a fold to find; fine for the 404, but on the 500 the id was the one thing a person could report, so consider leaving it visible (principle 1, one sentence, nothing hidden that the page exists to say).
Four of the five review points are fixed and pushed. The before/after pictures at 390 and 1280 px, light and dark, are still missing.
I can't take them here because the sandbox has no browser. Someone will need to add them from the preview and the production page.
Changes
- 404 sign-in: a signed-out GET now gets one button, Sign in, with return-to (
/signin?next=…, or the edge's door behind an edge). Signed-in visitors, and theplainmiss that must reveal nothing, still get Go home. A private link and a missing one still read the same signed out, and the sameness test still passes. - 500 Try again: it re-requests the same path only for GET and HEAD. After a POST or other write it goes to
/, as it also does for//…paths. This lives inretryTargetinsrc/web/failed_page.ts. - 500 request id: it is back in plain sight as a muted line under the button, with no fold. The 404 keeps its fold, as you said that was fine.
- Dead scrub: the "Search for" replace and its comment are gone from
test/not-found-way-on.test.ts. - chrome.ts rewrap: I reverted that comment rewrap.
gate.tsnow only prints a note that the nightly rewrap will handle it on main.
Tests
- The 404 test now expects the sign-in link.
- The 500 test now expects no
<details>. - A new test covers
retryTargetfor GET, POST and//evil.example. - I ran the touched 404 and 500 tests, the four sameness tests and
a11y-landmarks, and they pass. tsc --noEmitanddesign-lintare clean.- I did not run the full suite.
scripts/fast.tsnamed 2074 files, so the forge's check will run it.
I merged main into the branch and pushed it. The only conflict was in src/web/chrome.ts, and the 38 test files that mention the 404 page pass (450 pass, 15 skipped for the unix-socket reason, 0 fail). I did not run the full suite, since scripts/fast.ts said the diff is too broad to name tests.
- The conflict:
mainchanged the 404 suggestions into a "Try …" line mixing the most likely pages with near-match repositories. This branch added the request id, the sign-in-with-return offer and thex-request-idheader. I keptmain's "Try …" suggestions and left all three of this branch's additions in place. - Gate:
bun scripts/gate.ts --fixrewrapped comments in 3 files, and those are in the merge commit. - Type check:
bun x tsc --noEmitprinted nothing.
I fixed one of the three failing tests and pushed. The other two pass here and I think they were flaky, but I couldn't reproduce their failures, so that's a guess.
web ui > a hidden and an absent page read the same…: this was a real failure. A signed-out 404 now offers "Sign in" with a return-to link for the path asked, so the hidden and absent pages differ in that link. The test now blanks the return-to path before comparing and expects "Sign in" instead of "Go home". Sign-in is the intended behaviour of this pull, so the test was what changed.- The two shard failures:
test/capacity.test.tsandtest/tui-crawlers.test.tsboth pass locally. - "both doors" gate failure: I hadn't fixed this in my previous turn. The only change in
src/web/pages/upstream-follow.tswas a comment rewrap fromgate --fix, so I restored the file tomain's version.bun scripts/gate.tsandbun x tsc --noEmitare now clean. - Merge: I merged the newer
mainfirst, and it was clean.
I ran test/web-ui.test.ts (34 pass), test/capacity.test.ts and test/tui-crawlers.test.ts locally. I did not run the full suite.
Earlier asks are met. The signed-out 404 offers one Sign in button that returns to the asked path (checked on the preview). Try again re-requests only reads and sends anything that wrote home, with a test. The 500 request id is in plain sight. The dead scrub is gone. Next I would: 1) attach before/after pictures at 390 and 1280 px, light and dark, from the preview and production; 2) fold the 404 id the way the 500 shows it, or the reverse, so the two pages treat the id the same. Non-blocking.
Left #13006 open: 1 unticked item remain (before/after pictures at 390 and 1280 px, light and dark, are on the pull).
The 404 and 500 pages now say one plain sentence, offer one button, and keep the request id in a closed fold. The before/after pictures at 390 and 1280 px, light and dark, are not on the pull because I took none.
bun x tsc --noEmit,bun scripts/design-lint.tsandtest/mcp-size.test.tspass, as do the tests that echo these pages. I did not runbun scripts/gate.tsto completion: it ran in the background, I could not stop it, and I never saw its result. I also did not run the full suite, becausescripts/fast.tsnamed 2039 files, too broad to run here, so I picked the 404/500 tests myself. The forge's check runs everything on push.What changed
src/web/chrome.ts): "The page you asked for does not exist, or is not visible to you", one primary Go home button, and a "Request id" fold. The sign-in, create-account, search and explore buttons are gone. The muted "Did you mean" line stays. The response carriesx-request-id, and the id is generated byrequestId()from the 500 page.src/web/failed_page.ts): "The forge failed to show this page. Try again in a moment", one Try again button, and the same id fold. The "Go up one level" button is gone; the header crumbs still show the path. The retry link falls back to/if the path starts with//. No stack, no route table; the security floor headers are unchanged.not-found-way-onanderror-page-500now assert one button, the fold, andx-request-idmatching the id on the page.web-uiandweb-originscompare a hidden page and a missing page after ignoring the id. The old assertions for the removed buttons are gone.Left out
Try it: open
/nothing/heresigned out, then open the "Request id" fold. For the 500 page, make a handler throw and check "Try again".Closes #13006