Skip to content

Show load input by default on set-based lifting workouts - #1870

Merged
Yanchek99 merged 2 commits into
masterfrom
fix-log-load-field
Aug 19, 2026
Merged

Show load input by default on set-based lifting workouts#1870
Yanchek99 merged 2 commits into
masterfrom
fix-log-load-field

Conversation

@Yanchek99

Copy link
Copy Markdown
Owner

Summary

  • The log-recording form hid the movement card's Load field whenever the exercise had no fixed load prescribed — the common case for a set-scheme lifting workout like "Deadlift 5-3-3-2-1-1-1", where the athlete picks their own weight per set.
  • For workouts scored via calculated_lifting_score?, the load is the score input, so it now shows by default instead of requiring a click on "Edit" for every card.

Test plan

  • Added a system test reproducing the bug (weight-scored set workout, no prescribed load) — fails on the old code, passes with the fix
  • test/system/log_recording_form_test.rb (5 tests, all pass)
  • test/models/log_test.rb, test/models/workout_test.rb, test/controllers/logs_controller_test.rb (99 tests, all pass)
  • RuboCop clean on changed files

🤖 Generated with Claude Code

Movement cards hid the Load field whenever the exercise had no fixed
load prescribed (e.g. Deadlift 5-3-3-2-1-1-1, where the athlete picks
their own weight per set). For calculated-lifting-score workouts the
load is exactly what determines the score, so it should be visible
without requiring an extra "Edit" click.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@railway-app

railway-app Bot commented Aug 19, 2026

Copy link
Copy Markdown

🚅 Deployed to the wod-tracker-pr-1870 environment in wod-tracker

Service Status Web Updated (UTC)
web ✅ Success (View Logs) Web Aug 19, 2026 at 5:28 pm
worker ✅ Success (View Logs) Aug 19, 2026 at 5:09 pm

@railway-app
railway-app Bot temporarily deployed to wod-tracker / wod-tracker-pr-1870 August 19, 2026 15:47 Destroyed
…fting day

single_weightlifting_exercise_day? only recognized the fixed-rounds
set-based lifting structure (one exercise row x N rounds, e.g. Back
Squat 5x5). A variable-rep-scheme lift like Deadlift 5-3-3-2-1-1-1 is
stored as separate exercise rows per set, so the check missed it,
set_breakdown never got auto-populated, and the log form showed a
"Set breakdown" field for what is already a single discrete set.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@railway-app
railway-app Bot temporarily deployed to wod-tracker / wod-tracker-pr-1870 August 19, 2026 17:08 Destroyed
@Yanchek99
Yanchek99 merged commit f93fd3b into master Aug 19, 2026
8 checks passed
@Yanchek99
Yanchek99 deleted the fix-log-load-field branch August 19, 2026 17:44
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.

1 participant