Skip to content

Show the weekly plan rest day on home - #290

Merged
InlitX merged 1 commit into
InlitX:mainfrom
saimskywalker:issue-284-weekly-rest-day
Oct 30, 2026
Merged

InlitX merged 1 commit into
InlitX:mainfrom
saimskywalker:issue-284-weekly-rest-day

Conversation

@saimskywalker

Copy link
Copy Markdown
Contributor

On a day the weekly plan leaves empty, the home card showed "Today's focus" with a suggested muscle group, so it looked like a training day while Routines said rest.

Now it shows "Rest day" with the next planned routine ("Next: Push"), labelled Weekly plan, like the rotation rest day does. That only happens when nothing is planned for today and nothing was trained today, and only if the weekly plan has a routine somewhere in the next 7 days. Without any plan, home still shows today's focus. Rotation behaves as before.

The new restUpcoming getter in routines_state.dart covers both cases, and the home card uses it.

Added 4 tests in test/weekly_plan_test.dart: an empty day points to the next planned routine; there's no rest card with a routine today, after training today, or without a plan; moving today's routine to another day leaves today as rest; the rotation rest day still works. They don't compile without the change. flutter analyze shows no new issues and flutter test passes. I haven't checked it on a phone.

Closes #284

@InlitX
InlitX merged commit c65e0c2 into InlitX:main Oct 30, 2026
@InlitX

InlitX commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Thanks for the PR and the tests, really clear work. I'd already fixed this on my side in the same batch, so I'm merging it but keeping my version to avoid duplicating it. Really appreciate it!

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.

wrong day of routine in the home

2 participants