Skip to content

GymLog: tier PR border by overall / phase / rep#1

Draft
nt1998 wants to merge 3 commits into
mainfrom
claude/phase-pr-visualization-jRDOp
Draft

GymLog: tier PR border by overall / phase / rep#1
nt1998 wants to merge 3 commits into
mainfrom
claude/phase-pr-visualization-jRDOp

Conversation

@nt1998

@nt1998 nt1998 commented May 17, 2026

Copy link
Copy Markdown
Owner

Summary

Splits the in-workout PR highlight into three colour-coded tiers without changing layout. The PR-info bar and the highlighted work-set row now read at a glance:

  • 🔴 Red — new all-time weight PR (overall)
  • 🟡 Yellow — new top weight within the current phase, but not all-time
  • 🟢 Green — same weight as the prior best, more reps (rep PR)

The previous code only had a 2-state distinction (weight PR / rep PR), both compared against the all-time best.

Changes

  • src/tabs/GymLog.jsxgetExercisePR now returns { overall, phase } buckets, walked once over committed workouts prior to the current date. Phase scope is the open phase (!p.end); falls back to all-time when no phase is open. Derives a single prTier ('overall' | 'phase' | 'rep' | null) from today's best work set vs both buckets.
  • src/App.jsx — passes phases into <GymLog>.
  • src/App.css — adds --acc-red-bg + --acc-green-bg-grad, renames the PR classes (new-overall-pr / new-phase-pr / new-rep-pr and set-row.overall-pr / .phase-pr / .rep-pr), and maps each to its accent colour. Existing layout / sizes untouched.

Test plan

  • In a current phase, log a set that beats the all-time top weight → PR bar + set row turn red
  • Log a set that beats the current phase top but not all-time → yellow
  • Log a set matching the prior top weight but with more reps → green
  • No PR → bar stays neutral, shows prior PR value
  • Switch to light theme and verify all three colour combos remain legible

Generated by Claude Code

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.

2 participants