fix: commit slider-number input atomically (#608)

Issue: #608
User-Visible: yes
This commit is contained in:
Claude
2026-09-23 07:37:30 +03:00
parent 551ff2f563
commit 8a4ecdea63
56 changed files with 1097 additions and 874 deletions
+15
View File
@@ -72,6 +72,21 @@ function relocateEditorPatch(patch, cardSource, editorSource) {
// `find` обязан встречаться в файле ровно один раз: патч, который ложится «куда
// попало», проверяет не то, что объявлен проверять. Это контролирует --check.
const MUTANT_DEFINITIONS = [
{
id: 'range-line-clamps-every-keystroke',
guard: 'node demo/smoke_range_line_draft.mjs',
because: '#608 AC1/AC5: partial keyboard text must stay local until commit. Restoring the '
+ 'old per-input clamp mutates the host draft on the first digit and makes 120 impossible '
+ 'to enter as a sequence.',
patches: [{
file: 'src/editors/form-kit.ts',
find: ' onInput: () => undefined,',
replace: ' onInput: (raw) => {\n'
+ ' const n = Number(raw);\n'
+ ' if (Number.isFinite(n)) onInput(Math.min(max, Math.max(min, n)));\n'
+ ' },',
}],
},
{
id: 'ha-form-shell-width-falls-back-to-generic',
guard: 'node demo/smoke_ha_form_shell_parity.mjs',