Skip to content

feat(composer): clickable PR pill next to branch selector#3065

Open
TheIcarusWings wants to merge 1 commit into
pingdotgg:mainfrom
TheIcarusWings:composer-bar-pr-pill
Open

feat(composer): clickable PR pill next to branch selector#3065
TheIcarusWings wants to merge 1 commit into
pingdotgg:mainfrom
TheIcarusWings:composer-bar-pr-pill

Conversation

@TheIcarusWings

@TheIcarusWings TheIcarusWings commented Jun 12, 2026

Copy link
Copy Markdown

What

Adds a small clickable PR pill next to the branch selector in the bottom composer bar. When the active branch has a pull request, the pill shows the PR icon + #<number>, colored by state:

  • open → emerald
  • merged → violet
  • closed → zinc

Clicking the pill opens the PR in the system browser. It sits to the left of the branch selector and does not open the branch dropdown (click is stopped/prevented).

Details

  • Reuses prStatusIndicator / ChangeRequestStatusIcon / resolveThreadPr from ThreadStatusIndicators.tsx, and the readLocalApi()?.shell.openExternal pattern for opening links.
  • Data comes from the existing useVcsStatus({ environmentId, cwd: branchCwd }) query already in BranchToolbarBranchSelector.tsx — no backend changes.
  • The pill renders as a sibling of the ComboboxTrigger inside a flex row; the toolbar layout classes were moved onto that wrapper so the branch group stays right-aligned.
  • Tooltip is action-oriented ("Open pull request #N (state) in browser") using the provider's terminology, distinct from the sidebar's state-description tooltip.
  • Works with cross-repo fork PRs (head TheIcarusWings, base pingdotgg/t3code) via the existing GitManager.findLatestPr detection.

Test

Switch the bottom-bar branch to one with an open PR and confirm the pill appears with the right color and opens the correct GitHub URL.

🤖 Generated with Claude Code


Note

Low Risk
UI-only composer toolbar change reusing existing VCS status and external-link patterns; no backend or auth changes.

Overview
Adds a clickable PR pill to the left of the composer branch selector when the active branch has an associated pull request (from the existing useVcsStatus data).

The pill shows the PR icon and #number, styled by PR state via shared ThreadStatusIndicators helpers. Clicking opens the PR URL in the system browser through readLocalApi().shell.openExternal, with click propagation stopped so the branch dropdown does not open. An action-oriented tooltip describes opening the PR in the browser.

Layout moves toolbar alignment classes onto a flex wrapper that groups the optional pill and the ComboboxTrigger.

Reviewed by Cursor Bugbot for commit cd4ea2c. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add clickable PR status pill to branch selector in composer toolbar

Adds a PR status pill next to the branch selector in BranchToolbarBranchSelector.tsx. When the active branch has an associated PR, a button showing the ChangeRequestStatusIcon and PR number appears with a tooltip. Clicking it opens the PR URL externally via the local API; failures surface as an error toast.

Macroscope summarized cd4ea2c.

Render a small PR pill (icon + #number) to the left of the branch
selector in the bottom composer bar when the active branch has a pull
request. The pill is colored by PR state (open=emerald, merged=violet,
closed=zinc) via the shared prStatusIndicator, and clicking it opens the
PR in the system browser without opening the branch dropdown.

The tooltip is action-oriented ("Open pull request #N (state) in
browser") and uses the provider's terminology, distinct from the
sidebar's state-description tooltip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 307cc171-175a-4ddd-b200-86cfccda0c5f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Jun 12, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Self-contained UI enhancement adding a clickable PR pill next to the branch selector. Reuses existing utilities and APIs with no backend, schema, or security implications.

You can customize Macroscope's approvability policy. Learn more.

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

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant