Problem
The timeline has no undo or redo controls for committed editing operations. Users need a way to recover from an accidental clip move, trim, cut, insert, delete, or related timeline edit.
Feature
Add per-instance undo and redo history for each timeline. The controls must be placed in the tools menu bar introduced for timeline editing tools.
Use a history limit of 200 committed operations per timeline instance as the initial default. The oldest entries are discarded when the limit is exceeded.
History should contain serializable timeline edit states or equivalent host-consumable transactions and must respect the controlled component boundary. Only accepted, committed edits belong in history. Live previews, canceled gestures, playback changes, selection, scrubbing, zoom, and range changes must not create history entries.
Undo must restore the previous committed timeline state. Redo must restore the next state. A new committed edit after undo clears the redo stack. External controlled updates must not silently corrupt the history; their interaction with the history stack must be defined and covered by tests.
Acceptance criteria
- Undo and redo buttons are present in the tools menu bar and are hidden with the tools bar.
- Each button has an accessible name, disabled state, and tooltip or equivalent help text.
- Undo and redo operate independently for each timeline instance.
- The history limit is 200 committed operations by default.
- Undo and redo cover clip move, trim, cut, insertion, deletion, and other committed editing operations supported by the timeline.
- Preview and canceled interactions do not create entries.
- A new edit after undo clears redo history.
- Undo and redo preserve the normal controlled update and event lifecycle.
- The behavior is deterministic and covered by tests, including the 200-entry limit, empty-stack states, branching after undo, and controlled host updates.
Problem
The timeline has no undo or redo controls for committed editing operations. Users need a way to recover from an accidental clip move, trim, cut, insert, delete, or related timeline edit.
Feature
Add per-instance undo and redo history for each timeline. The controls must be placed in the tools menu bar introduced for timeline editing tools.
Use a history limit of 200 committed operations per timeline instance as the initial default. The oldest entries are discarded when the limit is exceeded.
History should contain serializable timeline edit states or equivalent host-consumable transactions and must respect the controlled component boundary. Only accepted, committed edits belong in history. Live previews, canceled gestures, playback changes, selection, scrubbing, zoom, and range changes must not create history entries.
Undo must restore the previous committed timeline state. Redo must restore the next state. A new committed edit after undo clears the redo stack. External controlled updates must not silently corrupt the history; their interaction with the history stack must be defined and covered by tests.
Acceptance criteria