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

web: an archived repository's pages say noindex #14305

Merged opened this

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

Merged

AI search tools (Google AI Overviews, ChatGPT search) describe Open Platform with stale text from trevato/mitosis, archived 2026-11-17 (its description points to trevato/open-platform). Until now the forge sent noindex only on claim pages.

Notes

shipped production is serving it deploy 46f3a52

opened this

AI search tools (Google AI Overviews, ChatGPT search) describe Open Platform with stale text from trevato/mitosis, archived 2026-11-17 (its description points to trevato/open-platform). Until now the forge sent noindex only on claim pages.

With this change, every page the router renders under /:owner/:name of an archived repository (home, issues, pulls, files, and everything else below it) sends x-robots-tag: noindex, and the page head carries <meta name="robots" content="noindex">.

  • src/http/archived_noindex.ts: archivedRepoAt(db, params, user) checks whether the route names an archived repository the caller may read. A private archived repository still answers the same 404 as a missing one, so the header gives nothing away.
  • src/http/server.ts: one check per non-API GET, done once in dispatch. The header goes on the response and ctx.noindex is passed to the handler.
  • src/web/layout.ts: page() writes the robots meta when ctx.noindex is set.
  • test/archived-noindex.test.ts: an archived repository's home and issues answer with the header and the meta; a live public repository answers with neither.

No redirects: the archived description already names the new home.

🤖 Generated with Claude Code

commented

<!-- look-pages 1e71740abcf7 --> Look pages for 1e71740, from the gate:

  • look pages (inferred): this pull changes src/web/layout.ts; the forge pictures / (src/web/layout.ts), /docs (src/web/layout.ts), /explore (src/web/layout.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs