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

small: the 404 page for a signed-out visitor offers home and search as its two links, with before and after looks #16006

Merged opened this

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

Merged

A signed-out visitor's 404 is now one sentence, "That page is not here.", with two links: Home (/) and Search (/search). The screenshots the issue asks for are not on this pull: I couldn't take them in this sandbox. bun scripts/design-lint.ts passes.

Notes

shipped production is serving it deploy 3fede26

opened this

A signed-out visitor's 404 is now one sentence, "That page is not here.", with two links: Home (/) and Search (/search). The screenshots the issue asks for are not on this pull: I couldn't take them in this sandbox. bun scripts/design-lint.ts passes.

  • What's gone for them: the echoed path, the Sign in button, the search form, "Did you mean", and the request-id disclosure. The id still comes back in the x-request-id header. Because the path is no longer echoed, a private page and a missing one now read identically.
  • Who sees it: the signed-out 404 is built in notFoundPage in src/web/chrome.ts, with a signedOut option for the no-route fallback. That fallback in src/http/server.ts reads no session, by design. It now counts a request as signed out when it carries no forge_session cookie, Authorization header, x-forge-identity header, or edge identity, which costs no database read. Anyone else, including a signed-in person, keeps the full 404 with the search form and suggestions.
  • Tests: I rewrote the existing 404 tests that asserted the old signed-out page in not-found-page, not-found-search, not-found-way-on, web and web-ui, because they were testing the behaviour this issue replaces. Signed-in variants keep the old coverage. A new test checks that the signed-out page has exactly the links / and /search, no form, no Sign in, no path, answers in under 50 ms, and carries the security headers.
  • What I ran: tsc is clean, and the tests that mention the 404 page pass. scripts/fast.ts named about 2,800 test files, so I did not run the full suite; the forge's check does.
  • What I left out: screenshots at 390 and 1280 px, light and dark, before and after. Please take them from the preview.
  • Push hook: the repo's pre-push check wanted a "how to try it" commit. I added an empty Try: commit for it.
[
  {"go": "/no-such-page (signed out)", "look": "the page body", "expect": "One sentence, 'That page is not here.', and two buttons: Home and Search. There is no path echo, no Sign in and no search form."},
  {"go": "Click Search", "look": "the address", "expect": "It lands on /search."},
  {"go": "/no-such-page (signed in)", "look": "the page body", "expect": "The fuller 404 is unchanged: search form, suggestions and the request id."},
  {"go": "/alice/some-private-repo (signed out)", "look": "compare with /alice/nothere", "expect": "The two pages are identical."}
]

🤖 Generated with Claude Code

Closes #15978

Show 14 earlier items

7 earlier comments · 1 event
commented

The gate's comment is informational. It reports that the look pages are named (/nope/nothing) and flags nothing for me to fix. The branch is clean and already pushed, so there's nothing new to commit.

The pull is unchanged: a signed-out visitor's 404 is one sentence, "That page is not here.", with two links, Home (/) and Search (/search). It's built in notFoundPage in src/web/chrome.ts, and the no-route fallback in src/http/server.ts decides who counts as signed out. A signed-in person keeps the full 404.

  • Look pages: the "after" picture is /nope/nothing, which was already one of app.looks. The only page this change alters is the signed-out 404.
  • Screenshots: none are attached. I couldn't take them in this sandbox.
  • Checks: I ran nothing new on this turn.

Review block:

[
  {"go": "/no-such-page (signed out)", "look": "one sentence, 'That page is not here.', and two links", "expect": "Home goes to / and Search goes to /search; no echoed path, no Sign in button, no search form"},
  {"go": "/no-such-page (signed in)", "look": "the full 404", "expect": "search form and near-page suggestions still show"}
]
commented

Still red on current main: asking again over HTTP > a writer queues a check and gets the run. Fix it and push.

commented

I changed nothing, so there is nothing to push. The three failures are not caused by this pull.

  • test/web-apps.test.ts, "production is not running": it fails here too, and the check log says it is red on main at 829e08a with the same test. The failing text is the app strip ("Failed to start. Deploy main to try again."), which this pull doesn't touch.
  • test/pull-check-again.test.ts ("a writer queues a check", delete_failed) and test/render-csv.test.ts ("five million cells are counted fast"): both pass here, 50 of 50 together and again alongside web-apps. The check log did call them green on main. The first is a file-deletion error and the second a speed bound, and both ran in the same busy shard as the web-apps failure, so I read them as load flakes. My change doesn't reach either: it only touches the signed-out 404 in src/web/chrome.ts and src/http/server.ts.

I only ran those three files here, not the full suite. A re-run of the check should clear the two flakes. The web-apps failure will stay red until someone fixes it on main.

commented

Still red on current main: asking again over HTTP > a writer queues a check and gets the run. Fix it and push.

commented

I made no code fix this time. I merged current main (85 commits ahead) into the branch and pushed it (cc2fb5899), so the check reruns on a fresh base.

After the merge, tsc was clean and gate.ts --fix changed nothing. I ran the 404 tests, web.test.ts, web-ui.test.ts, pull-check-again.test.ts and render-csv.test.ts. Everything passed except the web-apps test below. scripts/fast.ts named 2,879 files, so I picked those files by hand instead.

  • render-csv "five million cells are counted fast": the bound is 250 ms and it took 271 ms in the shard. The test measures wall-clock time under a loaded shard, and it passes when run alone. I didn't loosen the bound.
  • pull-check-again "a writer queues a check" (delete_failed): this passes here and the forge's own check calls it green on main. The failure came from deleting files in a busy shard, and nothing in this pull touches repo deletion.
  • web-apps "production is not running": this test is red on main at 829e08a too, and the forge's check did not count it against this pull. It still fails here after the merge. It stops production and expects the app strip to read "Not running", but it read "Failed to start". Production can't start in this sandbox, which can't bind sockets. The diff doesn't touch app status.

If the check still fails after this push on the first two, I'd treat it as a flaky shard rather than something in this pull. The web-apps test needs a fix on main.

commented

<!-- look-pages cc2fb58996a1 --> Look pages for cc2fb58, from the gate:

  • look pages (named): this pull changes src/web/chrome.ts; a commit names /nope/nothing
commented

The gate's comment is informational again. It says the look pages are named (/nope/nothing) and asks for no change, so I changed nothing and pushed nothing.

The background task notification is from my earlier broad test run, which I had already abandoned. It shows no results.

The branch is at cc2fb5899, which is main merged into the pull. The pull is unchanged:

  • 404 page: a signed-out visitor's 404 is one sentence, "That page is not here.", with two links: Home (/) and Search (/search). A signed-in person keeps the full 404.
  • Look page: the "after" picture is /nope/nothing.
  • Check status: I haven't seen a verdict for this push. The web-apps "production is not running" test fails on main and failed again here after the merge. The other two earlier failures looked like flakes.
Approved

Signed-out 404 verified on the preview: 404, one h1 sentence, exactly Home and Search links, no path echo, security headers present, app;dur=9.4ms. Signed-out detection reads no DB (no cookie/authorization/identity/edge identity), so no leak and no new write path. Earlier asks (sentence said once, flaky timing bound removed, stray semicolon) are met; tests updated and signed-in coverage kept. Non-blocking: the before/after screenshots at 390/1280 light and dark are not attached to the pull; the gate looks of /nope/nothing give the after, the before needs capturing from main.

commented

Left #15978 open: 1 unticked item remain (before and after screenshots at 390 and 1280 px, light and dark, on the pull; bun scripts/design-lint.ts passes).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs