Skip to content

[fix] scrub fields: escape reverts typing, rows refresh after undo, one undo step per gesture (37 R26) - #338

Merged
AlexZ005 merged 2 commits into
feat/1.27from
feat/37-bugs
Oct 7, 2026
Merged

AlexZ005 merged 2 commits into
feat/1.27from
feat/37-bugs

Conversation

@AlexZ005

@AlexZ005 AlexZ005 commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Roadmap 37, item R26 (P1): the three scrub-field + undo bugs the 38 behaviour lock found (QUESTIONS-38-lock Q1-Q3).

What changed

  • Q1: Escape after typing reverts. DragRow puts the box text back before the blur, and ignores the blur's change, so the typed value is no longer re-committed. It leaves no undo step.
  • Q2: rows refresh after Ctrl+Z / Ctrl+Y. history.undo()/redo() poke selectedObject after any replay, so the Inspector's transform rows show the restored values at once.
  • Q3: one undo step per scrub and per typed edit, in every scrub field. $lib/historyGesture.js (a leaf) holds the current gesture token. DragRow opens one per scrub and one per typing session; SliderRow opens one per range drag. history.recordEntry folds an entry into the stack top in place when both carry the same token (per-kind merges: transform, transformSet, aibatch, props, anim, the new animspeed, shadergraph; anything else becomes a gesture composite). A fold that nets to nothing is dropped.
  • Shader editor: xyflow's view state (selected, dragging, measured, resizing) no longer goes into the replicated graph document (the nodesHandler.serializeNode rule). Clicking a node used to be an undoable, broadcast graph edit, and it was the second undo step on a shader-vector scrub.
  • Newly undoable: Render order, light intensity and the other light values, and the Animation window's Speed.

Proof

  • New suite scrub-undo: 156 PASS / 0 FAIL. It covers transforms, render order, light intensity, the light-distance slider and box, a shader vec2, and the Animation window's length, speed, fps and step: scrub, typed edit, slow typing, Escape, and the value shown right after undo.
  • Counterfactuals, each piece reverted in turn (scrub-undo):
    • Q1 (original Escape code) → 28 red
    • Q2 (no refresh) → 24 red
    • Q3 (no fold) → 46 red
    • shader view keys kept → the original 2 reds
  • Also green: shader-graph, undo, number-fields, animation-window, mesh-adjust, inspector, inspector-multi-edit, node-drag-fields.
  • Two reds also fail identically on pristine 1.25.0, so they predate this PR: shader-editor (texture-decode check) and animation-curves (graph-key right-click).
  • svelte-check 318/47 (= baseline), vitest 1544 green, npm run build green.

38 lock

The lock-dragrow flip (KNOWN Q1-Q3 → fixed) lives on feat/37-bugs-lock, for the redesign lanes to merge once 1.27 is in their base. See NOTES-38.

Do not merge from the lane; the 1.27 integrator merges.

🤖 Generated with Claude Code

AlexZ005 and others added 2 commits October 7, 2026 04:14
…ne undo step per gesture

37 R26 (QUESTIONS-38-lock Q1-Q3):
- DragRow: Escape after TYPING puts the box text back and ignores the blur's
  change event, so the typed value is no longer re-committed (Q1)
- history: undo/redo poke selectedObject, so the Inspector transform rows show
  the restored values at once (Q2)
- history gestures ($lib/historyGesture.js, a leaf): DragRow opens one per scrub
  and per typing session, SliderRow one per range drag; entries recorded in one
  gesture fold into the stack top in place (per-kind merges for transform,
  transformSet, aibatch, props, anim, animspeed, shadergraph; else a 'gesture'
  composite), and a fold that nets to nothing is dropped (Q3)
- Inspector: the debounced transform seal carries its gesture; render order and
  light values (intensity + LIGHT_PARAMS) record props entries; Animation speed
  records an 'animspeed' entry
- new e2e suite scrub-undo (NOT YET RUN at this commit: queued behind e2e slots)

svelte-check 318/47 = baseline.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
37 R26 (Q3, the last red of scrub-undo run 1): the click that ends a scrub on
an unselected node SELECTS it, and ShaderEditor wrote xyflow's `selected` into
the replicated graph doc - a second undo step per scrub (Ctrl+Z undid the
selection) and a broadcast of local view state.
- view keys (selected, dragging, measured, resizing) never enter the doc (the
  nodesHandler.serializeNode rule); an older save's copy is ignored
- selection and xyflow's measured size are carried locally across a rebuild

scrub-undo: 156 PASS / 0 FAIL (was 154/2). svelte-check 318/47 = baseline,
vitest 1544 green.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@AlexZ005
AlexZ005 merged commit 1903577 into feat/1.27 Oct 7, 2026
6 checks passed
@AlexZ005
AlexZ005 deleted the feat/37-bugs branch October 7, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant