Feature description
Add undo/redo functionality so users can step backward and forward through their edit history (trim, rotation, framing, speed, color adjustments, overlays, etc.) instead of manually re-entering values when they make a mistake or want to compare a previous state.
Problem this solves
Right now there's no way to revert a change without manually resetting each control back to its previous value. If I adjust brightness, add a text overlay, then change the crop and decide I preferred an earlier state, I have to remember and re-enter every setting by hand, there's a "Reset All Settings" button, but that wipes everything back to defaults rather than stepping back one change at a time. This gets especially frustrating after several edits stacked on top of each other.
Proposed solution
- Maintain a history stack of
EditRecipe snapshots in useVideoEditor, pushing a new entry whenever a control changes (trim, rotation, framing/preset, speed, audio mute, brightness/contrast/saturation, text overlay, image overlay, output format, etc.).
- Add Undo (Ctrl+Z) and Redo (Ctrl+Shift+Z / Ctrl+Y) keyboard shortcuts, plus undo/redo buttons in the UI (e.g. near "Reset All Settings" or in a small toolbar).
- Debounce/coalesce rapid changes from sliders (brightness/contrast/saturation, trim handles) so dragging a slider doesn't create dozens of history entries, only commit to history on drag-end or after a short pause.
- Disable the Undo/Redo buttons when the stack is empty in that direction.
- Cap history depth (e.g. last 20–30 states) to avoid unbounded memory growth.
Alternatives considered
- Relying solely on the existing "Reset All Settings" button: but that's all-or-nothing and doesn't help with incremental mistakes.
- Browser-native undo (Ctrl+Z): doesn't work here since the app state isn't tied to native form/text editing.
Additional context
Since the app already encodes the full recipe in the URL (via "Copy Link"), the history stack could potentially reuse the same serialization logic used for the shareable link, making this easier to implement consistently across all controls.
Feature description
Add undo/redo functionality so users can step backward and forward through their edit history (trim, rotation, framing, speed, color adjustments, overlays, etc.) instead of manually re-entering values when they make a mistake or want to compare a previous state.
Problem this solves
Right now there's no way to revert a change without manually resetting each control back to its previous value. If I adjust brightness, add a text overlay, then change the crop and decide I preferred an earlier state, I have to remember and re-enter every setting by hand, there's a "Reset All Settings" button, but that wipes everything back to defaults rather than stepping back one change at a time. This gets especially frustrating after several edits stacked on top of each other.
Proposed solution
EditRecipesnapshots inuseVideoEditor, pushing a new entry whenever a control changes (trim, rotation, framing/preset, speed, audio mute, brightness/contrast/saturation, text overlay, image overlay, output format, etc.).Alternatives considered
Additional context
Since the app already encodes the full recipe in the URL (via "Copy Link"), the history stack could potentially reuse the same serialization logic used for the shareable link, making this easier to implement consistently across all controls.