Skip to content

feat(composer): show CI status next to the PR pill#3088

Open
TheIcarusWings wants to merge 3 commits into
pingdotgg:mainfrom
TheIcarusWings:composer-bar-ci-status
Open

feat(composer): show CI status next to the PR pill#3088
TheIcarusWings wants to merge 3 commits into
pingdotgg:mainfrom
TheIcarusWings:composer-bar-ci-status

Conversation

@TheIcarusWings

@TheIcarusWings TheIcarusWings commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

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.

  • A small chip sits next to the PR pill: green check (all passed), red x (N failing), or amber spinner (running). It renders nothing when the PR has no CI or there is no PR.
  • The PR pill itself is now colored by check status for an open PR (red / amber / green), falling back to the PR-state color for merged (violet) and closed (gray).
  • Hovering the chip shows a tooltip ("CI: 1 failing check (click to view)", "CI: checks running...", "CI: all checks passed..."). Clicking opens the PR's /checks page in the browser.

How

statusCheckRollup is added to the existing gh pr view/list --json calls (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 (ChangeRequestChecks on ChangeRequest and the VCS status PR), and GitManager into the UI. It reuses the existing VCS status refresh cadence, so there is no new polling. An empty/absent rollup yields null and 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:

failing

Passing PR (#3082) -> green pill + green check, tooltip:

passing

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


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 --json requests now include statusCheckRollup. gitHubPullRequests classifies each rollup entry (CheckRun vs StatusContext) into passing, failing, or pending and exposes a ChangeRequestChecks summary (state + failingCount). That field is threaded through contracts (ChangeRequest, VCS status PR), GitHubSourceControlProvider, and GitManager status output. Empty rollups omit checks entirely.

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}/checks via a shared useOpenPrLink hook (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

  • Adds a ChangeRequestChecks contract type (state + failing count) and propagates it from GitHub's statusCheckRollup through the provider, GitManager, and VCS status schemas.
  • Derives the rollup by classifying each check entry as passing, failing, or pending via deriveChecksSummary in gitHubPullRequests.ts.
  • Renders a new CI checks chip next to the PR pill in BranchToolbarBranchSelector.tsx; the chip shows a pass/fail/pending icon, a tooltip, and links to the PR's checks page.
  • Extracts a shared useOpenPrLink hook in openPullRequestLink.ts for consistent PR URL opening with error toasts, replacing the previous inline callback in the sidebar.

Macroscope summarized 0e32e18.

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.
@coderabbitai

coderabbitai Bot commented Jun 15, 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: ac4833fc-e1a4-4b14-ad03-0c7a3697027a

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:L 100-499 changed lines (additions + deletions). labels Jun 15, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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 };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0e32e18. Configure here.

@macroscopeapp

macroscopeapp Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

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

Labels

size:L 100-499 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