Show pull requests in the Graph - #90
Merged
Merged
Conversation
GitHub records the PR in the commit that lands it ("Merge pull request #N
from owner/branch", or a squash subject ending in "(#N)"). Each row now
carries the PR that landed its tip, deleted PR branches are named from the
merge subject instead of a short hash, and labels can reserve room for a PR
chip so rows never reshuffle when PR data arrives.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Move the hovercard, its state glyphs and a reusable PrRow link row into common/PrHoverCard.tsx, and promote .pr-card / .ci-status to primitives. The card now anchors to anything with a client rect (so a canvas-drawn chip can host it) and can line up with either anchor edge. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Each branch label wears a PR chip — the switcher badge's grammar (CI rollup for open PRs, merged/closed octicon otherwise) drawn inline in the branch's own ink, with an inset chip on the accent HEAD pill. Named branches get the host's live answer, fetched only for labels on screen once the view settles (nothing at all zoomed out past the label layer); landed branches get the PR their merge or squash commit recorded, with no API call. Hovering a chip opens the shared PR card, clicking opens the PR, and the detail pane links the open branch's PRs and a landing commit's PR. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A fresh [] for remotes on each render re-ran the layout, and its report-up
effects set App state — a render loop ("Maximum update depth exceeded")
on startup with the Graph restored.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The accent HEAD pill's chip was a light inset patch — the one foreign surface left. It is now inline like every other label (divider and number in the pill's ink), and its state glyph becomes a disc in the state color with the mark knocked out, so a green check survives on the accent fill. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The canvas chip now mirrors .branch-pr precisely: the same check/cross paths and 1.7 stroke at 10px, 11px octicons, a 6px running dot and 10.5px text. On the accent HEAD pill it is the badge itself (neutral pill, ring, muted number) instead of a disc or halo; the running dot pulses like the badge's ci-pulse, animating only while one is on screen. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Drop the neutral badge pill on the accent HEAD label: like every other label, the chip is a divider plus the glyph and number, all in the pill's ink. The glyph keeps the switcher badge's exact shape, so the state still reads (check / cross / pulsing dot / octicon). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A white check and cross on the accent HEAD pill lost what makes CI glanceable: red means stop. The plain state colors sink because they're mid-luminance like the fill, so the HEAD glyph keeps its hue but is mixed toward the pill's ink — pale mint/coral on the light theme's blue, deeper green/red on the dark theme's lighter blue — derived from the theme tokens. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
danipen
marked this pull request as draft
September 22, 2026 19:58
The badge showed nothing for a draft with no checks, and the hovercard faked drafts with a gray open-PR icon. Add GitHub's git-pull-request-draft octicon: the hovercard uses it for drafts, and the badge leads with it when a draft has no CI yet (CI still wins once checks run). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
No state color sits well on the solid accent pill, so the current branch no longer is one: its label is tinted in the accent like any other label and leads with a solid cap carrying the home glyph — the same house the HEAD commit wears. PR glyphs are now identical on every branch, red and green intact. The graph chip also shows the draft octicon for a draft with no checks, matching the badge. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
danipen
marked this pull request as ready for review
September 22, 2026 20:25
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.
Pull requests now show up on the Graph's branch labels.
What you see
#123badge: an open PR leads with its CI status (✓ / ✗ / amber dot running, nothing when no checks ran), a settled PR with GitHub's merged or closed octicon. The chip is drawn inline in the branch's own color with a hairline divider, not as a gray patch, so it belongs to its label and fades with it at small zoom. On the solid-blue current-branch pill it sits in a small light inset so the glyphs keep their color.common/PrHoverCard.tsx). Click a chip to open the PR.Merge pull request #N from owner/branchwasn't recognized before, so those rows showed a short hash.How it stays cheap
Title (#N)), so landed branches get their chip straight from the loaded log. No API call or account needed, and it works offline.Also fixed
main):remotes={sync?.remotes ?? []}created a new array on every render, which re-ran the layout and its report-up effects.Tests
Unit tests for: parsing PR numbers from commit subjects, the new layout behavior (landed PRs, PR-merge naming, chip reservation), host-vs-history precedence, chip geometry and hit-testing, the on-screen label query, the chip glyph rules, and
pullRequestUrl. Checked visually in both themes at several zoom levels, with the hover card, the detail pane, and every PR/CI state (via temporarily injected data).🤖 Generated with Claude Code