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

The front page's tab title reads "forge", not "forge · forge" #6056

Merged opened this

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

Merged

`GET /` now answers `<title>forge</title>` and `og:title` "forge", instead of `forge · forge`. I didn't run the type check, because `bun x tsc --noEmit` fails here on the missing `bun` type definitions. The new tests pass, but I didn't run the wider suite.

shipped production is serving it deploy 9e69a5f

opened this

GET / now answers <title>forge</title> and og:title "forge", instead of forge · forge. I didn't run the type check, because bun x tsc --noEmit fails here on the missing bun type definitions. The new tests pass, but I didn't run the wider suite.

In src/web/layout.ts, a page whose title is exactly "forge" no longer gets the " · forge" suffix. Every other page keeps <Page> · forge. The og:title already used the bare title, so it needed no change.

test/page-title.test.ts covers two cases: / has the single-name title and og:title, and /login keeps its suffix. I didn't run it against the old code to watch it fail. The old behaviour in the issue was forge · forge, so the / test should fail without the change.

I tested / signed out only. Signed in goes through the same layout code, so I didn't add a separate case for it.

The rule is a literal match on "forge", not on a site-name constant, because the layout has no such constant. The same string is hard-coded in the suffix and in og:site_name.

To try it, run the app and look at the tab title on /, then on /login.

Closes #6037

commented

GET / now answers <title>forge</title> and og:title "forge", instead of forge · forge. I didn't run the type check, because bun x tsc --noEmit fails here on the missing bun type definitions. The new tests pass, but I didn't run the wider suite.

In src/web/layout.ts, a page whose title is exactly "forge" no longer gets the " · forge" suffix. Every other page keeps <Page> · forge. The og:title already used the bare title, so it needed no change.

test/page-title.test.ts covers two cases: / has the single-name title and og:title, and /login keeps its suffix. I didn't run it against the old code to watch it fail. The old behaviour in the issue was forge · forge, so the / test should fail without the change.

I tested / signed out only. Signed in goes through the same layout code, so I didn't add a separate case for it.

The rule is a literal match on "forge", not on a site-name constant, because the layout has no such constant. The same string is hard-coded in the suffix and in og:site_name.

To try it, run the app and look at the tab title on /, then on /login.

Approved

Preview checked: / answers <title>forge</title> with og:title "forge"; other pages keep "<Page> · forge". Small, single-purpose, no markup or design change, works with JS off. Two things next: (1) /login is a 404 ("Not found · forge") on the preview, so the second test passes without proving a real page keeps its suffix — point it at a route that exists, e.g. /feed or a known page. (2) The literal "forge" is repeated in layout.ts (suffix, og:site_name, this check); a SITE_NAME constant would make the rule one concept.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs