Skip to content

git_panel: Add commit history view#56500

Merged
danilo-leal merged 4 commits into
mainfrom
commit-history-git-panel
May 12, 2026
Merged

git_panel: Add commit history view#56500
danilo-leal merged 4 commits into
mainfrom
commit-history-git-panel

Conversation

@danilo-leal

Copy link
Copy Markdown
Member

This PR adds a history view to the git panel. It draws from similar implementations of commit listing in other places like the file history view and the git graph.

Changes View History View
Screenshot 2026-05-12 at 3  38@2x Screenshot 2026-05-12 at 3  39@2x

Release Notes:

  • Git: Added a history view to the Git panel that allows to quickly see in a list all the commits for a given branch.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 12, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label May 12, 2026

@Anthony-Eid Anthony-Eid 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.

I wonder if we can unify this code and the git graph

@danilo-leal

danilo-leal commented May 12, 2026

Copy link
Copy Markdown
Member Author

Yeah, great call, will give that a pass in a follow up! Landing this one for now 😄 appreciate the review!

@danilo-leal danilo-leal added this pull request to the merge queue May 12, 2026
Merged via the queue into main with commit 61da34c May 12, 2026
31 checks passed
@danilo-leal danilo-leal deleted the commit-history-git-panel branch May 12, 2026 15:57
Comment on lines +5093 to +5108
if self._repo_subscriptions.is_empty() {
self._repo_subscriptions.push(cx.subscribe(
active_repository,
|this, _repo, event, cx| {
if let RepositoryEvent::GraphEvent(_, _) = event {
if this.active_tab == GitPanelTab::History {
this.fetch_commit_history_shas(cx);
}
}
},
));
self._repo_subscriptions
.push(cx.observe(active_repository, |_this, _repo, cx| {
cx.notify();
}));
}

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.

I think this is wrong, we should clear the data depending on the type of graph event.

Also, should we have a way to switch the repo when the active repository changes

@pantheraleo-7

Copy link
Copy Markdown
Contributor

hey, sorry to comment on a merged PR, but since this pertains to UI I wanted get an opinion by Zed design staff:

the Git Graph button sitting next to the Uncommit button is risky in case of a mis-click (the buttons being [rightfully] small makes it more susceptible), and [IMO] it looks out of place conceptually too (since the things they do are unrelated)

can I ask the design team to consider moving the Git Graph button somewhere else on the pane?

I have an alternative place in mind:

the graph icon preceding the branch name can be converted into the Git Graph button. what say?

image

(I can open a discussion if you want but I thought this was too trivial...)

DanielFabian pushed a commit to DanielFabian/zed that referenced this pull request May 14, 2026
…ard (zed-industries#56743)

Follow-up to zed-industries#56500. Was
missing this ability very much :)

Release Notes:

- Git Panel: Added the ability to switch between the changes and history
tabs with the keyboard.
@shawnwall

Copy link
Copy Markdown

just wanted to swing by and say THANK YOU for this!!!

jasonsmithio pushed a commit to paddleboarddev/paddleboard that referenced this pull request May 31, 2026
…ard (#56743)

Follow-up to zed-industries/zed#56500. Was
missing this ability very much :)

Release Notes:

- Git Panel: Added the ability to switch between the changes and history
tabs with the keyboard.
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.

4 participants