Skip to content

feat(refs): show cloud icon for remote-synced branches - #181

Open
jayll1303 wants to merge 1 commit into
onlineeric:mainfrom
jayll1303:feat/merged-branch-cloud-icon
Open

feat(refs): show cloud icon for remote-synced branches#181
jayll1303 wants to merge 1 commit into
onlineeric:mainfrom
jayll1303:feat/merged-branch-cloud-icon

Conversation

@jayll1303

@jayll1303 jayll1303 commented Aug 11, 2026

Copy link
Copy Markdown

Summary

Replaces the verbose <branch> ⇄ origin merged-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

Before and after of the merged-branch badge

Changes

  • RefLabel.tsx: merged-branch label is now just the branch name; a trailing CloudIcon is shown for merged branches (mirrors how the worktree icon already trails the label).
  • Reuses the existing CloudIcon from components/icons — no new icon added.
  • The hover tooltip still shows the full main ⇄ origin/main detail, so multi-remote cases (e.g. origin + upstream) remain discoverable.
  • Updated docs/architecture.md (RefLabel entry + reconciled date).

Testing

  • pnpm typecheck — passes
  • pnpm lint — passes
  • pnpm vitest run on mergeRefs, filterUtils, worktreeDisplay — 30 passed

DisplayRef shape and remoteNames are 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/formatDate suites exist on a clean main and are unrelated to this change.

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.
@onlineeric onlineeric self-assigned this Aug 11, 2026
@onlineeric

Copy link
Copy Markdown
Owner

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 main ⇄ origin/main to main {cloud icon}.

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:

  • Local-only branch: main
  • Remote-only branch: origin/main
  • Local + remote branch: main ⇄ origin/main

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!

@jayll1303

Copy link
Copy Markdown
Author

Thanks for the feedback!

To clarify: this PR only affects the local + remote (merged) badge. Remote-only branches stay exactly as they are (origin/branch).

After looking at how a few other tools handle this, here''s what I''m proposing:

  • Local-only: ⑂ main
  • Remote-only: ⑂ origin/main (still carries the origin/ prefix)
  • Local + remote: ⑂ main ☁

The reason I opened this PR: I''m coding on a fairly small 14" laptop screen, and a long label like main ⇄ origin/main takes up a lot of horizontal space. I think collapsing it to a compact cloud icon makes the graph easier to read, while the full main ⇄ origin/main detail stays available in the hover tooltip.

Happy to adjust the direction if you''d prefer the icon to carry a different meaning.

@onlineeric

Copy link
Copy Markdown
Owner

Hi @jayll1303 ,
It sounds good and reasonable, I'll check your PR soon, may be weekend.
Thank you again for submitting this PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants