Skip to content

Lead the home screen with the rider's own mountains - #15

Merged
greenido merged 1 commit into
mainfrom
feat/home-your-mountains
Oct 1, 2026
Merged

greenido merged 1 commit into
mainfrom
feat/home-your-mountains

Conversation

@greenido

@greenido greenido commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Why

A returning rider landed on the hero, pass filter, units switch, view tabs, search, a location button and then a large welcome card with no data in it. Their favorites were hidden behind a star button.

What

  • HomePicks (new) on the home screen, directly below search:
    • With favorites: "Your mountains today". Up to 6 favorites, ranked by today's Ride Score. Each row shows the 24h snow and its best day this week, taken from the planner's mid-mountain outlook so it matches the grid. There's also a link to the full favorites comparison.
    • Without favorites: "Top picks today". It takes the 6 biggest resorts in the region the browser's time zone points to and shows the best 3, plus a "See all" link into Compare.
  • regionForTimezone() in lib/regions.ts, with a new tests/regions.test.ts:
    • It needs no permission prompt and puts nothing in the URL.
    • If the guessed region has no resorts (for example after a pass filter, or Scandinavia, which has none yet), it falls back to the first available region.
    • The time zone is read after mount so the static prerender can't bake in the build machine's zone.
  • The empty welcome card is replaced by its one useful line: the resort count and the credit.

Testing

  • tsc --noEmit, next lint and all 10 offline test suites pass, including the new regions suite.
  • 375×812, no favorites: shows "Top picks today · US West" (the browser is set to America/Los_Angeles).
  • 375×812, 3 favorites: shows the favorites ranked, with "best Mon (54)" on Zermatt. Tapping a row opens the resort and Back returns home. No console errors.
  • 1440×900: the list is capped to the search bar's width.

Merge order

This is 3 of 3. I merged #13, #14 and this PR onto main in that order on a scratch branch: all three merged without conflicts (git auto-merged app/page.tsx, where #13 and this PR touch different parts). On the combined result, lint, typecheck, all 10 test suites and next build pass.

🤖 Generated with Claude Code

A returning rider landed on the hero, the pass filter, a units switch,
the view tabs, search, a location button and a welcome card with no data
in it. Their favorites were behind a star.

- New HomePicks list on the home screen. With favorites: "Your mountains
  today", up to six, ranked by today's Ride Score, each with its best
  day this week (from the planner's outlook, so it matches the grid),
  and a link to the full favorites comparison.
- Without favorites: "Top picks today", the best three of the six
  biggest resorts in the range the browser's time zone points to
  (regionForTimezone() in lib/regions.ts, with tests). No permission
  prompt, nothing in the URL; it falls back to the first available
  region when the guess has no resorts, e.g. after a pass filter.
- The empty welcome card is replaced by its one useful line (resort
  count and credit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greenido
greenido merged commit 8ab2bd4 into main Oct 1, 2026
2 checks passed
@greenido
greenido deleted the feat/home-your-mountains branch October 1, 2026 18:54
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.

1 participant