chore: dynamic page titles for browser history #19

Merged
erik merged 1 commit from chore/dynamic-page-titles into main 2026-05-23 02:53:25 +00:00
Member

Refs: #18


Summary

  • Added title?: string to the shared State interface in utils.ts
  • Updated _app.tsx to use ctx.state.title ?? "trippin" for the <title> tag
  • Set ctx.state.title in every page handler: item-specific pages (trips, teams, shared views) use the item name; list and utility pages get a descriptive static label (e.g. "My Trips | trippin", "Globe | trippin")

Test plan

  • Visit a trip detail page — browser tab and history show the trip name
  • Visit a team detail page — tab shows team name
  • Visit a shared-link trip — tab shows trip name
  • Visit list pages (Trips, Teams, Sharing, Globe) — tab shows descriptive label
  • Auth pages (Sign In, Sign Up, etc.) — tab shows page name
  • just validate passes (78 tests, clean audit/sast/secrets)
Refs: #18 --- ## Summary - Added `title?: string` to the shared `State` interface in `utils.ts` - Updated `_app.tsx` to use `ctx.state.title ?? "trippin"` for the `<title>` tag - Set `ctx.state.title` in every page handler: item-specific pages (trips, teams, shared views) use the item name; list and utility pages get a descriptive static label (e.g. "My Trips | trippin", "Globe | trippin") ## Test plan - [ ] Visit a trip detail page — browser tab and history show the trip name - [ ] Visit a team detail page — tab shows team name - [ ] Visit a shared-link trip — tab shows trip name - [ ] Visit list pages (Trips, Teams, Sharing, Globe) — tab shows descriptive label - [ ] Auth pages (Sign In, Sign Up, etc.) — tab shows page name - [ ] `just validate` passes (78 tests, clean audit/sast/secrets)
chore: set dynamic page titles for browser history
All checks were successful
Validate / validate (pull_request) Successful in 1m0s
91a91630a1
Each route now sets ctx.state.title so the <title> tag in _app.tsx reflects the current page. Item-specific pages (trips, teams, shared views) use the item name; list and form pages get a descriptive label. Fallback remains "trippin" for any page that doesn't set a title.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
erik merged commit d63afc688b into main 2026-05-23 02:53:25 +00:00
erik deleted branch chore/dynamic-page-titles 2026-05-23 02:53:26 +00:00
Sign in to join this conversation.
No description provided.