feat(refs): show cloud icon for remote-synced branches - #181
Conversation
Replace the verbose '<branch> ⇄ origin' merged-branch label with a compact trailing cloud icon. The badge now reads just the branch name plus a small cloud that signals the branch is synced to a remote, so it's easy to tell at a glance which local branches have upstreams. Full remote details (e.g. 'main ⇄ origin/main') stay in the hover tooltip.
|
Hi @jayll1303, thank you for your PR! It looks like a good idea and a potentially nice improvement. I may review this over the weekend. Before that, I’d like to understand a bit more about the changes you made. From what I can see, you’re changing the local + remote branch badge from How would this work for local-only and remote-only branches? If the absence of a cloud icon represents a local-only branch, how would we represent a remote-only branch? Our current badge examples are:
I think the current badges make the local/remote status quite clear. If we replace this with icons, I’d like to make sure the new design communicates the local/remote status just as clearly and is equally easy to understand. Please discuss your proposed behavior here. Thank you! |
|
Thanks for the feedback! To clarify: this PR only affects the local + remote (merged) badge. Remote-only branches stay exactly as they are ( After looking at how a few other tools handle this, here''s what I''m proposing:
The reason I opened this PR: I''m coding on a fairly small 14" laptop screen, and a long label like Happy to adjust the direction if you''d prefer the icon to carry a different meaning. |
|
Hi @jayll1303 , |
Summary
Replaces the verbose
<branch> ⇄ originmerged-branch label with a compact trailing cloud icon.A merged-branch badge (a local branch that also has matching remote refs) previously rendered as e.g.
main ⇄ origin, which is long and repeats the remote host inline. It now renders just the branch name plus a small cloud icon, which doubles as an at-a-glance "this branch is synced to a remote" indicator.Before / After
Changes
RefLabel.tsx: merged-branch label is now just the branch name; a trailingCloudIconis shown for merged branches (mirrors how the worktree icon already trails the label).CloudIconfromcomponents/icons— no new icon added.main ⇄ origin/maindetail, so multi-remote cases (e.g. origin + upstream) remain discoverable.docs/architecture.md(RefLabel entry + reconciled date).Testing
pnpm typecheck— passespnpm lint— passespnpm vitest runonmergeRefs,filterUtils,worktreeDisplay— 30 passedDisplayRefshape andremoteNamesare unchanged, so merge logic and the tooltip keep working. No test asserts on the rendered label string.Note: some pre-existing failures in
GitWorktreeService/GitSubmoduleService/graphStore/formatDatesuites exist on a cleanmainand are unrelated to this change.