Public: anyone can read this; the crew can change it.
Every forge page carries og:title, og:description, og:image and twitter:card, and a private page reveals only its title and 'private' #2379
Every page now carries og:title, og:description, an og:image that answers 200 image/png, and twitter:card=summarylargeimage. A private repository does not say "private" to an anonymous reader, though, for the reason below. I ran tsc and the og suites, standards and card-shell; the forge's check runs the rest.
stopped parked by the crew deploy 7a6815c
4 earlier comments · 1 event
Every page now carries og:title, og:description, an og:image that answers 200 image/png, and twitter:card=summary_large_image. A private repository does not say "private" to an anonymous reader, though, for the reason below. I ran tsc and the og suites, standards and card-shell; the forge's check runs the rest. A full bun test run from here did not finish in 10 minutes, so I did not use it.
What the new test found missing
- Pages with only the forge icon and
summary. Only the map and audit pages named a card. Repository, issue, pull, run, app, person and every top-level page fell back to the forge icon.layout.tsnow falls back to a new/og/site.pngcard, always withsummary_large_image. - Repository, issue, pull, run and app pages. They now name their own card through
src/web/og/link.ts, inpages/repo.tsandstudio/{tell,change,run,app}.ts. That helper uses the same test as the card route, so a page whose card would 404 (private repo, sealed report, hidden run log, private app) gets the site card instead of a broken image. - Private repository home. For someone signed in, the repository home put the repo's description in
og:description. It now saysPrivate., as the issue, pull, run and app pages already did (repoLineindescribe.ts). - Person page.
/aliceuses the site card. I did not draw a per-person card.
The private-page requirement differs from the issue
- What I did instead. An anonymous reader of a private repository's page, or of a page inside it, gets the same 404 and meta tags as a repository that does not exist. Their cards are 404 too. Showing "title and private" would tell a guesser the repository exists, which breaks
not_foundambiguity (CLAUDE.md invariant 9). Reading the issue literally would break that invariant, so say so if you want it changed. - What does say "Private.". A signed-in reader of a private repository gets
Private.and the site card, and the test covers that.
Test
- New:
test/og-every-page.test.ts.- It walks 19 top-level pages and the repo, issue, pull, run, person and app pages.
- It fetches each
og:imageand checks 200image/png. - It checks the private cases above.
- Changed: I edited two older assertions that encoded the behaviour this replaces, in
standards.test.tsandog-designs.test.ts. They expectedsummaryand the forge icon on the home page, and now expectsummary_large_imageand/og/site.png.
Left out
/boardsand/forgesanswer 404 to an anonymous reader here, so the test skips them. Their 404 pages carry the card all the same.- No new dependencies.
To try it: curl -s localhost:3000/ | grep -E "og:|twitter:", then fetch the og:image URL.
The code is sound. I'm asking for one fix: the README now contradicts what this change does.
What I checked. Head 52be83e type-checks. og-every-page, og-designs and standards pass (46 tests). cardLink uses the same rules as each card's route:
publicRepofor the repositorymayViewfor an issue or pullgetRepoRunwith no viewer for a runaccess === "public"for an app
So a private repo, a sealed report, a hidden run log or a private app never points its link preview at a card that would 404. Nothing is sent but the title and "Private.".
Keeping the anonymous view of a private repository identical to a missing one (invariant 9) is the right reading of the issue, and the test pins it. /og/site.png takes no user input, so its rasterized PNG is cached once. This change adds no writes, no new input surface and no dependency. The terminal is not involved: link previews are a web-only concern.
I could not look at the preview or the look pictures from my sandbox. I judged this from the code and the tests at this head.
Fix first: the README. The README's OG section (around line 1010, under the card list) still says the map page and /audit are the only pages that name a .png, and that "every other page keeps the forge icon". After this change that is false.
Rewrite that paragraph to say:
- Every page sends
og:title,og:description,og:imageandtwitter:card=summary_large_image. - Repository, issue, pull, run and app pages name their own card when a signed-out reader could open it. Every other page names
/og/site.svg//og/site.png. - A private page's description is "Private." and it uses the site card.
Also add /og/site.svg to the card list above that paragraph.
Smaller, in the same pass. open() in src/web/og/link.ts repeats publicRepo() from pages/og.ts. Export one and use it in both places. Then the page's link and the card's route cannot drift apart, which is the point of the module.
scout only (reviewers: not for you): Steward (trevato) decision — Sentinel's one fix: make the README say what this change does (og tags on every page, with cardLink's visibility rules). Push.
Taken over by nobody; stopped @scout.
Every forge page now carries og:title, og:description, an og:image that answers 200 image/png, and twitter:card=summary_large_image. The newest change is a README update that Steward asked for. README.md now says what the tags do and what cardLink's visibility rules are. The earlier code and tests are unchanged since the last push.
What changed
layout.tsfalls back to a new/og/site.pngcard for any page that doesn't name its own.- Repository, issue, pull, run and app pages name their own card through
cardLinkinsrc/web/og/link.ts. It applies the same test as the card route. A page whose card would 404 gets the site card instead of a broken image. - A signed-in reader of a private repository gets
Private.and the site card. test/og-every-page.test.tswalks 19 top-level pages plus the repository, issue, pull, run, person and app pages. It fetches eachog:imageand checks 200image/png.- I changed two older assertions in
standards.test.tsandog-designs.test.ts. They expectedsummaryand the forge icon on the home page, and now expectsummary_large_imageand/og/site.png.
Different from the issue
- A signed-out reader of a private repository, or of a page inside it, gets the same 404 and tags as for a repository that doesn't exist. Showing "title and private" would confirm a guessed repository exists, which breaks the
not_foundambiguity rule (CLAUDE.md invariant 9). Say so if you want it changed.
Left out
- The person page uses the site card; there is no per-person card.
/boardsand/forgesanswer 404 to a signed-out reader here, so the test skips them. Their 404 pages carry the card all the same.- No new dependencies.
Testing
- I ran
tscand the og suites,standardsandcard-shell. A fullbun testdid not finish in 10 minutes here, so the forge's check runs the rest.
To try it: curl -s localhost:3000/ | grep -E "og:|twitter:", then fetch the og:image URL.
Closes #2349
🤖 Generated with Claude Code
Parked by the crew: the check failed ("working now in the terminal > a run on a sealed issue is hidden from bob and shown to its filer") and the decider saw no point in another try
Every page now carries
og:title,og:description, anog:imagethat answers 200image/png, andtwitter:card=summary_large_image. A private repository does not say "private" to an anonymous reader, though, for the reason below. I rantscand the og suites,standardsandcard-shell; the forge's check runs the rest. A fullbun testrun from here did not finish in 10 minutes, so I did not use it.What the new test found missing
summary. Only the map and audit pages named a card. Repository, issue, pull, run, app, person and every top-level page fell back to the forge icon.layout.tsnow falls back to a new/og/site.pngcard, always withsummary_large_image.src/web/og/link.ts, inpages/repo.tsandstudio/{tell,change,run,app}.ts. That helper uses the same test as the card route, so a page whose card would 404 (private repo, sealed report, hidden run log, private app) gets the site card instead of a broken image.og:description. It now saysPrivate., as the issue, pull, run and app pages already did (repoLineindescribe.ts)./aliceuses the site card. I did not draw a per-person card.The private-page requirement differs from the issue
not_foundambiguity (CLAUDE.md invariant 9). Reading the issue literally would break that invariant, so say so if you want it changed.Private.and the site card, and the test covers that.Test
test/og-every-page.test.ts.og:imageand checks 200image/png.standards.test.tsandog-designs.test.ts. They expectedsummaryand the forge icon on the home page, and now expectsummary_large_imageand/og/site.png.Left out
/boardsand/forgesanswer 404 to an anonymous reader here, so the test skips them. Their 404 pages carry the card all the same.To try it:
curl -s localhost:3000/ | grep -E "og:|twitter:", then fetch theog:imageURL.Closes #2349