Skip to content

git: Unify commit popups#38749

Merged
cole-miller merged 3 commits intozed-industries:mainfrom
LoricAndre:feat/git-unify-commit-popups
Dec 17, 2025
Merged

git: Unify commit popups#38749
cole-miller merged 3 commits intozed-industries:mainfrom
LoricAndre:feat/git-unify-commit-popups

Conversation

@LoricAndre
Copy link
Contributor

@LoricAndre LoricAndre commented Sep 23, 2025

Closes #26424
Supersedes #35328

Originally, git::blame uses its own ParsedCommitMessage as the source for the commit information, including the PR section. This changes unifies this with git::repository and git_ui::git_panel by moving this and some other commit-related structs to git::commit instead, and making both git_ui::blame_ui and git_ui::git_panel pull their information from these structs.

Release notes :

  • (Let's Git Together) Fixed the commit tooltip in the git panel not showing information like avatars.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Sep 23, 2025
@maxdeviant maxdeviant changed the title git: unify commit popups git: Unify commit popups Sep 23, 2025
@LoricAndre
Copy link
Contributor Author

@ConradIrwin I added more context to this PR, please check it if you find the time

@zed-industries-bot
Copy link
Contributor

zed-industries-bot commented Sep 29, 2025

Warnings
⚠️

This PR is missing release notes.

Please add a "Release Notes" section that describes the change:

Release Notes:

- Added/Fixed/Improved ...

If your change is not user-facing, you can use "N/A" for the entry:

Release Notes:

- N/A

Generated by 🚫 dangerJS against a8bef5d

Copy link
Member

@cole-miller cole-miller left a comment

Choose a reason for hiding this comment

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

Thanks, I like the idea of reducing the duplication here!

This is a bit difficult to review right now because it seems some stray bytes were introduced into commit.rs, causing git to mark that file as binary and preventing it from showing a diff. Could you fix that? Happy to do a more detailed review afterward.

@LoricAndre LoricAndre force-pushed the feat/git-unify-commit-popups branch 5 times, most recently from 123f0e8 to c0dbcee Compare October 10, 2025 21:42
Copy link
Member

@cole-miller cole-miller left a comment

Choose a reason for hiding this comment

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

Thanks and sorry for the delay in returning to this! I left some feedback about the code style and organization here, just trying to keep the change focused.

Comment on lines +158 to +176
impl Default for CommitDetails {
fn default() -> Self {
Self {
sha: Default::default(),
author_name: Default::default(),
author_email: Default::default(),
commit_time: OffsetDateTime::now_utc(),
message: Default::default(),
}
}
}

impl PartialEq for CommitDetails {
fn eq(&self, other: &Self) -> bool {
self.sha == other.sha
}
}

impl Eq for CommitDetails {}
Copy link
Member

Choose a reason for hiding this comment

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

Ditto the PartialEq and Eq impls here, and I'd rather not have the Default impl at all because calling now_utc in it feels like a footgun

@LoricAndre
Copy link
Contributor Author

I don't know the rule about closing comments in Zed, so I'm leaving them open but everything should be done @cole-miller

@cole-miller
Copy link
Member

Hey @LoricAndre, sorry for the slow turnaround here.

I realized when looking over this again that we can solve the original issue with a simpler approach that's a subset of what you've done here: just move ParsedCommitMessage to commit.rs, and add a parse constructor that takes an Option<Arc<GitHostingProviderRegistry>>, then use that from both blame.rs and git_panel.rs. That way we don't have to make any changes to CommitDetails, which I think is probably best left alone for this change. Would you be up for implementing that approach? Also happy to open a PR that implements it and credit you as a coauthor if that's easier.

@LoricAndre LoricAndre force-pushed the feat/git-unify-commit-popups branch from 024af91 to 2fe3b62 Compare December 17, 2025 20:05
@LoricAndre
Copy link
Contributor Author

LoricAndre commented Dec 17, 2025

Hi @cole-miller, I was about to ask for some input, so the timing is pretty perfect (I have my hands quite full with my other projects, don't worry about taking some time to review).
I think what I just force-pushed matches your comment, could you take a look ? You're right that this makes this change quite a bit simpler

@LoricAndre
Copy link
Contributor Author

I resolved the previous comments as the changes made them obsolete at this point, feel free to reopen anything that you still deem relevant

@cole-miller
Copy link
Member

Thanks! I just pushed some small tweaks, this is ready to go now.

@cole-miller cole-miller self-requested a review December 17, 2025 21:39
@cole-miller cole-miller enabled auto-merge (squash) December 17, 2025 21:40
@LoricAndre
Copy link
Contributor Author

Thank you, I had missed that dead code

@cole-miller cole-miller disabled auto-merge December 17, 2025 22:16
@cole-miller cole-miller merged commit 623e137 into zed-industries:main Dec 17, 2025
23 checks passed
@github-project-automation github-project-automation bot moved this from Community PRs to Done in Quality Week – December 2025 Dec 17, 2025
rtfeldman pushed a commit that referenced this pull request Jan 5, 2026
Closes #26424
Supersedes #35328

Originally, `git::blame` uses its own `ParsedCommitMessage` as the
source for the commit information, including the PR section. This
changes unifies this with `git::repository` and `git_ui::git_panel` by
moving this and some other commit-related structs to `git::commit`
instead, and making both `git_ui::blame_ui` and `git_ui::git_panel` pull
their information from these structs.

Release notes :

- (Let's Git Together) Fixed the commit tooltip in the git panel not
showing information like avatars.

---------

Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
Closes zed-industries#26424
Supersedes zed-industries#35328

Originally, `git::blame` uses its own `ParsedCommitMessage` as the
source for the commit information, including the PR section. This
changes unifies this with `git::repository` and `git_ui::git_panel` by
moving this and some other commit-related structs to `git::commit`
instead, and making both `git_ui::blame_ui` and `git_ui::git_panel` pull
their information from these structs.

Release notes :

- (Let's Git Together) Fixed the commit tooltip in the git panel not
showing information like avatars.

---------

Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
Closes zed-industries#26424
Supersedes zed-industries#35328

Originally, `git::blame` uses its own `ParsedCommitMessage` as the
source for the commit information, including the PR section. This
changes unifies this with `git::repository` and `git_ui::git_panel` by
moving this and some other commit-related structs to `git::commit`
instead, and making both `git_ui::blame_ui` and `git_ui::git_panel` pull
their information from these structs.

Release notes :

- (Let's Git Together) Fixed the commit tooltip in the git panel not
showing information like avatars.

---------

Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
@esthertrapadoux esthertrapadoux moved this to 🚢 Shipped by Community in Git board Jan 20, 2026
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Feb 15, 2026
Closes zed-industries#26424
Supersedes zed-industries#35328

Originally, `git::blame` uses its own `ParsedCommitMessage` as the
source for the commit information, including the PR section. This
changes unifies this with `git::repository` and `git_ui::git_panel` by
moving this and some other commit-related structs to `git::commit`
instead, and making both `git_ui::blame_ui` and `git_ui::git_panel` pull
their information from these structs.

Release notes :

- (Let's Git Together) Fixed the commit tooltip in the git panel not
showing information like avatars.

---------

Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.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

Projects

Status: 🚢 Shipped by Community

Development

Successfully merging this pull request may close these issues.

commit popover in git panel is inconsistent with the one for git blame

3 participants