Repository navigation
fix(sidebar): distinguish passing checks from a mergeable PR - #29
Merged
Merged
Conversation
A workspace card's PR glyph was painted emerald when the PR was open *or* when
checks had passed, so one colour carried two meanings and a PR with green CI
and a pending approval looked exactly like a fully mergeable one. Its tooltip
said "PR checks: Passing", which reads the same way.
The glyph now keeps reporting CI and gains a corner dot when the provider is
not letting the merge go: amber for a requirement still outstanding, rose for a
hard blocker, muted while the provider is still computing. The tooltip and
screen-reader label name the reason, and the card's hover details and the Tasks
page checks pill show the same verdict.
hosted-review-merge-readiness.ts is the one source of truth for it, mapping
state/mergeable/mergeStateStatus/reviewDecision/mergeQueueRequired onto
{readiness, marker, reason} for every provider. Readiness needs positive
evidence — GitHub returns mergeable=MERGEABLE as soon as there are no
conflicts, before it knows about approvals, so trusting that field alone would
assert a mergeability GitHub has not granted.
Checks neither raise the dot nor lower an open merge box: the glyph colour
already carries CI, and UNSTABLE means only non-required checks are failing.
The status tones live in new --status-warning tokens and three badge variants,
because the changed-lines design-system gate rejects raw palette colours.
nplez1
added a commit
that referenced
this pull request
Sep 25, 2026
A workspace card's PR glyph was painted emerald when the PR was open *or* when
checks had passed, so one colour carried two meanings and a PR with green CI
and a pending approval looked exactly like a fully mergeable one. Its tooltip
said "PR checks: Passing", which reads the same way.
The glyph now keeps reporting CI and gains a corner dot when the provider is
not letting the merge go: amber for a requirement still outstanding, rose for a
hard blocker, muted while the provider is still computing. The tooltip and
screen-reader label name the reason, and the card's hover details and the Tasks
page checks pill show the same verdict.
hosted-review-merge-readiness.ts is the one source of truth for it, mapping
state/mergeable/mergeStateStatus/reviewDecision/mergeQueueRequired onto
{readiness, marker, reason} for every provider. Readiness needs positive
evidence — GitHub returns mergeable=MERGEABLE as soon as there are no
conflicts, before it knows about approvals, so trusting that field alone would
assert a mergeability GitHub has not granted.
Checks neither raise the dot nor lower an open merge box: the glyph colour
already carries CI, and UNSTABLE means only non-required checks are failing.
The status tones live in new --status-warning tokens and three badge variants,
because the changed-lines design-system gate rejects raw palette colours.
7 of 9 tasks
nplez1
added a commit
that referenced
this pull request
Sep 27, 2026
A workspace card's PR glyph was painted emerald when the PR was open *or* when
checks had passed, so one colour carried two meanings and a PR with green CI
and a pending approval looked exactly like a fully mergeable one. Its tooltip
said "PR checks: Passing", which reads the same way.
The glyph now keeps reporting CI and gains a corner dot when the provider is
not letting the merge go: amber for a requirement still outstanding, rose for a
hard blocker, muted while the provider is still computing. The tooltip and
screen-reader label name the reason, and the card's hover details and the Tasks
page checks pill show the same verdict.
hosted-review-merge-readiness.ts is the one source of truth for it, mapping
state/mergeable/mergeStateStatus/reviewDecision/mergeQueueRequired onto
{readiness, marker, reason} for every provider. Readiness needs positive
evidence — GitHub returns mergeable=MERGEABLE as soon as there are no
conflicts, before it knows about approvals, so trusting that field alone would
assert a mergeability GitHub has not granted.
Checks neither raise the dot nor lower an open merge box: the glyph colour
already carries CI, and UNSTABLE means only non-required checks are failing.
The status tones live in new --status-warning tokens and three badge variants,
because the changed-lines design-system gate rejects raw palette colours.
nplez1
added a commit
that referenced
this pull request
Sep 29, 2026
A workspace card's PR glyph was painted emerald when the PR was open *or* when
checks had passed, so one colour carried two meanings and a PR with green CI
and a pending approval looked exactly like a fully mergeable one. Its tooltip
said "PR checks: Passing", which reads the same way.
The glyph now keeps reporting CI and gains a corner dot when the provider is
not letting the merge go: amber for a requirement still outstanding, rose for a
hard blocker, muted while the provider is still computing. The tooltip and
screen-reader label name the reason, and the card's hover details and the Tasks
page checks pill show the same verdict.
hosted-review-merge-readiness.ts is the one source of truth for it, mapping
state/mergeable/mergeStateStatus/reviewDecision/mergeQueueRequired onto
{readiness, marker, reason} for every provider. Readiness needs positive
evidence — GitHub returns mergeable=MERGEABLE as soon as there are no
conflicts, before it knows about approvals, so trusting that field alone would
assert a mergeability GitHub has not granted.
Checks neither raise the dot nor lower an open merge box: the glyph colour
already carries CI, and UNSTABLE means only non-required checks are failing.
The status tones live in new --status-warning tokens and three badge variants,
because the changed-lines design-system gate rejects raw palette colours.
nplez1
added a commit
that referenced
this pull request
Oct 1, 2026
A workspace card's PR glyph was painted emerald when the PR was open *or* when
checks had passed, so one colour carried two meanings and a PR with green CI
and a pending approval looked exactly like a fully mergeable one. Its tooltip
said "PR checks: Passing", which reads the same way.
The glyph now keeps reporting CI and gains a corner dot when the provider is
not letting the merge go: amber for a requirement still outstanding, rose for a
hard blocker, muted while the provider is still computing. The tooltip and
screen-reader label name the reason, and the card's hover details and the Tasks
page checks pill show the same verdict.
hosted-review-merge-readiness.ts is the one source of truth for it, mapping
state/mergeable/mergeStateStatus/reviewDecision/mergeQueueRequired onto
{readiness, marker, reason} for every provider. Readiness needs positive
evidence — GitHub returns mergeable=MERGEABLE as soon as there are no
conflicts, before it knows about approvals, so trusting that field alone would
assert a mergeability GitHub has not granted.
Checks neither raise the dot nor lower an open merge box: the glyph colour
already carries CI, and UNSTABLE means only non-required checks are failing.
The status tones live in new --status-warning tokens and three badge variants,
because the changed-lines design-system gate rejects raw palette colours.
nplez1
added a commit
that referenced
this pull request
Oct 6, 2026
A workspace card's PR glyph was painted emerald when the PR was open *or* when
checks had passed, so one colour carried two meanings and a PR with green CI
and a pending approval looked exactly like a fully mergeable one. Its tooltip
said "PR checks: Passing", which reads the same way.
The glyph now keeps reporting CI and gains a corner dot when the provider is
not letting the merge go: amber for a requirement still outstanding, rose for a
hard blocker, muted while the provider is still computing. The tooltip and
screen-reader label name the reason, and the card's hover details and the Tasks
page checks pill show the same verdict.
hosted-review-merge-readiness.ts is the one source of truth for it, mapping
state/mergeable/mergeStateStatus/reviewDecision/mergeQueueRequired onto
{readiness, marker, reason} for every provider. Readiness needs positive
evidence — GitHub returns mergeable=MERGEABLE as soon as there are no
conflicts, before it knows about approvals, so trusting that field alone would
assert a mergeability GitHub has not granted.
Checks neither raise the dot nor lower an open merge box: the glyph colour
already carries CI, and UNSTABLE means only non-required checks are failing.
The status tones live in new --status-warning tokens and three badge variants,
because the changed-lines design-system gate rejects raw palette colours.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Every workspace card shows a small icon for its pull request, and that icon turns green when CI passes. The problem is that green does not mean "this can merge". Most repos also want a human to approve, sometimes a thread resolved, sometimes the branch brought up to date. So a green PR could still be one nobody can merge, and the card gave you no hint of that.
Now the icon keeps its CI colour and grows a small dot when something other than CI is still holding the merge up. Amber means a requirement is outstanding, red means a hard blocker, grey means the provider has not worked it out yet. Hovering tells you which one in words — "PR checks: Passing · Approval required".
What Changed
Before
PR checks: Passing, which reads as "this can merge".Checks: Passingbadge and nothing about merge readiness.Passingpill in the Checks column read the same way. The Merge column beside it was already accurate.After
PR checks: Passing · Approval required, orPR checks: Passing · Ready to mergewhen it is genuinely mergeable.Mechanism
src/renderer/src/components/hosted-review-merge-readiness.ts, mapsstate/mergeable/mergeStateStatus/reviewDecision/mergeQueueRequired/ checks status to{ readiness, marker, reason }. Three surfaces consume it, so they cannot disagree.mergeStateStatus ∈ {CLEAN, UNSTABLE, HAS_HOOKS}, or a baremergeable: MERGEABLEfrom the providers that report no merge state at all. GitHub returnsMERGEABLEas soon as there are no conflicts, before it knows whether approvals or required checks are satisfied, so trusting that field alone would assert a mergeability GitHub has not granted.UNSTABLEmeans non-required checks are failing and the merge is still allowed, so it reports mergeable; only a baremergeable, which accounts for neither required checks nor approvals, is disqualified by red CI.--status-warningtoken family inmain.cssand threestatusSuccess/statusWarning/statusDangervariants inbadge.tsx. The changed-lines design-system gate rejects raw palette colours and forbids painting a shadcn primitive's status by hand, so the tone has to live in the primitive.Why
presentGitHubPRMergeState. That function answers "may I offer the merge button", not "is this mergeable": it returns a success tone forChecks passedprecisely when merge metadata is absent, anddirectMergeAvailable: truewhen GitHub reportsUNKNOWN. Reusing its tone as proof of readiness would recreate the original bug. It stays where it is, as the merge button's presentation.mergeStateStatusafter every push, and during that window even an approval-blocked PR is genuinely unknown. Leaving green dotless there would silently assert mergeable — the exact conflation this change exists to remove. A muted dot says "not decided" without crying wolf about a blocker that may not exist, and unlike amber it is not a false alarm.mergeable. Those three are the one place where a bareMERGEABLEis the whole signal, so it is trusted — but weighed against CI, because it says nothing about required checks.Linked Issue
N/A — no tracking issue, and none is possible: GitHub issues are disabled on this fork (
nplez1/orca).Visual Proof
N/A — deliberately no capture, at the author's request. Stated plainly rather than implied: this is a visible change, and nothing was rendered. The
$electronskill thatAGENTS.mdnames for rendered-UI checks is not installed in this worktree (available skills arecomputer-use,find-skills,orca-cli,orchestration), no app was launched, and no screenshot was taken.So the surface left unverified by eye is exactly this: how a 5px dot reads against a 13px glyph in light and dark mode, and whether the amber dot stays distinguishable from the amber pending-checks glyph colour at that size. Everything else about the change is asserted as markup — the existing suite already pins the glyph tones, and the new tests pin the marker's presence, data attribute and tone class for each state.
Testing
Verified on macOS on the branch as pushed:
pnpm tc— clean.pnpm lint— passes (exit 0), the whole chain: oxlint, anti-slop, code-quality native and type-aware, reliability gates, dead-classes, max-lines ratchet, ts-nocheck ratchet, runtime-electron ratchet, README links, RPC-params catalog, bundled skill guides, skill bundle manifest, and all four localization verifications.3122 passed across 369 test files in the affected areas:
components/sidebar,components/task-page,github-pr-merge-state,right-sidebar/gitlab-mr-merge-state,task-page-checks-pill, and the new module.New tests:
hosted-review-merge-readiness.test.ts(14 — the verdict table per provider, and the invariant that no input without positive provider evidence reportsmergeable),WorktreeCardMetadataStatusBadges.test.tsx(7), and 6 added toWorktreeCardStatusSlot.test.tsxcovering the marker, the named blocker, and silence when the provider reports nothing.pnpm run check:code-quality:changed— 0 new findings across 10 changed files (code quality, casting, focused plugins, type-aware, React Doctor, design system, casting-SAFETY).verify:localization-catalog,verify:localization-extraction,verify:localization-runtime-catalog,verify:localization-coverage— all pass; the 10 new keys are registered inlocales/en.jsonviasync:localization-catalog, anden-runtime-required.jsonis unchanged from the base.CI outcome: all 30 checks pass — 8/8 unit shards, static analysis, typecheck,
package,package (windows), andverify. One shard failed on the first run and passed unchanged on re-run, so it is recorded here rather than left for a reviewer to wonder about. That job reported zero test failures (1159 passed | 11 skippedfiles,10989 passed | 59 skippedtests) and failed only on an unhandled Vitest worker-teardown error —EnvironmentTeardownError: [vitest-worker]: Closing rpc while "onUserConsoleLog" was pending— attributed tosrc/main/ipc/worktrees-detected-scan-cache.test.ts. That file is main-process and imports nothing this branch touches, and the identical error appears on run35963603717(nplez1/Copilot-Issues), which does not contain this change, so it is a pre-existing teardown race rather than a defect in this diff.consolecall at all, so there is no targeted cause to correct. The only in-repo ways to silence it are suite-wide (dangerouslyIgnoreUnhandledErrors), which would mask genuine unhandled errors — not something to slip into a UI change. Flagging it as a follow-up instead.ORCA_BALANCE_UNIT_SHARDS=1), so it can change which file a worker ends on. That would make a latent race likelier to show without being caused by this diff.Not run:
pnpm build. On the full suite, be aware: it also reports failures in unrelated main-process suites, and those are not from this branch. I stashed this work and re-ran two of them (main/opencode/hook-plugin-module-contract,main/browser/browser-manager-viewport-ownership) — both fail identically on the clean base — and the failing-file count differed between two runs of identical code (4, then 24), which points at environment/flakiness rather than this diff. This branch changes only renderer presentation.No manual app run. The steps a reviewer should follow: open a workspace whose PR has green CI and a required approval outstanding — the glyph should stay emerald and grow an amber dot, and the hover tooltip should read
PR checks: Passing · Approval required. A conflicting PR should give a rose dot andConflicts. A PR with no reviews required and CI green should give no dot andReady to merge. On GitHub, immediately after pushing to the PR branch, the dot should be muted grey for a moment while the merge box is recomputed.I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Code authored with an AI coding agent (pi, model
deepseek-flash) under human direction, including the design decisions recorded in the Why section. Verification and the description above come from the same session against real gate output, not from the agent's summary of itself.Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
HostedReviewInfo, which the execution host already fetches and already publishes over the existing wire.components/ui/primitive is touched,badge.tsx, and only additively — three new variants, no existing variant altered, so no current caller changes appearance.activity-bar-buttons.tsx, whose dot sits on the Checks tab button, so it is unambiguously about checks) andparent-pr-checks-row-status.ts(the parent-PR checks row, which already routes conflicts to needs-attention). Neither presents itself as a mergeability claim, so neither was changed.Checklist
N/Awith reason — no capture taken; see Visual Proof for what that leaves unverifiedpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred) —pnpm lint,pnpm tc, the affected suites, the changed-code quality gate and all four localization verifications pass locally; CI is fully green (all 30 checks) including the fullpnpm testacross all 8 shards,static analysisand bothpackagejobs. Onlypnpm buildis unverified locally, and CI covers it.