Filed by the objectui domain:ui seat #1 (session_01DuWo5bdP9SdVebamn99GGk) at the ACCEPT of PR objectui#11077 (Fixes #11056), from the dev's out-of-scope findings. ⛔ Not graded or routed here; that is triage's.
The site (read at objectui origin/main 51c294958)
packages/react/src/hooks/useGlobalUndo.ts: each instance's useEffect adds its own keydown listener on window. The handler checks only Ctrl/Meta plus z. It then calls e.preventDefault() and pops one operation from the shared globalUndoManager (undo(), or redo() with Shift). It does not check the event target.
Measured (probe with the real hook and the real globalUndoManager; not committed)
- One keypress, several undos. With three instances mounted, one Ctrl+Z undid 1, 2 or 3 operations when 1, 2 or 3 were stacked, with one toast per pop. With one operation stacked, only the first-mounted instance's
onUndo ran.
- Inside a text field. With a text input focused, Ctrl+Z still popped the record operation and left
defaultPrevented true. So the browser's own undo in that field does not run, and the last record action is undone instead.
- The toast's Undo button is not affected. It runs only the owning instance's
onUndo.
Reach (read from source, not measured in a browser)
On every console route at least two instances are mounted: AppContent's, and the useConsoleActionRuntime inside ConsoleShell's GlobalActionRuntimeProvider. Per view there are more: ObjectView, PageView's provider, DeclaredActionsBar, and RecordDetailView's own. So a user with two or more undoable actions on the stack can revert several record writes with one Ctrl+Z. A user typing in a field who presses Ctrl+Z reverts a saved record write instead of their typing.
Direction (for triage, not a ruling)
One keyboard listener for the shared stack rather than one per instance, and no interception when the target is an editable element. Pins: several mounted instances pop one operation per keypress; Ctrl+Z in an input leaves the stack and the default untouched.
Dedupe: the same 1100-item corpus (down to #2231). keydown has 2 hits: PR objectui#11077 and PR objectui#10860, an unrelated type-ahead fix. preventDefault has 2, PR objectui#10860 and PR objectui#10643, both unrelated. Ctrl+Z has 3: PR objectui#11077, the seat posts, and PR objectui#10436, which covers the undo snapshot, not the listener. popUndo has 0. None carries this defect.
Dedupe words: useGlobalUndo keydown per instance, Ctrl+Z undoes several operations, popUndo per listener, preventDefault input undo hijack.
Generated by Claude Code
Filed by the objectui
domain:uiseat #1 (session_01DuWo5bdP9SdVebamn99GGk) at the ACCEPT of PR objectui#11077 (Fixes #11056), from the dev's out-of-scope findings. ⛔ Not graded or routed here; that is triage's.The site (read at objectui
origin/main51c294958)packages/react/src/hooks/useGlobalUndo.ts: each instance'suseEffectadds its ownkeydownlistener onwindow. The handler checks only Ctrl/Meta plusz. It then callse.preventDefault()and pops one operation from the sharedglobalUndoManager(undo(), orredo()with Shift). It does not check the event target.Measured (probe with the real hook and the real
globalUndoManager; not committed)onUndoran.defaultPreventedtrue. So the browser's own undo in that field does not run, and the last record action is undone instead.onUndo.Reach (read from source, not measured in a browser)
On every console route at least two instances are mounted:
AppContent's, and theuseConsoleActionRuntimeinsideConsoleShell'sGlobalActionRuntimeProvider. Per view there are more:ObjectView,PageView's provider,DeclaredActionsBar, andRecordDetailView's own. So a user with two or more undoable actions on the stack can revert several record writes with one Ctrl+Z. A user typing in a field who presses Ctrl+Z reverts a saved record write instead of their typing.Direction (for triage, not a ruling)
One keyboard listener for the shared stack rather than one per instance, and no interception when the target is an editable element. Pins: several mounted instances pop one operation per keypress; Ctrl+Z in an input leaves the stack and the default untouched.
Dedupe: the same 1100-item corpus (down to #2231).
keydownhas 2 hits: PR objectui#11077 and PR objectui#10860, an unrelated type-ahead fix.preventDefaulthas 2, PR objectui#10860 and PR objectui#10643, both unrelated.Ctrl+Zhas 3: PR objectui#11077, the seat posts, and PR objectui#10436, which covers the undo snapshot, not the listener.popUndohas 0. None carries this defect.Dedupe words: useGlobalUndo keydown per instance, Ctrl+Z undoes several operations, popUndo per listener, preventDefault input undo hijack.
Generated by Claude Code