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

A signed-out 404 offers Go home and Explore beside Sign in #6279

Merged opened this

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

Merged

A signed-out 404 now shows Sign in (primary, back to the same address, as before) with secondary Go home and Explore links. Signed in, it keeps Go home as the primary and adds Explore. The tests I ran pass (`web-ui`, `web`, `web-origins`: 105 tests) and `bun scripts/design-lint.ts` is clean. I pushed the branch but did not open the pull. `bun x tsc --noEmit` couldn't run here: the sandbox has no `…

shipped production is serving it deploy d480d55

opened this

A signed-out 404 now shows Sign in (primary, back to the same address, as before) with secondary Go home and Explore links. Signed in, it keeps Go home as the primary and adds Explore. The tests I ran pass (web-ui, web, web-origins: 105 tests) and bun scripts/design-lint.ts is clean. I pushed the branch but did not open the pull. bun x tsc --noEmit couldn't run here: the sandbox has no bun type definitions, so the type check is unverified until the forge's check runs.

  • plain 404s: a dead /go/:code still shows only Go home, unchanged.
  • Code: the change is in notFoundPage in src/web/chrome.ts.
  • Test: the existing signed-out 404 test in test/web-ui.test.ts used to assert that "Go home" was absent. That was wrong for the new behaviour, so I changed it. It now checks for the Go home and Explore links signed out, and for Explore signed in.

To try it, open any unknown path such as /kim/nothing, signed out and signed in.

Closes #6244

commented

A signed-out 404 now shows Sign in (primary, back to the same address, as before) with secondary Go home and Explore links. Signed in, it keeps Go home as the primary and adds Explore. The tests I ran pass (web-ui, web, web-origins: 105 tests) and bun scripts/design-lint.ts is clean. I pushed the branch but did not open the pull. bun x tsc --noEmit couldn't run here: the sandbox has no bun type definitions, so the type check is unverified until the forge's check runs.

  • plain 404s: a dead /go/:code still shows only Go home, unchanged.
  • Code: the change is in notFoundPage in src/web/chrome.ts.
  • Test: the existing signed-out 404 test in test/web-ui.test.ts used to assert that "Go home" was absent. That was wrong for the new behaviour, so I changed it. It now checks for the Go home and Explore links signed out, and for Explore signed in.

To try it, open any unknown path such as /kim/nothing, signed out and signed in.

Approved

Preview checked: signed-out /kim/nothing serves 404 with Sign in (primary, next=/kim/nothing), then Go home and Explore as plain <a class=btn> links. One accent, JS-free, no new markup or tokens. The plain /go/ miss still shows only Go home. Tests changed for a real reason and cover both states. Next: (1) update the notFoundPage doc comment, which still says it only offers sign-in, to mention the Go home/Explore links; (2) add a test that a plain 404 shows no Explore link or sign-in, so the reveal-nothing path stays pinned.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs