Skip to content

Add git branch status context chip#11938

Open
BobbyWang0120 wants to merge 1 commit into
warpdotdev:masterfrom
BobbyWang0120:bobbywang/git-branch-ahead-behind-chip
Open

Add git branch status context chip#11938
BobbyWang0120 wants to merge 1 commit into
warpdotdev:masterfrom
BobbyWang0120:bobbywang/git-branch-ahead-behind-chip

Conversation

@BobbyWang0120
Copy link
Copy Markdown
Contributor

@BobbyWang0120 BobbyWang0120 commented May 30, 2026

Description

Adds a new Git Branch Status context chip that shows the current branch plus upstream tracking counts in the prompt/status chip UI:

  • Shows branch ↑ahead ↓behind when the branch has an upstream and counts are available.
  • Falls back to branch-only display when no upstream is configured or counts cannot be computed.
  • Reuses GitRepoStatusModel metadata so local repo/file watcher updates refresh the chip without silently fetching from the network.
  • Makes the chip available in both the general prompt chip configurator and the third-party CLI agent toolbar configurator.

Linked Issue

Fixes #5766

  • 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).
    • Manual UI testing has been completed locally; screenshot/video can be attached before marking this PR ready.

Testing

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

Automated checks run locally:

  • cargo fmt -- --check
  • cargo clippy -p warp --all-targets --tests -- -D warnings
  • cargo check -p warp
  • cargo nextest run -p warp -E 'test(parse_ahead_behind_counts_accepts_git_rev_list_output) | test(test_git_branch_tracking_status_displays_ahead_and_behind_when_upstream_exists) | test(test_git_branch_tracking_status_displays_branch_only_without_upstream) | test(test_git_branch_tracking_status_displays_branch_only_when_counts_are_unavailable) | test(test_git_branch_status_chip_display_value_uses_git_prefix) | test(test_git_status_change_updates_branch_status_chip_value)'

Manual verification:

  • Enabled the new chip in the normal prompt chip configuration UI.
  • Enabled the new chip in the third-party CLI agent toolbar configuration UI.
  • Verified the chip renders the branch name with ahead/behind commit counts.

Screenshots / Videos

image image image

Agent Mode

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

CHANGELOG-IMPROVEMENT: Added a Git Branch Status prompt chip that shows branch name with ahead/behind commit counts.

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

Co-Authored-By: Warp <agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label May 30, 2026
@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 30, 2026
@BobbyWang0120 BobbyWang0120 marked this pull request as ready for review May 30, 2026 20:12
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 30, 2026

@BobbyWang0120

This PR is not linked to an issue that is marked with ready-to-implement.

Issue-state enforcement details:

Readiness check:

To continue, link this PR to a same-repo issue such as Closes #123 in the PR description, and make sure that issue has ready-to-implement.

Powered by Oz

Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

@BobbyWang0120

This PR is not linked to an issue that is marked with ready-to-implement.

Issue-state enforcement details:

  • Associated same-repo issues checked: #5766

  • Required readiness label: ready-to-implement

Readiness check:

  • #5766: missing ready-to-implement; readiness labels present: none

To continue, link this PR to a same-repo issue such as Closes #123 in the PR description, and make sure that issue has ready-to-implement.

Powered by Oz

@BobbyWang0120
Copy link
Copy Markdown
Contributor Author

@oss-maintainers This PR implements #5766 and includes screenshots plus local/manual testing. Could you please review whether #5766 can be marked ready-to-implement and approve the pending workflows when appropriate?

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.

Warp prompt needs an indicator for Git status ahead/behind remote

1 participant