-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
Validation failures or exceptions in handleCalculation leave the “Calculate & Visualize” button disabled with “Calculating…” text because the loading state is not restored, freezing the UI.
Steps to Reproduce
- Load the app.
- Leave Sex unset, enter a valid birth date, and submit.
- Observe that the button remains disabled and the UI no longer responds without a refresh.
Expected Behavior
After any failure, the button text/state should revert and the results area should display an error message so the user can correct inputs and retry.
Actual Behavior
The button stays disabled with “Calculating…”, the results area is cleared, and the user is stuck until reloading the page.
Relevant Logs or Screenshots
N/A
Environment Details
- OS: macOS 14.6 (Apple Silicon)
- Browser: Chrome 118
Impact / Severity
High — major functionality degraded
Regression?
- This is a regression from a previous release
Affected Modules or Files
js/ui.js
Proposed Fix / Notes
Move the loading-state reset (textContent, disabled) and results messaging into a finally block or helper so both validation and runtime errors restore state. Add regression coverage for validation failures.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working