Skip to content

git_ui: Align repo and branch pickers#47752

Merged
danilo-leal merged 7 commits intozed-industries:mainfrom
tartarughina:tartarughina/repo-selector
Jan 28, 2026
Merged

git_ui: Align repo and branch pickers#47752
danilo-leal merged 7 commits intozed-industries:mainfrom
tartarughina:tartarughina/repo-selector

Conversation

@tartarughina
Copy link
Contributor

@tartarughina tartarughina commented Jan 27, 2026

When working in a workspace with multiple repositories, the git panel provides a repository picker to switch between them. However, there was no visual indication of which repositories have uncommitted changes: users had to either select each repository individually or check the project panel where modified directories are highlighted.

This change adds git status icons to the repository picker, allowing users to see at a glance which repositories contain changes (modified, added, deleted, or conflicted files). The icons use the same visual language already established for file status throughout the git panel.

Additionally, the repository picker now matches the branch picker's styling for visual consistency:

  • Added "Repositories" header
  • Aligned popover width and positioning
  • Added scrollbar
  • Added check icon next to currently selected repo
  • Added selected branch under repo list item
  • Sort by display name is now case insensitive

Before:

Screenshot 2026-01-27 at 11 43 55

After:

Screenshot 2026-01-27 at 14 07 52

Branch picker for style reference:

Screenshot 2026-01-27 at 11 44 03

Release Notes:

  • Git: Improved the project picker in the panel by also displaying the GIt status icon on them, to clearly indicate which repos have changes.

- Show git status icon next to repositories with uncommitted changes
  using the same GitStatusIcon component as the git panel
- Add "Repositories" header for consistency with branch picker
- Align popover width (20 rems) and offset with branch picker
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 27, 2026
@github-actions github-actions bot added the community champion Issues filed by our amazing community champions! 🫶 label Jan 27, 2026
@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Jan 27, 2026
@MrSubidubi MrSubidubi changed the title git_ui: align repo and branch pickers git_ui: Align repo and branch pickers Jan 27, 2026
- Add a check icon next to the currently selected
  repo
- Show the current branch under the repo item
- Implement case-insenstive sort for repositories
Copy link
Member

@danilo-leal danilo-leal left a comment

Choose a reason for hiding this comment

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

Thanks for the PR & congrats on your first contribution! I pushed a few commits cleaning the design up a bit:

  • Don't think we need the branch name here because that's displayed right to the side of the project name already, no need to repeat it. Having it in the project list item was also messing up the height; particularly given this is a uniform list (i.e., all items must have the same height), the fact that some had it and some didn't meant a lot of layout shift
  • Improved the icon alignment
  • Made the currently selected list item when you open the picker be the active repo, instead of just resetting the active index to 0 always
  • Made the button trigger have a default color when available (it was muted before). Also removed the "Switch Active Repository" tooltip when in a single repo scenario
  • Removed the header because in this case, it's always repositories, so the header becomes unnecessary. We have one in the branch picker because the header changes depending on whether you have the filter for remotes toggled on
Image

@danilo-leal danilo-leal merged commit bcd78af into zed-industries:main Jan 28, 2026
28 checks passed
@tartarughina
Copy link
Contributor Author

Thanks for the touch ups . Especially for the branch name under the repo: it was nice to see but then effectively not that valuable, and as you identified, some repos might have had no branch available making the item unbalanced.

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 community champion Issues filed by our amazing community champions! 🫶 first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants