git_ui: Add Shift-click multi-select to the Git Panel - #63444
Open
peakxy wants to merge 5 commits into
Open
Conversation
…iple" This reverts commit b79d9af.
multiple selections.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Shift-click range multi-select to the Git Panel and updates Git Panel actions to operate on the marked (multi-selected) entries when present, including opening multiple file diffs / files / histories. Also updates the File History action renderer to support multiple targets and adds GPUI tests covering the new selection + batch-action behavior.
Changes:
- Introduce
marked_entries-driven multi-selection with Shift-click range selection, plain-click collapse, and empty-area click deselect. - Update Git Panel actions (stage/unstage, revert, view file, open file diff, gitignore/exclude, file history targets) to operate on
selected_status_entries(). - Add GPUI tests covering multi-select selection semantics and multi-target actions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| crates/git_ui/src/git_panel.rs | Implements multi-selection behavior, updates multiple actions to operate on marked entries, and adds GPUI tests. |
| crates/git_ui/src/git_graph.rs | Extends File History action handling to open history for multiple selected targets. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
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.
Objective
Solution
marked_entries), in both flat and tree view modes; a plain click collapses back to a single selection, and clicking the empty area below the list clears the selection.selected_status_entries()helper resolves the marked entries when present, otherwise the single selected entry, and all entry actions now operate on that list:update_visible_entries.Testing
gpui::testcases ingit_panel.rscovering: shift-click range selection in flat and tree view, plain-click collapse, selection surviving a flat→tree rebuild, multi View File, multi stage via ToggleStaged, multi Open File Diff, and multi View File History.The demonstration video is as follows:
CleanShot.2026-08-30.at.19.43.00.mp4
Self-Review Checklist:
Showcase
Click to view interactions
Shift+ click → selects the range from the anchor to the clicked file (highlighted rows)(screenshot/GIF placeholder — record before submitting if desired)
Release Notes: