Skip to content

feat: scaffolding new revert wizard to revert back to a specific commit#62

Closed
aritradevelops wants to merge 4 commits intointerpretive-systems:mainfrom
aritradevelops:feat/revert_wizard
Closed

feat: scaffolding new revert wizard to revert back to a specific commit#62
aritradevelops wants to merge 4 commits intointerpretive-systems:mainfrom
aritradevelops:feat/revert_wizard

Conversation

@aritradevelops
Copy link

@aritradevelops aritradevelops commented Oct 5, 2025

Summary

This PR adds a new wizard to revert back to a specific commit.
Describe the change briefly.

  1. Lists the commits and lets the user select one to go back to
  2. Shows preview of what changes in would apply on reverting
  3. Asks for final confirmation and reverts all the commits upto the selected commit.

Linked Issue(s)

Closes #53

Checklist

  • I am assigned to the linked issue(s)
  • I wrote tests or updated existing tests
  • I ran go build and go test ./...
  • I updated docs/README if needed

@aritradevelops
Copy link
Author

@kubeden I have built a basic version of the revert wizard which does the following:

  1. Lists the commits and lets the user select one to go back to
  2. Shows preview of what changes in would apply on reverting
  3. Asks for final confirmation and reverts all the commits upto the selected commit.

Please review the PR and let me know your feedback so I can draft the final PR.

Discussion Points

  1. Both r and R were reserved therefore used V as the hotkey, which really doesn't go with revert so let me know what will be your preference of the hot key.
  2. Right now It only renders the latest 20 commits with their hash(short one) and subject(first line of the commit message). My thought process was it will be overwhelming to render all the commits (might be thousands in some repos) in the overlay and going back to more than 20 commits past is a rare case. Let me know your view on this.
  3. It right now renders the preview in the overlay itself. which can be improved to show in the diff view, but will require a good amount of additional work.
  4. we should probably also introduce options for reverting back a single commit and reverting back a merge commit. which will also require a good amount of work.

@aritradevelops aritradevelops marked this pull request as ready for review October 7, 2025 15:12
@kubeden
Copy link
Contributor

kubeden commented Oct 8, 2025

Hey! This looks good. Can I ask you to resolve the conflicts and I'll merge

@aritradevelops
Copy link
Author

aritradevelops commented Oct 8, 2025

Hi @kubeden have resolved those conflicts, saw some space changes therefore ran go fmt ./... to reformat the code properly. I would also love to contribute to future enhancements of this wizard, please let me know if you have something in mind. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] revert to a checkpoint

2 participants