zed/crates/git
Sathwik Chirivelli 0346cc77ee
solo_diff_view: Add git action to open file diff and other improvements (#59752)
# Objective

- Polish the solo diff review UI by reducing redundant controls and
hiding inactive fold controls in split diff views.

## Solution

- Collapse the solo diff header's `Stage File` / `Unstage File` actions
into one button that shows the action relevant to the file's current
staging state.
- Stop reserving fold gutter space and rendering fold crease toggles for
editors with companion snapshots, matching the existing LHS split diff
behavior.

## Testing

- `cargo fmt --check`
- `cargo check -p git_ui`

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

## Showcase

Before, the solo diff header showed both file-level staging actions at
once, and the RHS split diff gutter could show fold arrows that did not
work in that view. After this change, the header shows the relevant
file-level staging action and split companion panes no longer show
inactive fold controls.

Release Notes:

- Improved solo diff controls by showing the relevant file staging
action and hiding inactive fold toggles in split diffs.
2026-06-24 23:03:50 +00:00
..
src solo_diff_view: Add git action to open file diff and other improvements (#59752) 2026-06-24 23:03:50 +00:00
test_data Add an undo button to the git panel (#24593) 2025-02-12 15:57:08 -07:00
Cargo.toml Remove git2 (libgit2) dependency (#53453) 2026-06-02 05:35:36 +00:00
clippy.toml git: Add trusted worktree support to git integrations (#50649) 2026-03-04 12:19:13 +00:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00