[P2] Number fields rewrite rounded display values on blur and block Escape from closing dialogs #29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Priority: P2
Type: bug
Source: project review requested 2026-10-26 (second pass)
Location:
src/NumberInput.tsx:53-76Problem and evidence
Leaving a number field without typing commits the rounded display value. In imperial (the default): Tab through Ascent (29.5 ft/min) during automatic decompression changes 9 to 8.9916 m/min and pauses with "Ascent settings changed"; Tab through the CCR fields raises oxygen use to 1.13 L/min, loop volume to 7.93 L and adds three manual gas events; focusing the CCR setpoint pauses a running dive; focusing a planner segment resets replay to 0:00; cylinder volume drifts 11.1 to 11.04 L. Separately, Escape is always swallowed, so a dialog cannot be closed with Escape while focus is in a number field.
Suggested correction
Commit on blur only when the draft differs from the displayed text. Intercept Escape only when there is an edit or error to revert.
Acceptance criteria
Browser regression: focus/blur without edits changes no state (auto-deco, CCR, planner replay); Escape closes the planner from an unedited field and reverts an edited one; pnpm verify passes.
Scope: maintenance of the educational simulator. Preserve historical R1 acceptance and operational-validation limits.
Fixed on
maintenance/review-2026-10-27in062f5f7— PR #40.Unedited blur commits nothing (auto-deco, CCR values, planner replay unchanged); Escape reverts an edit, then closes the dialog. Chromium regression.
Branch verification:
pnpm verify145 tests and release budgets; Chromium/Firefox/WebKit review, replay, compatibility and offline lifecycle checks; CI verify runs #111/#112 pass. Record:docs/MAINTENANCE-2026-10-27.md. Closes on merge of PR #40.