Skip to content

Today Plan shows incorrect workout on rest days and misses multiple workouts #74

@hdkiller

Description

@hdkiller

📝 Description

The "Today Plan" section on the Dashboard behaves incorrectly in two scenarios:

  1. Rest Days / No Workout: If there is no workout scheduled for today, it often displays the next upcoming workout (e.g., tomorrow's) instead of showing a "Rest Day" or empty state.
  2. Multiple Workouts: If a user has multiple workouts planned for the same day (e.g., a morning run and evening gym session), the component fails to display all of them, likely showing only one.

👣 Steps to Reproduce

Scenario A (Rest Day Bug):

  1. Ensure "Today" has no planned workouts in the calendar.
  2. Ensure "Tomorrow" (or a future date) does have a planned workout.
  3. Navigate to /dashboard.
  4. Observe the "Today Plan" section displaying the future workout as if it were for today.

Scenario B (Multiple Workouts):

  1. Schedule two distinct workouts for "Today".
  2. Navigate to /dashboard.
  3. Observe that only one workout is visible in the "Today Plan" section.

😯 Expected Behavior

  1. Rest Days: The component should clearly indicate "Rest Day" or "No workouts planned" if the current day has no sessions.
  2. Multiple Workouts: The component should support displaying a list or carousel of all workouts scheduled for the current day.

🐛 Actual Behavior

  1. Future workouts bleed into "Today" when today is empty.
  2. Only a single workout is rendered even when multiple exist.

💻 Environment

  • Component: Dashboard "Today Plan" widget
  • Area: Frontend logic (likely date filtering or query issue)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions