Align git branch status chip styling and behavior with the built-in branch chip#13349
Conversation
- 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
|
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 See the contribution guidelines for the full readiness model. Powered by Oz |
There was a problem hiding this comment.
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
|
/oz-review |
|
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: Comment Powered by Oz |
Oz no longer requests changes for this pull request after the latest automated review.
There was a problem hiding this comment.
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
kevinyang372
left a comment
There was a problem hiding this comment.
The code LGTM -- @BobbyWang0120 Mind sharing some more visual evidence to prove this works in different scenarios? Some examples worth testing imo are:
- The branch chip with different ahead / behind stats
- The branch chip with different font sizes (larger and smaller than the default)
- 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
git-branch-status-chip-demo.mp4 |
|
/oz-review |
|
@kevinyang372 demo video was uploaded. |
- merge the latest origin/master into the PR branch - preserve branch status menu behavior while accepting telemetry removal
|
@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
left a comment
There was a problem hiding this comment.
@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
|
@kevinyang372 I’ve just resolved the latest conflicts with |
- collapse nested branch refresh guards with a let chain - unblock platform Clippy checks
Head branch was pushed to by a user without write access
|
@kevinyang372 The last CI run failed on Clippy’s |
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:
This PR makes the chip share the built-in branch chip's styling and behavior instead of approximating them:
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.ansi_fg_green, agent-view aware), so it matches automatically across themes.git_branch_menuhelper 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
ready-to-specorready-to-implement.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_chipsunit tests pass (93 tests)../script/format --checkandcargo clippy -p warp --all-targets --tests -- -D warningspass.I have manually tested my changes locally with
./script/runScreenshots / Videos
Before (current official release — the branch status chip is visibly larger than its neighbors):
After (local build with this fix — the chip matches the other chips):
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
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