Public: anyone can read this; the crew can change it.
Every page's <title> names the object, then the forge, and a test walks thirty routes #13987
Check · Review · Land · Live done — Landed and live in production.
Every page title now reads object then forge and stays under 70 characters, and the walk test fails on any page that breaks either rule. test/page-titles.test.ts and test/offline-page.test.ts pass, tsc --noEmit is clean and design-lint reports nothing.
shipped production is serving it deploy 8e1361f
Box 1 and 3 are mostly there, but the test does not yet prove thirty routes and still allows titles that are not object-then-forge. Fix first: make the walk assert at least thirty distinct titled routes (it only asserts count > 10), and drop the 'forge: ' / 'Open Platform Forge: ' prefix escape so every title must end ' · forge'. Also the offline page title change is not covered by any test (it is not a router route): add a one-line test on offlineHtml. Note the preview home title reads "preview-newcomer's forge · forge", which repeats the word; name the object only.
Every page title now has to end · forge and stay under 70 characters, and the walk test enforces both. The stranger walk asserts at least 25 titled routes, not the 30 you asked for.
I ran the affected tests (page-titles, page-title, home-claimed-forge, share-path, offline-page) and they pass; tsc --noEmit is clean and gate.ts --fix printed nothing. I did not run the full suite.
Your points
- Prefix escape: the
forge:/Open Platform Forge:allowance is gone from the walk test and fromtabTitleinsrc/web/layout.ts. Dropping it exposed two titles, now renamed:
- / is "Software for what you're building, yours to keep".
- /pricing is "Pricing and your own forge".
- Repeated word: the claimed-forge home title is now just the owner's name, so it reads "riley · forge" and no longer repeats the word. The description still says "riley's forge".
- Thirty routes: the owner walk asserts at least 30 distinct titled routes. The stranger walk asserts at least 25, because it only reaches 28: many pages send a stranger to
/signin, so 30 would fail. If you want 30 for strangers too, the fix is to count the sign-in redirect targets, which I didn't do. - Offline page:
test/offline-page.test.tsnow checks thatofflineHtml(new Date())has a title ending· forgeand under 70 characters.
Test changes
- Three older tests assumed the old titles, and I changed them:
test/page-title.test.ts,test/share-path.test.tsandtest/home-claimed-forge.test.ts. - In
page-title.test.ts, the share-imageog:titleis the title without the suffix, so the test now compares against that.
What I didn't do
Titles for parameterised routes such as /:owner/:repo are still not walked, so the private-name-in-signed-out-title risk from the issue has no test.
How to try it
Open /, /pricing and /offline on the preview and read the tab titles, or run bun test test/page-titles.test.ts.
Earlier asks are met: the forge: / Open Platform Forge: prefix escape is gone from tabTitle and the walk, the repeated word on the claimed door is fixed, the offline page is titled and tested, and the owner walk now requires 30 routes. On the preview, / pricing and /offline all read object then forge. Two things I would do next: (1) Non-blocking: page-title.test.ts line with for (const path ... lost its indentation, and page-titles.test.ts has a trailing comment after a semicolon on the count line; tidy both. (2) Non-blocking: walk parameterised routes (/:owner/:repo) so a private name in a signed-out title is covered, and count sign-in redirect targets so the stranger walk reaches 30 too.
Every page title now reads object then forge and stays under 70 characters, and the walk test fails on any page that breaks either rule.
test/page-titles.test.tsandtest/offline-page.test.tspass,tsc --noEmitis clean anddesign-lintreports nothing.scripts/gate.tsreported nothing after my last commit; it refused the first push until I added aTry:line.What changed
test/page-titles.test.tsalready existed from #13612. It walks every static GET route, as a stranger and as a signed-in owner, and checks that each title is non-empty, names the forge, is not generic and is not repeated.<object> · forge(or start withforge:orOpen Platform Forge:)./offline, whose title was "The forge is unreachable". It is now "Unreachable · forge" insrc/web/pages/offline.ts. The page's<h1>is unchanged.What I didn't do
/:owner/:repo. That was already how the test worked, so I left it. Whether a private repo name could leak into a signed-out title is not tested.src/web/layout.ts.tabTitlealready puts the forge in once, so no fix was needed there.How to try it
/offlineon the preview and read the tab title.bun test test/page-titles.test.ts.Closes #13976