[PR #382] [MERGED] Git Improvements #660

Closed
opened 2026-04-16 15:21:07 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/382
Author: @gschier
Created: 2/4/2026
Status: Merged
Merged: 2/4/2026
Merged by: @gschier

Base: mainHead: git-improvements


📝 Commits (3)

  • 7583269 Add pull resolution select dialog
  • 1c8d53a Test commit
  • d8094e7 feat: uncommitted changes handling, reset changes, ahead/behind indicators

📊 Changes

16 files changed (+468 additions, -28 deletions)

View changed files

📝 crates-tauri/yaak-app/src/git_ext.rs (+21 -2)
📝 crates-tauri/yaak-app/src/lib.rs (+5 -2)
📝 crates/yaak-git/bindings/gen_git.ts (+2 -2)
📝 crates/yaak-git/index.ts (+68 -14)
📝 crates/yaak-git/src/lib.rs (+3 -1)
📝 crates/yaak-git/src/pull.rs (+80 -0)
crates/yaak-git/src/reset.rs (+20 -0)
📝 crates/yaak-git/src/status.rs (+16 -0)
📝 packages/plugin-runtime/src/PluginInstance.ts (+2 -2)
📝 src-web/components/core/Icon.tsx (+2 -0)
src-web/components/core/RadioCards.tsx (+66 -0)
📝 src-web/components/git/GitDropdown.tsx (+52 -5)
📝 src-web/components/git/callbacks.tsx (+10 -0)
src-web/components/git/diverged.tsx (+102 -0)
📝 src-web/components/git/git-util.ts (+6 -0)
src-web/components/git/uncommitted.tsx (+13 -0)

📄 Description

Improvements to the Git dropdown UI, including better state management, ahead/behind indicators, and handling for uncommitted changes.

CleanShot 2026-02-04 at 11 37 21

What's New

  • Uncommitted changes handling on pull — Pulling with uncommitted changes now shows a dialog prompting you to reset and pull, instead of showing a raw error message
  • Reset Changes — New menu item in the git dropdown to discard all uncommitted changes with a confirmation dialog
  • Ahead/behind indicators — The git dropdown button now shows ↗N and ↙N next to the branch name, indicating how many commits you are ahead of or behind the remote
  • Smart menu item states — Push, Pull, and Commit are now disabled when not applicable (e.g., Push is disabled when there are no commits to push, Commit is disabled when there are no changes)
  • Diverged branch handling — Improved handling when local and remote branches have diverged, with options to merge or force pull

Bug Fixes

  • Fixed Push incorrectly using the Pull result handler
  • Fixed fetch-all on dropdown open causing UI flicker and unnecessary model updates

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mountain-loop/yaak/pull/382 **Author:** [@gschier](https://github.com/gschier) **Created:** 2/4/2026 **Status:** ✅ Merged **Merged:** 2/4/2026 **Merged by:** [@gschier](https://github.com/gschier) **Base:** `main` ← **Head:** `git-improvements` --- ### 📝 Commits (3) - [`7583269`](https://github.com/mountain-loop/yaak/commit/7583269b93c643ac92f547082110285920f0c953) Add pull resolution select dialog - [`1c8d53a`](https://github.com/mountain-loop/yaak/commit/1c8d53acd50e39b19695ebd358fc4e2b1f260c88) Test commit - [`d8094e7`](https://github.com/mountain-loop/yaak/commit/d8094e71a60e5af3e3121ea2e0186b9cd0042c5d) feat: uncommitted changes handling, reset changes, ahead/behind indicators ### 📊 Changes **16 files changed** (+468 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `crates-tauri/yaak-app/src/git_ext.rs` (+21 -2) 📝 `crates-tauri/yaak-app/src/lib.rs` (+5 -2) 📝 `crates/yaak-git/bindings/gen_git.ts` (+2 -2) 📝 `crates/yaak-git/index.ts` (+68 -14) 📝 `crates/yaak-git/src/lib.rs` (+3 -1) 📝 `crates/yaak-git/src/pull.rs` (+80 -0) ➕ `crates/yaak-git/src/reset.rs` (+20 -0) 📝 `crates/yaak-git/src/status.rs` (+16 -0) 📝 `packages/plugin-runtime/src/PluginInstance.ts` (+2 -2) 📝 `src-web/components/core/Icon.tsx` (+2 -0) ➕ `src-web/components/core/RadioCards.tsx` (+66 -0) 📝 `src-web/components/git/GitDropdown.tsx` (+52 -5) 📝 `src-web/components/git/callbacks.tsx` (+10 -0) ➕ `src-web/components/git/diverged.tsx` (+102 -0) 📝 `src-web/components/git/git-util.ts` (+6 -0) ➕ `src-web/components/git/uncommitted.tsx` (+13 -0) </details> ### 📄 Description Improvements to the Git dropdown UI, including better state management, ahead/behind indicators, and handling for uncommitted changes. <img width="1774" height="1112" alt="CleanShot 2026-02-04 at 11 37 21" src="https://github.com/user-attachments/assets/a2242a38-3e2b-44b1-895b-913fa724c8f7" /> ## What's New - **Uncommitted changes handling on pull** — Pulling with uncommitted changes now shows a dialog prompting you to reset and pull, instead of showing a raw error message - **Reset Changes** — New menu item in the git dropdown to discard all uncommitted changes with a confirmation dialog - **Ahead/behind indicators** — The git dropdown button now shows ↗N and ↙N next to the branch name, indicating how many commits you are ahead of or behind the remote - **Smart menu item states** — Push, Pull, and Commit are now disabled when not applicable (e.g., Push is disabled when there are no commits to push, Commit is disabled when there are no changes) - **Diverged branch handling** — Improved handling when local and remote branches have diverged, with options to merge or force pull ## Bug Fixes - Fixed Push incorrectly using the Pull result handler - Fixed fetch-all on dropdown open causing UI flicker and unnecessary model updates --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-16 15:21:07 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/yaak#660