Skip to content

git_graph: Improve ref chips - #55774

Closed
nguyenphutrong wants to merge 3 commits into
zed-industries:mainfrom
nguyenphutrong:feature/implement-git-graph-enhancements/git-ref-chips
Closed

git_graph: Improve ref chips#55774
nguyenphutrong wants to merge 3 commits into
zed-industries:mainfrom
nguyenphutrong:feature/implement-git-graph-enhancements/git-ref-chips

Conversation

@nguyenphutrong

@nguyenphutrong nguyenphutrong commented May 5, 2026

Copy link
Copy Markdown
Contributor

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

This PR improves the way Git refs are rendered in Git Graph rows and commit details by giving ref chips clearer visual treatment.

The ref chip updates include:

  • Dedicated stash and tag icons
  • Leading-icon and label-weight support in the shared Chip component
  • Distinct chip icons for branch, tag, stash, and checked-out branch refs
  • A clearer checked-out branch chip using stronger visual emphasis
  • Stash labels rendered as stash@{n} when the stash commit can be matched to cached stash entries, instead of showing the raw refs/stash decoration
  • A fallback to the original ref name when the stash cache does not contain the matching commit

This keeps the raw Git decoration data intact and only adjusts the display name used by Git Graph when rendering stash refs.

Testing performed:

  • cargo fmt --all
  • git diff --check
  • ./script/clippy -p git_graph --tests

Release Notes:

  • Improved Git Graph ref chips for branches, tags, and stashes.

Add a gear menu next to the search bar for toggling graph display options.

Wire the selected settings into git log loading so stashes, tags, reflog-only commits,
and first-parent traversal affect the rendered graph instead of only the UI state.
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 5, 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 May 5, 2026
@nguyenphutrong nguyenphutrong changed the title git_graph: Add graph settings and ref chip icons git_graph: Improve ref chips May 5, 2026
@nguyenphutrong
nguyenphutrong force-pushed the feature/implement-git-graph-enhancements/git-ref-chips branch from 762573c to 06e01e1 Compare May 5, 2026 14:52
@SomeoneToIgnore

Copy link
Copy Markdown
Contributor

Autoclosing all draft PRs with no activity for 2 weeks or over, this one also has conflicts:

image

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 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