Skip to content

Use numeric inputs for all workout rep counters#116

Merged
rodrigogiraoserrao merged 1 commit intomainfrom
codex/modify-workout-logger-for-unrestricted-rep-inputs
Feb 17, 2026
Merged

Use numeric inputs for all workout rep counters#116
rodrigogiraoserrao merged 1 commit intomainfrom
codex/modify-workout-logger-for-unrestricted-rep-inputs

Conversation

@rodrigogiraoserrao
Copy link
Copy Markdown

Motivation

  • The logger previously used a dropdown of range-derived options for non-AMRAP sets and a numeric input for AMRAP sets, which prevented submitting integers outside the configured range; the goal is to allow any integer rep value for all sets.
  • This change unifies rep entry to a single integer-focused input and removes implicit range validation so users can enter any whole number regardless of template min/max or AMRAP status.

Description

  • Replaced the non-AMRAP <select> path with a unified createRepsInput helper so both AMRAP and non-AMRAP sets use <input type="number"> with step="1" and inputMode="numeric".
  • Removed the range-driven repOptions generator and any min constraint so there is no template-enforced min/max on rep submission.
  • Added integer normalization and validation in the input listener (parse with Number.parseInt and set setCustomValidity for non-integers) while preserving prefill behavior from drafts/previous sessions.

Testing

  • Searched and inspected changes with rg -n "createAmrapInput|repOptions\(" workout-session-logger.html which showed the unified input implementation and removal of repOptions, and the search completed successfully.
  • Served the file with python3 -m http.server 8000 and loaded http://127.0.0.1:8000/workout-session-logger.html in a headless browser using Playwright to validate the UI, and a screenshot was captured successfully at artifacts/workout-session-logger-updated.png.
  • No automated unit tests exist for this UI change; the browser render + screenshot verification succeeded.

Codex Task

@rodrigogiraoserrao rodrigogiraoserrao merged commit 19de96c into main Feb 17, 2026
@rodrigogiraoserrao rodrigogiraoserrao deleted the codex/modify-workout-logger-for-unrestricted-rep-inputs branch February 17, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant