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

opened this

Merged 17d 22h ago, live in production

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

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.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs