feat: sync /races filters to the URL and make /courses navigable#254
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 31 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Addresses Reddit feedback on tritimes.org: - The /races filters (distance, year, search) now live in the URL, so a filtered view is shareable and Back from a race detail restores it. The URL is the single source of truth (derived during render), replacing the local useState mirror. - The /courses page gains a full, alphabetical, clickable list of every course per distance (previously only the top-10 charts were shown, and nothing was clickable). Chart bars are now clickable too. Both link to a pre-filtered /races view for that course. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DLbmbQZFx5Ffuu4LUhPj6p
a1135b5 to
019a816
Compare
Summary
Addresses Reddit feedback on tritimes.org with two UX improvements:
1.
/racessearch updates the URLPreviously the distance/year/search filters lived only in client state, so a filtered view couldn't be shared and hitting Back from a race lost your filters.
Now the filters are reflected in the URL (
/races?distance=140.6&q=wisconsin):Implemented by making the URL the single source of truth (derived during render via
useSearchParams), so back/forward restoration is free. Usesrouter.replaceso typing doesn't spam history.2.
/coursesis now navigableThe redditor noted the Courses page was "a bit deceiving" — it only listed the 10 fastest courses and nothing was clickable.
/racesview (e.g./races?distance=140.6&q=Wisconsin), reusing improvement Back to search link on result page should navigate to home #1.Implementation notes
app/src/lib/races-url.tshandles filter↔URL (de)serialization and the course-link helper, with unit tests (races-url.test.ts)./raceswrapsRaceListin<Suspense>(required foruseSearchParams); the route stays statically rendered.CourseListis the accessible, keyboard-navigable path; clickable chart bars are a convenience enhancement.Testing
races-url(171 total passing).npm run buildsucceeds;/racesand/coursesremain static.🤖 Generated with Claude Code
https://claude.ai/code/session_01DLbmbQZFx5Ffuu4LUhPj6p