Mark completed workout days in day picker#24
Merged
Conversation
Query workout history for the current cycle+week and visually disable day buttons that have already been completed (with strikethrough and reduced opacity). This prevents accidentally re-selecting a finished day and makes it clear which workouts remain in the current week. https://claude.ai/code/session_018eaTK95ZfpXszWTjSGFSVn
Generates baseline screenshots showing the home screen with Squat and Bench days marked as completed (strikethrough + reduced opacity) while Deadlift is the active next workout. https://claude.ai/code/session_018eaTK95ZfpXszWTjSGFSVn
The test was reloading the page before the async IndexedDB write from the checkbox change handler had completed. Now polls IndexedDB directly to confirm the setting is persisted before reloading. https://claude.ai/code/session_018eaTK95ZfpXszWTjSGFSVn
The fix from main already polls IndexedDB via waitForFunction; remove the redundant toPass block that our branch added independently. https://claude.ai/code/session_018eaTK95ZfpXszWTjSGFSVn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add visual indicators for completed workout days in the home screen's day picker. Days that have been completed in the current cycle and week are now marked with a "completed" style and disabled to prevent re-selection.
Key Changes
E2E Tests: Added comprehensive test suite (
completed-days.spec.ts) covering:Home Screen Logic: Modified
renderHome()to:getAllHistory()Styling: Added
.day-picker-btn.completedstyles to visually distinguish completed days:Implementation Details
Completed days are determined by checking if a workout history entry exists for the current template, cycle, and week combination. The completed state is scoped to the current cycle+week, so switching to a different week will show no completed days for that week.
https://claude.ai/code/session_018eaTK95ZfpXszWTjSGFSVn