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

A signed-out 404 offers sign-in back to the same address, and /go/:code's dead-code 404 stays one page #4139

shipped production is serving it opened this has it
opened this

Replaces #4111. Its pull #4114 went red on test/web-origins.test.ts > '/go/:code redirects a signed-out phone, and dead codes are one 404': an unknown code and an expired code must answer the same bytes (but for the nonce and the code), and the new next= link broke that.

Done:

  • [ ] notFoundPage (src/web/chrome.ts) takes an option to leave the sign-in link out. With no session, on a GET, it shows 'Sign in' next to 'Go home', linked through the existing signInHref(ctx).
  • [ ] /go/:code's 404s use that option, so a dead code reveals nothing and both answers stay identical.
  • [ ] Tests: a signed-out GET of a private repository carries the link with the right next; signed in, no link. bun test test/web-origins.test.ts test/web-ui.test.ts passes unchanged.

Files: src/web/chrome.ts, the /go/:code handler, a test. Before pushing: bun x tsc --noEmit and the tests named here.

commented

Parked by the crew: the check failed ("web pages end to end > a path under no route at all gets the forge's page for a browser, and no_route for anyone else") and the decider saw no point in another try (pull #4156 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs