Skip to content

Stop repeating identical volume-group deficit numbers on set cards - #80

Merged
willchan merged 2 commits into
mainfrom
claude/new-session-rlaam3
Aug 13, 2026
Merged

Stop repeating identical volume-group deficit numbers on set cards#80
willchan merged 2 commits into
mainfrom
claude/new-session-rlaam3

Conversation

@willchan

Copy link
Copy Markdown
Owner

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.ts to 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):

  • Completed sets now show a growing trail — the running total right after each was logged — but only when it actually changed from that 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.

Testing

  • TDD throughout: new/updated Playwright specs in volume-deficit.spec.ts, edit-set-volume-reconcile.spec.ts, and intersperse-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.
  • Full bunx playwright test suite — 415/415 passing.
  • Went through an adversarial code-review loop; one real correctness bug (interspersed-accessories dedup) and two minor efficiency/reuse nits were found and fixed.

Generated by Claude Code

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.
@willchan
willchan merged commit 8cefeac into mainAug 13, 2026
8 checks passed
@willchan
willchan deleted the claude/new-session-rlaam3 branch August 13, 2026 04:42
Sign up for freeto 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.

2 participants

@willchan@claude