Skip to content

fix(mobile): unstick PWA orientation, add date range + slash-split cities#239

Merged
justmarks merged 2 commits intomainfrom
claude/fix-pwa-rotation-55bRb
May 9, 2026
Merged

fix(mobile): unstick PWA orientation, add date range + slash-split cities#239
justmarks merged 2 commits intomainfrom
claude/fix-pwa-rotation-55bRb

Conversation

@justmarks
Copy link
Copy Markdown
Owner

Summary

  • PWA rotation (real fix this time). fix: let installed PWA rotate with the device #238 swapped the manifest from orientation: "portrait" to "any", but the service worker was caching /manifest.webmanifest cache-first. Chrome's update probe kept seeing the old portrait value, so installed PWAs never picked up the change. Bump SW_VERSION to v7 to evict the stale runtime cache, and switch the manifest to network-first so future manifest tweaks propagate without another SW bump.
  • Date range next to the title on the mobile trip page. Right-aligned, small + muted next to the trip title in the carousel header, so users can confirm at a glance which trip they're looking at without scrolling into the day strip.
  • Cities row uses slash separator + excludes the home bookend. A SEA → Tokyo → Kyoto → SEA itinerary now reads as Tokyo / Kyoto instead of Seattle · Tokyo · Kyoto. The bookend logic is shared with primaryLocationFor via a new tripDestinationCities helper in @travel-app/shared.

Notes for installed PWAs

After this lands, existing PWA installs should rotate on next launch (the v7 SW activates → wipes the stale manifest → Chrome re-reads orientation: "any"). iOS PWAs ignore the manifest's orientation field entirely — they already rotate by default unless device rotation is locked.

Test plan

  • Install the PWA on Android, rotate the device — orientation follows the OS.
  • Mobile trip page shows the date range to the right of the title and stays readable when the title is long (title truncates, dates don't).
  • Cities row reads as Tokyo / Kyoto for a SEA → Tokyo → Kyoto → SEA trip; reads as Seattle for a Seattle-only staycation (bookend exclusion is dropped to avoid an empty row).
  • pnpm test and pnpm lint pass.

https://claude.ai/code/session_01H5kv9m5n8eYqwnyGZzvgTW


Generated by Claude Code

…ties

The PWA orientation fix in #238 only updated the manifest source. The
service worker was caching `/manifest.webmanifest` cache-first, so
Chrome's update probe kept seeing the old `orientation: portrait`
value and installed PWAs stayed locked to portrait. Bump SW_VERSION
to v7 to evict the stale runtime cache, and switch the manifest to
network-first so future manifest changes propagate without another
SW bump.

While in the mobile trip header:

- Surface the trip's date range next to the title (right-aligned,
  small + muted) so users can confirm they're looking at the right
  trip without scrolling into the day strip.
- Use the slash separator and exclude the home bookend from the
  cities row — a SEA → Tokyo → Kyoto → SEA itinerary now reads as
  "Tokyo / Kyoto" rather than "Seattle · Tokyo · Kyoto". The
  bookend logic is shared with `primaryLocationFor` via a new
  `tripDestinationCities` helper in `@travel-app/shared`.

https://claude.ai/code/session_01H5kv9m5n8eYqwnyGZzvgTW
@vercel
Copy link
Copy Markdown

vercel Bot commented May 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
itinly Ready Ready Preview, Comment May 9, 2026 3:38pm

Slash reads as a transfer-day notation ("Paris / Rome" = travel from
one to the other on the same day) elsewhere in the app, so reusing
it for the trip-level cities row at the top of the mobile carousel
muddied the meaning. Middle-dot is the same separator the row used
before slash-split and matches the rest of the app's chip / pill
separators.

https://claude.ai/code/session_01H5kv9m5n8eYqwnyGZzvgTW
@justmarks justmarks merged commit a7549e1 into main May 9, 2026
3 checks passed
@justmarks justmarks deleted the claude/fix-pwa-rotation-55bRb branch May 9, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants