Skip to content

git_ui: Improve connection between the graph and commit views#50027

Merged
danilo-leal merged 9 commits intomainfrom
commit-view-git-graph
Feb 25, 2026
Merged

git_ui: Improve connection between the graph and commit views#50027
danilo-leal merged 9 commits intomainfrom
commit-view-git-graph

Conversation

@danilo-leal
Copy link
Member

  • Enabled opening the Git Graph, with the corresponding commit detail drawer open, from the commit view
  • Redesigned the commit view's header and toolbar to allow addition of the Git Graph icon button
  • Redesigned icons for the Git Graph and commit view
Screenshot.2026-02-24.at.7.23.mp4

Before you mark this PR as ready for review, make sure that you have:

  • Added a solid test coverage and/or screenshots from doing manual testing
  • Done a self-review taking into account security and performance aspects
  • Aligned any UI changes with the UI checklist

Release Notes:

  • N/A (Git Graph is still feature flagged, so no release notes for now)

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 24, 2026
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Feb 24, 2026
Clear `pending_select_sha` on branch changes, and limit retries so it
expires if the target SHA is never found in the graph.
@maxbrunsfeld
Copy link
Collaborator

Love this! Is there a way to navigate the other way - opening the commit view from the git graph?

@danilo-leal
Copy link
Member Author

Yes! Added in here #49910 (already in Nightly 😄).

@maxbrunsfeld
Copy link
Collaborator

Nice!

Copy link
Contributor

@Anthony-Eid Anthony-Eid left a comment

Choose a reason for hiding this comment

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

None of my feedback is blocking, if you want to merge this I can make the changes I want too later today

Comment on lines +1196 to +1202
for (idx, commit) in self.graph_data.commits.iter().enumerate() {
if commit.data.sha == oid {
self.pending_select_sha = None;
self.select_entry(idx, cx);
return;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably make a hash map of commit shas to their row in the graph, it will be needed for git search as well. This isn't a blocker, just something to add to our todo list in the future

self.graph_data.add_commits(commits);
});
cx.notify();
self.retry_pending_select(cx);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can avoid having PENDING_SELECT_MAX_RETRIES in retry_pending select.

repository.graph_data(...).1 is true if the graph is still loading commits, we can clear the pending selection if it's false and we haven't found the commit a user wants to see

Copy link
Contributor

Choose a reason for hiding this comment

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

It might be better if we make another repository event that is emitted once the graph is loaded, because there's a small race condition with repository.graph_data(...).1, so it might be true when we hit the last block of loaded commits because the task hasn't been finish yet.

@danilo-leal danilo-leal merged commit 13eb0f6 into main Feb 25, 2026
27 checks passed
@danilo-leal danilo-leal deleted the commit-view-git-graph branch February 25, 2026 13:45
github-actions bot added a commit that referenced this pull request Feb 25, 2026
git_ui: Improve connection between the graph and commit views

Auto-generated documentation suggestions for review at next preview release.
morgankrey added a commit that referenced this pull request Feb 25, 2026
Auto-applied queued documentation suggestions from:
- PR #48908
- PR #48909
- PR #48910
- PR #48912
- PR #48930
- PR #44794
- PR #48763
- PR #45073
- PR #48495
- PR #49374
- PR #49139
- PR #48780
- PR #48619
- PR #48978
- PR #48962
- PR #48988
- PR #47860
- PR #49015
- PR #47095
- PR #47475
- PR #48542
- PR #46766
- PR #47754
- PR #48807
- PR #44506
- PR #49051
- PR #49069
- PR #48842
- PR #48851
- PR #48736
- PR #47673
- PR #49094
- PR #49098
- PR #49622
- PR #49554
- PR #49710
- PR #49716
- PR #49732
- PR #49788
- PR #49876
- PR #49902
- PR #49910
- PR #49390
- PR #50027

Generated with script/docs-suggest-publish for human review in draft PR.
@Anthony-Eid Anthony-Eid mentioned this pull request Feb 25, 2026
3 tasks
Anthony-Eid added a commit that referenced this pull request Feb 25, 2026
This is a follow-up on #50027

I address my comments by adding a hash map look-up to find the selected
pending commit. I also removed the limitation where we would only retry
finding the pending commit 5 times. The pending selection is removed
when the graph is fully loaded and doesn't contain the pending commit.

This PR also cleans up some internal code structure and starts work to
enable search and propagating git log error messages to the UI.

UI wise I made the git graph item show the repository name instead of
"Git Graph" in Zed.

Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A

---------

Co-authored-by: Remco Smits <djsmits12@gmail.com>
morgankrey added a commit that referenced this pull request Feb 25, 2026
Auto-applied queued documentation suggestions from:
- PR #48908
- PR #48909
- PR #48910
- PR #48912
- PR #48930
- PR #44794
- PR #48763
- PR #45073
- PR #48495
- PR #49374
- PR #49139
- PR #48780
- PR #48619
- PR #48978
- PR #48962
- PR #48988
- PR #47860
- PR #49015
- PR #47095
- PR #47475
- PR #48542
- PR #46766
- PR #47754
- PR #48807
- PR #44506
- PR #49051
- PR #49069
- PR #48842
- PR #48851
- PR #48736
- PR #47673
- PR #49094
- PR #49098
- PR #49622
- PR #49554
- PR #49710
- PR #49716
- PR #49732
- PR #49788
- PR #49876
- PR #49902
- PR #49910
- PR #49390
- PR #50027

Generated with script/docs-suggest-publish for human review in draft PR.
rtfeldman pushed a commit that referenced this pull request Feb 27, 2026
This is a follow-up on #50027

I address my comments by adding a hash map look-up to find the selected
pending commit. I also removed the limitation where we would only retry
finding the pending commit 5 times. The pending selection is removed
when the graph is fully loaded and doesn't contain the pending commit.

This PR also cleans up some internal code structure and starts work to
enable search and propagating git log error messages to the UI.

UI wise I made the git graph item show the repository name instead of
"Git Graph" in Zed.

Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A

---------

Co-authored-by: Remco Smits <djsmits12@gmail.com>
tahayvr pushed a commit to tahayvr/zed that referenced this pull request Mar 4, 2026
…dustries#50027)

- Enabled opening the Git Graph, with the corresponding commit detail
drawer open, from the commit view
- Redesigned the commit view's header and toolbar to allow addition of
the Git Graph icon button
- Redesigned icons for the Git Graph and commit view


https://github.com/user-attachments/assets/8efef60a-0893-4752-9b40-838da21ceb54

---

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A (_Git Graph is still feature flagged, so no release notes for
now_)
tahayvr pushed a commit to tahayvr/zed that referenced this pull request Mar 4, 2026
This is a follow-up on zed-industries#50027

I address my comments by adding a hash map look-up to find the selected
pending commit. I also removed the limitation where we would only retry
finding the pending commit 5 times. The pending selection is removed
when the graph is fully loaded and doesn't contain the pending commit.

This PR also cleans up some internal code structure and starts work to
enable search and propagating git log error messages to the UI.

UI wise I made the git graph item show the repository name instead of
"Git Graph" in Zed.

Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A

---------

Co-authored-by: Remco Smits <djsmits12@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants