Repository navigation
Feat: use the non-legacy commit_undo - #13450
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR switches the desktop “Uncommit” action over to the newer non-legacy commit_undo backend command, wiring it through Tauri permissions/handlers and the but-server HTTP route, and updating the desktop endpoint/request shape accordingly.
Changes:
- Register the non-legacy
commit_undocommand in Tauri and allow it via default permissions. - Expose
commit_undoviabut-serverand remap the desktopuncommitendpoint to call it with the new parameter shape. - Update UI call sites and add focused unit tests for the endpoint mapping and
StackService.uncommitselection-clearing behavior.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
crates/gitbutler-tauri/src/main.rs |
Registers the non-legacy commit_undo Tauri command handler. |
crates/gitbutler-tauri/permissions/default.toml |
Allows the new commit_undo command in default permissions. |
crates/but-server/src/lib.rs |
Adds the /commit_undo route to the server router. |
apps/desktop/src/lib/stacks/stackService.test.ts |
Adds a unit test ensuring uncommit clears selection on success. |
apps/desktop/src/lib/stacks/stackService.svelte.ts |
Simplifies uncommit args (removes unused branchName). |
apps/desktop/src/lib/stacks/stackEndpoints.ts |
Remaps uncommit to commit_undo and updates request/response typing. |
apps/desktop/src/lib/stacks/stackEndpoints.test.ts |
Adds a unit test covering the new commit_undo request mapping. |
apps/desktop/src/components/views/BranchCommitList.svelte |
Updates uncommit call site to match new signature (no branchName). |
apps/desktop/src/components/commit/CommitView.svelte |
Updates uncommit call site to match new signature (no branchName). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.