Stop repeating identical volume-group deficit numbers on set cards - #80
Merged
Conversation
computeVolumeProgress sums actual reps only up to the rendered index, so every not-yet-reached set in the same group showed the identical "X/Y reps so far" line until one of them actually got completed — redundant noise on a workout screen with several upcoming sets in the same group. Now the deficit line shows on the current set (unchanged) and on the single next upcoming occurrence of each group, giving one heads-up before you get there, but not repeated on every further-out card where the number can't have changed yet. Add a Playwright test locking in that later occurrences stay blank while the immediate next one still shows the deficit.
The "reps so far / X to go" line was showing the same cumulative number on multiple set cards whenever nothing had actually changed between them (e.g. the current set and the next scheduled set of the same exercise, or several untouched upcoming sets in a row) — pure noise repeating the same line down the list. Rework the display so a group's deficit is tracked per-group rather than by raw array adjacency (which breaks once accessory interspersing puts an unrelated set between two occurrences of the same group): - Completed sets now show a growing trail: the running total right after each was logged, but only when it actually changed from the group's last shown value. - The current set shows its own total unless it's identical to what the trail already just showed on the completed card above it. - The next upcoming occurrence of a *different* group (e.g. a pending bonus set queued behind an unrelated primary lift) still gets a one-time heads-up; further-out occurrences of the same group don't repeat it, since nothing can change until the current set is logged.
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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
The "X/Y reps so far · Z to go" volume-group deficit line was showing the same cumulative number on multiple set cards whenever nothing had actually changed between them — e.g. the current set and the next scheduled set of the same exercise, or several untouched upcoming sets in a row. That's pure noise: the number can't move until a set is actually logged.
What changed
Reworked the deficit display in
workout-tracker/src/ui/workout.tsto track each volume group's shown value per-group instead of comparing to the literal previous card in the array (which breaks once accessory interspersing puts an unrelated group's set between two occurrences of the same group):Testing
volume-deficit.spec.ts,edit-set-volume-reconcile.spec.ts, andintersperse-accessories.spec.ts(including a regression test for the interspersed-accessories edge case caught in review, where the dedup can't rely on raw array adjacency).bun run typecheck— clean.bunx playwright testsuite — 415/415 passing.Generated by Claude Code