Skip to content

Align git branch status chip styling and behavior with the built-in branch chip#13349

Merged
kevinyang372 merged 5 commits into
warpdotdev:masterfrom
BobbyWang0120:bobby/git-branch-status-chip-styling
Jul 21, 2026
Merged

Align git branch status chip styling and behavior with the built-in branch chip#13349
kevinyang372 merged 5 commits into
warpdotdev:masterfrom
BobbyWang0120:bobby/git-branch-status-chip-styling

Conversation

@BobbyWang0120

@BobbyWang0120 BobbyWang0120 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Description

Follow-up to #11938. The git branch status chip looked and behaved differently from the built-in git branch chip and the other input-box chips:

  • It rendered noticeably larger because it hand-rolled its container (own padding constants, hard-coded 14px icon, always the UI font family) instead of reusing the shared UDI chip styling.
  • Its text used a neutral color instead of the theme's branch color that the built-in git branch chip uses.
  • It was not clickable, while the built-in git branch chip opens a branch-switcher menu.

This PR makes the chip share the built-in branch chip's styling and behavior instead of approximating them:

  • Container: built with the shared chip_container() helper so padding, background, border, and corner radius stay consistent with the other chips by construction; icons are sized from the chip font size; the font-family selection matches the sibling diff-stats chip.
  • Color: same font color as the built-in git branch chip (ansi_fg_green, agent-view aware), so it matches automatically across themes.
  • Click behavior: clicking the chip now opens the same branch-switcher menu as the built-in git branch chip (search, "create new branch" entry, linked-worktree handling), via a shared git_branch_menu helper used by both chips. The branch list is fetched with the same generator and filtering as the built-in chip and refreshed when the active branch changes (ahead/behind-only updates don't re-run it).

One intentional difference: the tooltip keeps showing the tracking status (upstream name, ahead/behind counts) rather than the built-in chip's "Change git branch", since surfacing that information is the point of this chip; the pointer cursor still signals clickability.

Linked Issue

Fixes #13347

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

  • Manually tested on a local build: the chip matches the height, padding, font, and color of the neighboring chips, and clicking it opens the branch switcher; selecting a branch checks it out and the chip updates (see the demo video in the comments).

  • context_chips unit tests pass (93 tests).

  • ./script/format --check and cargo clippy -p warp --all-targets --tests -- -D warnings pass.

  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

Before (current official release — the branch status chip is visibly larger than its neighbors):

before-official-release

After (local build with this fix — the chip matches the other chips):

after-fix

Update: the chip now also matches the built-in branch chip's color and opens the branch switcher on click — see the demo video in the comments below.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-BUG-FIX: {{Fixed the git branch status chip rendering larger and in a different color than the other input-box chips, and made it open the branch switcher on click like the built-in branch chip.}}

Co-Authored-By: Warp agent@warp.dev

- size branch and status icons from chip font size

- use shared chip_container for padding and border

- use monospace font in agent view when enabled
@cla-bot cla-bot Bot added the cla-signed label Jul 3, 2026
@oz-for-oss

oz-for-oss Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

@BobbyWang0120

Every PR must be linked to a same-repo issue before Oz can review it.

This PR is linked to #13347, but no linked issue is marked ready-to-implement yet. Only repository maintainers apply that label, so please wait for a maintainer to mark the issue. Once it is marked, push a new commit or comment /oz-review to re-trigger review.

See the contribution guidelines for the full readiness model.

Powered by Oz

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label Jul 3, 2026
oz-for-oss[bot]
oz-for-oss Bot previously requested changes Jul 3, 2026

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@BobbyWang0120

Every PR must be linked to a same-repo issue before Oz can review it.

This PR is linked to #13347, but no linked issue is marked ready-to-implement yet. Only repository maintainers apply that label, so please wait for a maintainer to mark the issue. Once it is marked, push a new commit or comment /oz-review to re-trigger review.

See the contribution guidelines for the full readiness model.

Powered by Oz

@BobbyWang0120

Copy link
Copy Markdown
Contributor Author

/oz-review

@oz-for-oss

oz-for-oss Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

@BobbyWang0120

I'm re-reviewing this pull request in response to a review request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @kevinyang372.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss
oz-for-oss Bot dismissed their stale review July 3, 2026 20:10

Oz no longer requests changes for this pull request after the latest automated review.

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overview

This PR aligns the git branch status chip with the shared input-box chip styling by reusing the common chip container, sizing the branch/status icons from the UDI font size, and matching the font-family behavior used by the adjacent diff-stats chip.

Concerns

  • No blocking concerns found. The PR includes before/after visual evidence for the user-facing styling change, and there is no approved spec context to compare against.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss
oz-for-oss Bot requested a review from kevinyang372 July 3, 2026 20:10

@kevinyang372 kevinyang372 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The code LGTM -- @BobbyWang0120 Mind sharing some more visual evidence to prove this works in different scenarios? Some examples worth testing imo are:

  1. The branch chip with different ahead / behind stats
  2. The branch chip with different font sizes (larger and smaller than the default)
  3. The branch chip with different color schemas

- extract shared git_branch_menu helper for git branch and git branch status chips

- refresh branch dropdown only when the active branch changes

- wire git branch status on_click generator to shell branch list
@BobbyWang0120 BobbyWang0120 changed the title Align git branch status chip styling with the other input-box chips Align git branch status chip styling and behavior with the built-in branch chip Jul 10, 2026
@BobbyWang0120

Copy link
Copy Markdown
Contributor Author

The code LGTM -- @BobbyWang0120 Mind sharing some more visual evidence to prove this works in different scenarios? Some examples worth testing imo are:

  1. The branch chip with different ahead / behind stats
  2. The branch chip with different font sizes (larger and smaller than the default)
  3. The branch chip with different color schemas
git-branch-status-chip-demo.mp4

@BobbyWang0120

Copy link
Copy Markdown
Contributor Author

/oz-review

@BobbyWang0120

Copy link
Copy Markdown
Contributor Author

@kevinyang372 demo video was uploaded.

- merge the latest origin/master into the PR branch
- preserve branch status menu behavior while accepting telemetry removal
@BobbyWang0120

Copy link
Copy Markdown
Contributor Author

@kevinyang372 The demo video is available above, and I have just resolved the conflicts with the latest master. When you have a chance, could you please take another look and let me know if this PR is ready to merge? Thanks!

@kevinyang372 kevinyang372 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@BobbyWang0120 Sorry this didn't make it to my inbox but this LGTM! Could you address the merge conflicts and I could approve CI to run?

- preserve the shared branch-switcher implementation for both branch chips
- retain tooltip suppression while the branch menu is open
@BobbyWang0120

Copy link
Copy Markdown
Contributor Author

@kevinyang372 I’ve just resolved the latest conflicts with master and pushed the update. Hope you can merge it when ready—thanks!

@kevinyang372
kevinyang372 enabled auto-merge (squash) July 20, 2026 18:49
- collapse nested branch refresh guards with a let chain
- unblock platform Clippy checks
auto-merge was automatically disabled July 20, 2026 19:13

Head branch was pushed to by a user without write access

@BobbyWang0120

Copy link
Copy Markdown
Contributor Author

@kevinyang372 The last CI run failed on Clippy’s collapsible_if lint in app/src/context_chips/current_prompt.rs. I pushed the fix in 46cb89a3f, and the targeted warp library Clippy check now passes locally. Could you please re-trigger or approve the CI pipeline when you have a chance? Thanks!

@kevinyang372
kevinyang372 enabled auto-merge (squash) July 21, 2026 15:42
@kevinyang372
kevinyang372 merged commit 8ee4216 into warpdotdev:master Jul 21, 2026
23 checks passed
@BobbyWang0120
BobbyWang0120 deleted the bobby/git-branch-status-chip-styling branch July 21, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Git branch status chip is visually larger than the other input-box chips

2 participants