Skip to content

Feat: use the non-legacy commit_undo - #13450

Merged
krlvi merged 1 commit into
masterfrom
kv-branch-109
Apr 21, 2026
Merged

krlvi merged 1 commit into
masterfrom
kv-branch-109

Conversation

@krlvi

@krlvi krlvi commented Apr 21, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 21, 2026 21:19
@github-actions github-actions Bot added rust Pull requests that update Rust code @gitbutler/desktop labels Apr 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_undo command in Tauri and allow it via default permissions.
  • Expose commit_undo via but-server and remap the desktop uncommit endpoint to call it with the new parameter shape.
  • Update UI call sites and add focused unit tests for the endpoint mapping and StackService.uncommit selection-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).

@krlvi
krlvi enabled auto-merge April 21, 2026 21:46
@krlvi
krlvi merged commit 442d2a9 into master Apr 21, 2026
38 checks passed
@krlvi
krlvi deleted the kv-branch-109 branch April 21, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@gitbutler/desktop rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants