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

web: full share head and JSON-LD on every public page; noindex where robots.txt disallows #14310

Merged opened this

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

Merged

An audit of the live signed-out pages (/, /explore, /pricing, /docs, /agents, /security, /changelog, /status, /signin, /signup, a user page, a repository and app page, its issues list, one issue, a 404) found these gaps. Most are fixed in the shared head (src/web/layout.ts).

Notes

shipped production is serving it deploy 2829c4f

opened this

An audit of the live signed-out pages (/, /explore, /pricing, /docs, /agents, /security, /changelog, /status, /signin, /signup, a user page, a repository and app page, its issues list, one issue, a 404) found these gaps. Most are fixed in the shared head (src/web/layout.ts).

Shared head (shareHead, brandHead, themeColorHead in layout.ts)

  • Added og:locale (en_US), og:image:alt, twitter:title, twitter:description and twitter:image:alt. A page's own card gets "Link preview for X on Open Platform Forge". The site card gets the words drawn on it.
  • og:title no longer ends in " · forge" (a long issue title used to carry it).
  • Descriptions are cut at a word boundary at 160 characters instead of 360. An app's line keeps "Status: …" whole.
  • Icons: the SVG icon now states its type, and a PNG icon (/icons/forge-32.png) is added beside the apple-touch icon and the manifest.
  • noindex now covers error pages (404) and the pages robots.txt disallows (/signin, /signup, /settings, /search). It comes from one list, UNINDEXED_PAGES in standards.ts, so robots.txt and the meta tag cannot disagree.
  • A page with crumbs gets a BreadcrumbList JSON-LD that ends on the page itself (repository subpages, issues, pulls, docs).

JSON-LD

  • Front page: the WebSite node gains a SearchAction (/search?q={search_term_string}).
  • Public repositories always get SoftwareSourceCode (now with codeRepository), on the code page and also on the app page. Before, a repository with reports closed had none, and trevato/forge was one of them. The report and offer actions still appear only when those are open.
  • User and organization pages get ProfilePage with a Person or Organization node.

Per-page text

  • /docs, /signin, /security and 404 had descriptions that were too short or generic. They now have their own, each 50–160 characters.
  • The issues, pull requests and runs lists get their own descriptions.
  • List and compose titles name owner/name. The issues list of trevato/forge used to be titled "Issues · forge".
  • The user page line is now "@x on Open Platform Forge: a person with N public repositories."
  • /status had no description, canonical, share tags, icons or theme-color. It now carries the same share head and stays under 6 KB. manifest-src 'self' is added to its CSP.

Tests

  • test/public-head.test.ts walks 17 page kinds and checks every rule on each: lang, length limits, canonical = og:url, og and twitter parity, theme-color light and dark, viewport, color-scheme, the three icons, the manifest, noindex only where expected, JSON-LD type by kind, and unique titles and descriptions.
  • It also checks that every share card is a reachable 1200×630 PNG, that the WebSite SearchAction and the breadcrumb end are right, that a 404 says noindex and has no canonical, and that robots.txt and the sitemap agree.
  • The terms page's shell bound goes from 10 KB to 10.5 KB, because the head now carries the full share tags.

SITE_WHAT is untouched (#14306).

On main before this change, agents-page.test.ts ("the home page's prompt and Open-in links", sentinel #14304) and pages-budget.test.ts (+1 statement on three routes, fixed on branch archived-noindex-budget) already fail. This pull does not change either result.

🤖 Generated with Claude Code

commented

<!-- look-pages b22b6ba22dcd --> Look pages for b22b6ba, from the gate:

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

<!-- look-pages ff0604800a8f --> Look pages for ff06048, from the gate:

  • look pages (inferred): this pull changes src/web/chrome.ts, src/web/describe.ts, src/web/layout.ts and 11 more; the forge pictures / (src/web/chrome.ts), /docs (src/web/chrome.ts), /explore (src/web/chrome.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