[P2] Number fields rewrite rounded display values on blur and block Escape from closing dialogs #29

Closed
opened 2026-10-27 02:59:42 +00:00 by pedro · 1 comment
Owner

Priority: P2
Type: bug
Source: project review requested 2026-10-26 (second pass)

Location: src/NumberInput.tsx:53-76

Problem 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.

Priority: P2 Type: bug Source: project review requested 2026-10-26 (second pass) Location: `src/NumberInput.tsx:53-76` Problem 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.
Author
Owner

Fixed on maintenance/review-2026-10-27 in 062f5f7 — 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 verify 145 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.

Fixed on `maintenance/review-2026-10-27` in `062f5f7` — [PR #40](https://git.guresky.com/pedro/DiveSim/pulls/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 verify` 145 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.
pedro closed this issue 2026-10-27 05:39:05 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: pedro/DiveSim#29
No description provided.