Skip to content

[Bug]: Undo/Redo are advertised in the Keyboard Shortcuts modal but do nothing #433

Description

@EtienneLescot

Describe the bug

Undo and Redo do nothing. The editor's own Keyboard Shortcuts modal advertises them under the FIXED section:

Command Displayed binding
Undo Ctrl + Z
Redo Ctrl + Shift + Z / Ctrl + Y

None of the three has any effect. Verified against three different kinds of document mutation:

Mutation Ctrl+Z result
Add region via shortcut (Z / T / C / S) no effect
Delete selected region (Ctrl+D) no effect
Rename the project from the top bar no effect

This is not an automation artifact: Ctrl+D (Delete Selected) works in the exact same focus context, so Ctrl chords do reach the renderer. Only undo/redo are inert.

Root cause

This looks like an unfinished feature rather than a regression. The shortcut hook is wired, but its callback is an explicit placeholder — src/components/ai-edition/NewEditorShell.tsx:162:

useUndoRedoShortcuts(() => {
    // ponytail: placeholder, wire when undo stack merges with history
});

Supporting observations:

  • pushHistory is fed, from setDocument in src/lib/ai-edition/store/projectStore.ts:276, so snapshots are being recorded.
  • src/hooks/useEditorHistory.ts — the previous editor's history — is no longer imported by any component; its only importer is src/components/video-editor/editorDefaults.test.ts. It was orphaned when the v3 editor became the only editor.
  • Nothing covers src/lib/ai-edition/store/undo.ts, so CI stays green on this indefinitely.

Expected behavior

Ctrl+Z reverts the last document mutation and Ctrl+Shift+Z / Ctrl+Y reapplies it — or, if completing the undo stack is out of scope for the current release, the two rows are removed from the Keyboard Shortcuts modal so the app stops advertising a capability it does not have.

To Reproduce

  1. Record anything and let the editor open.
  2. Put the playhead somewhere on the timeline and press Z to add a zoom region.
  3. Press Ctrl+Z.
  4. The region is still there. Same with Ctrl+Y and Ctrl+Shift+Z.
  5. For the control: select the region and press Ctrl+D — it is deleted, proving the chord is delivered. Ctrl+Z does not bring it back.

Environment

  • OS: Windows 11 (26200)
  • Build: packaged Openscreen.exe 1.9.6, built from main @ 95e350e0 via npm run build:win

Found during a computer-use pass over technical-documentation/testing/manual-e2e-checklist.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstatus: fixed in mainWork is merged into main but may not be in a downloadable release yet.status: pending releaseMerged change is waiting for a packaged desktop release.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions