Commit Graph
1 Commits
Author SHA1 Message Date
que01andClaude Opus 5 1c27501534 feat: edit road parameters by number as well as by drag
The map had one input device. A drag projects a pointer onto the manifest's
axis; there was no way to state a value, read one, or withdraw one.

Both channels now meet at the same three exits in App.tsx — draftValue()
previews, settleValue() commits one undoable command, abandonGesture() puts the
settled state back — so nothing about the constraint, the debounce or the
previewSeq arbitration is implemented twice. EditSession is untouched: focus and
blur land on the gesture boundary that pointerdown and pointerup already used,
which is why typing 1.53 is one undo step rather than four.

Three rules the two devices do not share:

- Live drag values bypass React and write the input's value directly, per
  direct-edit-client.md §7. A layout effect re-applies them after a mid-drag
  preview replaces the manifest, and drops the override once the manifest
  reports the value the drag asked for.
- Typed values out of range are refused, not clamped. A pointer cannot state an
  intent it never reached, so a drag clamps; typed text is an intent, and a
  clamped typo reads as a plausible value that can go unnoticed. The offered
  extremes round inward — a real max of 2.925 renders as 2.93 under
  nearest-rounding, which the range it came from would then reject.
- Reset disables the constraint rather than deleting it: validateEditDocument()
  rejects an operation naming a constraint that is not in the document. This is
  the one edit a drag cannot express, since a drag can set a value but never
  withdraw one.

Interval editing stays behind intervalEditingSupported, which is still false —
compileGeometry() does not read profile.interval, and a control that changes
nothing is worse than no control. The conversions are implemented and tested so
the row appears when the flag flips.

Probing a live manifest turned up a defect that is not from this change and is
not fixed here: an edge offset advertises ±2.925 while the solver rejects past
about ±1. Evidence is in the task's research/, and the requirement moved to
08-31-constraint-range-validation.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 11:58:00 +08:00