feat(composer): show CI status next to the PR pill#3088
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.
Address review feedback: the openPrLink handler was duplicated verbatim between Sidebar and the composer branch selector. Extract it into a shared lib/openPullRequestLink hook and use it from both call sites.
Surface the current branch PR's CI rollup in the composer branch bar. A small chip sits next to the PR pill (green check, red x, or amber spinner), and the PR pill itself is colored by check status. Clicking the chip opens the PR's checks page. statusCheckRollup is threaded from `gh pr view/list` through the source control provider, contracts, and VCS status into the UI. An empty or absent rollup renders nothing, so PRs without CI are unaffected.
|
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 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0e32e18. Configure here.
| } | ||
| if (failingCount > 0) return { state: "failing", failingCount }; | ||
| if (anyPending) return { state: "pending", failingCount: 0 }; | ||
| return { state: "passing", failingCount: 0 }; |
There was a problem hiding this comment.
Superseded checks counted as failing
Medium Severity
deriveChecksSummary classifies every statusCheckRollup entry with no deduplication by check name or recency. GitHub often returns multiple runs for the same check (for example a cancelled or failed run plus a newer success when workflows use cancel-in-progress or re-runs). Those stale entries are still counted as failing, so the composer can show a red CI chip and failing tooltip while GitHub’s PR checks page shows all green.
Reviewed by Cursor Bugbot for commit 0e32e18. Configure here.
ApprovabilityVerdict: Needs human review This PR introduces a new user-facing feature (CI status indicators next to PR pills) with new logic and UI components. Additionally, there's an unresolved review comment identifying a potential bug where superseded checks may be incorrectly counted as failing. You can customize Macroscope's approvability policy. Learn more. |


What
Adds a CI (checks) status indicator to the composer branch bar so you can see at a glance whether the current branch's PR is green, red, or still running.
/checkspage in the browser.How
statusCheckRollupis added to the existinggh pr view/list --jsoncalls (no extra round-trip). An overall summary is derived (failing if any conclusion is FAILURE/ERROR/CANCELLED/TIMED_OUT; pending if any check is queued/in-progress/unconcluded; else passing) with a failure count for the tooltip. It is threaded through the source control provider, contracts (ChangeRequestChecksonChangeRequestand the VCS status PR), andGitManagerinto the UI. It reuses the existing VCS status refresh cadence, so there is no new polling. An empty/absent rollup yieldsnulland never an error chip. Fork PRs work since the rollup is on the PR regardless of head repo.Screenshots
Failing PR (#3087) -> red pill + red x, tooltip:
Passing PR (#3082) -> green pill + green check, tooltip:
Verified live by pointing the composer at branches with real open PRs and confirming the chip reflects passing/failing and opens the checks page. The amber "running" state is produced by the same code path (any in-progress/queued check); it was not captured live because no open PR had a check still running at the time.
Notes
--jsonfield-list assertions. Typecheck, server tests, lint, and format all pass.Note
Low Risk
Read-only enrichment of existing gh JSON and UI indicators; no auth, persistence, or git workflow behavior changes.
Overview
Adds rolled-up CI status for the active branch’s PR in the composer branch bar, without extra GitHub API calls.
Backend: Existing
gh pr view/gh pr list --jsonrequests now includestatusCheckRollup.gitHubPullRequestsclassifies each rollup entry (CheckRun vs StatusContext) into passing, failing, or pending and exposes aChangeRequestCheckssummary (state+failingCount). That field is threaded through contracts (ChangeRequest, VCS status PR),GitHubSourceControlProvider, andGitManagerstatus output. Empty rollups omitchecksentirely.UI: The branch toolbar shows a clickable PR pill plus a CI chip (green check / red X / amber spinner) when checks exist. Open PR pills tint by CI health; merged/closed keep state colors. Clicks open the PR or
{prUrl}/checksvia a shareduseOpenPrLinkhook (also used from the sidebar).Reviewed by Cursor Bugbot for commit 0e32e18. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Show CI status next to the PR pill in the branch toolbar
ChangeRequestCheckscontract type (state + failing count) and propagates it from GitHub'sstatusCheckRollupthrough the provider,GitManager, and VCS status schemas.deriveChecksSummaryin gitHubPullRequests.ts.useOpenPrLinkhook in openPullRequestLink.ts for consistent PR URL opening with error toasts, replacing the previous inline callback in the sidebar.Macroscope summarized 0e32e18.