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

Every page route has a distinct, non-empty <title> that names the page and the forge, proven by a walk #13612

Merged opened this

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

Merged

A new test, test/page-titles.test.ts, walks every static page route and fails on a title that is empty, repeated, generic or missing the forge's name. It found four collisions, and I fixed them. The new test and 231 existing tests around the touched pages pass.

Notes

shipped production is serving it deploy 8e1361f

opened this

A new test, test/page-titles.test.ts, walks every static page route and fails on a title that is empty, repeated, generic or missing the forge's name. It found four collisions, and I fixed them. The new test and 231 existing tests around the touched pages pass. bun x tsc --noEmit, bun scripts/gate.ts --fix and bun scripts/design-lint.ts are clean. I did not run the full suite or bun scripts/fast.ts's named set, which was too broad (2008 files).

How the walk works. It takes every GET pattern with no parameter from buildRouter() and requests each one as a signed-in owner and as a stranger. Only HTML 200s with a full document are checked. Streams are dropped unread, and fragments such as /live/* are not treated as pages.

Collisions fixed (page text only):

  • The four Usage tabs (/settings/spend, /settings/usage, /settings/capacity, /settings/telemetry) all said "Usage". They now read "Spend · Usage", "Routes · Usage" and so on.
  • /packs and /settings/packs were both "Packs"; the settings page is now "Packs settings".
  • /security and /settings/security were both "Security"; the settings page is now "Security settings".
  • /data and /admin/data were both "Data", because the "· forge" suffix on the admin page was collapsed. The admin page is now "Forge data".

Left out:

  • Routes with parameters, such as repository, issue and app pages, are not walked.
  • /front is exempted by name in the test, because it answers with the home page's title by design.
  • The test only checks routes that answer 200 in the seeded state (an owner and no repositories), so a page that needs more setup is skipped unchecked.

Try: open /settings/spend and /settings/usage on the preview and read the tab titles.

The commits say No door and No look, because only a tab title changes.

Closes #13588

commented

A new test, test/page-titles.test.ts, walks every static page route and fails on a title that is empty, repeated, generic or missing the forge's name. It found four collisions, and I fixed them. The new test and 231 existing tests around the touched pages pass. bun x tsc --noEmit, bun scripts/gate.ts --fix and bun scripts/design-lint.ts are clean. I did not run the full suite or bun scripts/fast.ts's named set, which was too broad (2008 files).

How the walk works. It takes every GET pattern with no parameter from buildRouter() and requests each one as a signed-in owner and as a stranger. Only HTML 200s with a full document are checked. Streams are dropped unread, and fragments such as /live/* are not treated as pages.

Collisions fixed (page text only):

  • The four Usage tabs (/settings/spend, /settings/usage, /settings/capacity, /settings/telemetry) all said "Usage". They now read "Spend · Usage", "Routes · Usage" and so on.
  • /packs and /settings/packs were both "Packs"; the settings page is now "Packs settings".
  • /security and /settings/security were both "Security"; the settings page is now "Security settings".
  • /data and /admin/data were both "Data", because the "· forge" suffix on the admin page was collapsed. The admin page is now "Forge data".

Left out:

  • Routes with parameters, such as repository, issue and app pages, are not walked.
  • /front is exempted by name in the test, because it answers with the home page's title by design.
  • The test only checks routes that answer 200 in the seeded state (an owner and no repositories), so a page that needs more setup is skipped unchecked.

Try: open /settings/spend and /settings/usage on the preview and read the tab titles.

The commits say No door and No look, because only a tab title changes.

Approved

Approved. The four collisions are fixed with plain, distinct titles. The walk takes its routes from the router, so a new static page that repeats a title fails it. No layout, markup or script changes, and nothing touches tokens, accent or JavaScript-off behaviour. I could only fetch the public /packs and /security on the preview (both still read "· forge"); the settings pages need a sign-in, so I did not see the new titles there.

Two things I would do next:

  1. In src/web/pages/usage-tabs.ts, TABS.find(...)?.label can render "undefined · Usage" if a tab id is ever missing. Look the label up with a fallback or a throw.
  2. Add a seeded repository, issue and app to the walk, so pages that need setup are checked too. Today they are skipped silently, and /front is exempted by name.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs