Fix time filter to sync across all dashboard views#52
Fix time filter to sync across all dashboard views#52pineapplestrikesback merged 1 commit intomainfrom
Conversation
The time filter (This Week/Last 7 Days) in the WeeklyActivityChart now updates the heatmap and muscle list view as well, not just the bar chart. - Added mode parameter to useWorkouts hook supporting calendar week mode - Updated useVolumeStats hooks to accept ViewMode parameter - Lifted viewMode state from WeeklyActivityChart to Dashboard - Passed viewMode to TotalVolumeCard, MuscleHeatmap, and MobileCarousel - Updated mobile components (MobileHeatmap, MobileMuscleList, MuscleDetailModal) to respect the shared viewMode https://claude.ai/code/session_019k1SNeEWQfGDPehucnB57U
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR introduces a Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Dashboard as Dashboard<br/>(viewMode state)
participant WAC as WeeklyActivityChart<br/>(controlled)
participant VM as useVolumeStats<br/>Hooks
participant UW as useWorkouts
participant API as Data
User->>Dashboard: select viewMode
activate Dashboard
Dashboard->>WAC: viewMode prop
Dashboard->>VM: daysBackOrMode param
deactivate Dashboard
activate WAC
WAC->>WAC: setViewMode updates<br/>parent state
deactivate WAC
activate VM
VM->>UW: pass viewMode
deactivate VM
activate UW
UW->>UW: Calculate date range<br/>based on mode
Note over UW: last7days: today-6 to today<br/>calendarWeek: Mon-Sun
UW->>API: fetch with dateRange
deactivate UW
API-->>UW: workouts
UW-->>VM: workouts[]
VM-->>Dashboard: stats, totalVolume
Dashboard->>User: render with new data
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
✨ Finishing touches
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 |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
The time filter (This Week/Last 7 Days) in the WeeklyActivityChart now
updates the heatmap and muscle list view as well, not just the bar chart.
to respect the shared viewMode
https://claude.ai/code/session_019k1SNeEWQfGDPehucnB57U
Summary by CodeRabbit
Release Notes
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.