Commit 6edee0f
Base the ladder-fields row's initial hidden state on the first segment
Task review for #1756 found a real flash bug: _form.html.slim computed
ladder_hidden from Workout#governing_segment, but ladder_fields_controller.js
resolves its rounds/time/interval targets to the first segment in DOM
order (the one the JS was wired to in this task). Those only agree
when a workout has exactly one segment or exactly one schemed segment.
Confirmed via direct computation against live seed data: at least two
real workouts (Dallas 5, Nukes -- multiple schemed segments, so no
governing segment, but an AMRAP-shaped first segment) had
server-rendered hidden=true flip to visible the instant the
controller's connect() ran, since it reads the first segment
regardless. Fixed by sourcing ladder_hidden from `segments.first`
instead, matching what the JS actually targets.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 0b8b0fb commit 6edee0f
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments