Before submitting
Area
apps/desktop
Problem or use case
When reviewing changes in the Diff tab, it's easy to realize that the last edit wasn't what you wanted. Currently, reverting requires leaving the current workflow or manually restoring the previous state, which interrupts the editing experience.
Proposed solution
Add an Undo (or Rewind) action in the Diff tab that reverts the latest change and updates the diff accordingly.
Possible implementations:
- Add an Undo button in the Diff tab toolbar.
- Support the standard keyboard shortcut (Ctrl/Cmd + Z) while the Diff tab is focused.
- Refresh the displayed diff immediately after the undo operation.
Why this matters
Having an Undo/Rewind action in the Diff tab makes it easier to recover from accidental edits and iterate on changes without leaving the current workflow. This creates a smoother editing experience and reduces unnecessary context switching.
Smallest useful scope
Add an Undo/Rewind button to the Diff tab that reverts the most recent change and refreshes the displayed diff. More advanced features, such as multi-level undo history or redo support, can be considered separately.
Alternatives considered
Users can currently leave the Diff tab and use existing editing or version control workflows to revert changes. While functional, this interrupts the review process and requires extra steps compared to having an Undo/Rewind action directly in the Diff tab.
Risks or tradeoffs
Adding an Undo/Rewind action introduces additional UI and requires it to stay in sync with the application's existing undo history. Care should also be taken to ensure users clearly understand what will be undone, especially if edits can originate from multiple places.
Examples or references
Examples of similar workflows can be found in editors such as VS Code and JetBrains IDEs, where users can immediately undo recent edits while reviewing changes without interrupting their workflow. The proposed feature aims to provide a similarly seamless experience within the Diff tab.
Contribution
Before submitting
Area
apps/desktop
Problem or use case
When reviewing changes in the Diff tab, it's easy to realize that the last edit wasn't what you wanted. Currently, reverting requires leaving the current workflow or manually restoring the previous state, which interrupts the editing experience.
Proposed solution
Add an Undo (or Rewind) action in the Diff tab that reverts the latest change and updates the diff accordingly.
Possible implementations:
Why this matters
Having an Undo/Rewind action in the Diff tab makes it easier to recover from accidental edits and iterate on changes without leaving the current workflow. This creates a smoother editing experience and reduces unnecessary context switching.
Smallest useful scope
Add an Undo/Rewind button to the Diff tab that reverts the most recent change and refreshes the displayed diff. More advanced features, such as multi-level undo history or redo support, can be considered separately.
Alternatives considered
Users can currently leave the Diff tab and use existing editing or version control workflows to revert changes. While functional, this interrupts the review process and requires extra steps compared to having an Undo/Rewind action directly in the Diff tab.
Risks or tradeoffs
Adding an Undo/Rewind action introduces additional UI and requires it to stay in sync with the application's existing undo history. Care should also be taken to ensure users clearly understand what will be undone, especially if edits can originate from multiple places.
Examples or references
Examples of similar workflows can be found in editors such as VS Code and JetBrains IDEs, where users can immediately undo recent edits while reviewing changes without interrupting their workflow. The proposed feature aims to provide a similarly seamless experience within the Diff tab.
Contribution