feat(composer): clickable PR pill next to branch selector#3065
feat(composer): clickable PR pill next to branch selector#3065TheIcarusWings wants to merge 1 commit into
Conversation
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>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
ApprovabilityVerdict: 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. |
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: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
prStatusIndicator/ChangeRequestStatusIcon/resolveThreadPrfromThreadStatusIndicators.tsx, and thereadLocalApi()?.shell.openExternalpattern for opening links.useVcsStatus({ environmentId, cwd: branchCwd })query already inBranchToolbarBranchSelector.tsx— no backend changes.ComboboxTriggerinside a flex row; the toolbar layout classes were moved onto that wrapper so the branch group stays right-aligned.TheIcarusWings, basepingdotgg/t3code) via the existingGitManager.findLatestPrdetection.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
useVcsStatusdata).The pill shows the PR icon and
#number, styled by PR state via sharedThreadStatusIndicatorshelpers. Clicking opens the PR URL in the system browser throughreadLocalApi().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
ChangeRequestStatusIconand 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.