cmux-next: open GitHub pull request links in a native page
Leo, 2026-11-05:
I also wonder, like, okay, are we able to, like, specifically have, like, a fast path for opening up GitHub.com links themselves? Like, is there a sort of speed-run route? You know, a priority route for that type of link specifically? Because I just feel like, okay, why am I loading a web page every single time? Does that make sense? Does it make sense to constantly have to re-render? You know, oh, okay, I gotta go to GitHub again. I gotta look at this pull request, this issue again, this commit. But, like, couldn't we do it faster? Can we do it faster? And actually, can we potentially have, like, a better viewer than GitHub? Because it's also, like, wait, if you have these links, what if you could instead have, like, not just a better diff viewer, but a better Git thing? A better GitHub viewer. Because, well, we're still working on GitHub.
What
When you click a GitHub pull request link in an agent chat, or Open on its link card, cmux now opens a native GitHub page instead of loading github.com.
- What it shows. The PR's state, author, branches, review decision, conflicts, comment count, checks (failed first, with those also failing on the base marked) and changed files. All of it is drawn at once from
AgentReplyPullRequests, the cache the chat's link card already filled, so it uses the shared cache and adds no new GitHub reads. - One tab per workspace. The workspace's GitHub tab moves to each new link's route (
#/pull?url=). A second link is a route change in a page that is already running, not a new web page. - View diff. Opens
gh pr diffin the existing diff viewer, at a file when you click that file. The diff is read in the background as soon as the page first asks about the PR, so the click opens it at once. - Open on GitHub is always there, one click away, and opens the web page the way the card does.
- Live updates. The page asks the cache again every 60 s while it is visible, and every 1.5 s while a read is still running.
Unchanged:
- Non-GitHub links.
- Cmd-click and Shift-Cmd-click.
- Links whose routing rule sends them to another browser.
- The web view itself, which nothing removes.
- Daemons without page tabs, which open the web tab as before.
The Debug tunable links.githubNativeViewer (on by default) turns the whole thing off.
Code:
- New package
CmuxNextGitHubViewer:GitHubPageProvider,GitHubLinkand the tunable. - Page:
webviews/src/pages/github. - App glue in
Pages/WebPageTab.swift.WebPageTabgained per-tab routes, andregisterGitHub/openGitHublive there. - Bench command
github_right.
Numbers (fleet, scripts/measure/instant-new-surfaces.sh, warm arm, 10 runs per arm, one run at 4dccd049 on one Mac)
Click to content, measured in the same app run:
| p50 | p95 | max | |
|---|---|---|---|
Before: github.com PR link opened to the right (link_right, page painted) | 993 ms | 2061 ms | 2654 ms |
After: native GitHub page (github_right, page drew the PR, cache filled as a chat's link card leaves it) | 131 ms | 168 ms | 172 ms |
That is about 7.6Ć faster at p50 and 12Ć at p95. Every github_right run reported opened:true and a content mark.
On another Mac at the base (f3f1ffff), the github.com link's Chromium first paint was 472 ms at p50 and 1992 ms for the first link after launch. That run's page probe missed, and a first paint is only github.com's blank shell.
Known limits (v1, follow-ups)
- The PR diff uses the window's one chat-patch diff tab, so it replaces a chat's patch tab. It is read-only: no revert or stage.
- A route changed after the tab opened is not saved to the daemon, so a relaunch shows the PR the tab opened with.
- The tab title is "GitHub".
- No comment or review bodies yet, only counts and the review decision.
- Issues and commits are not covered yet; this PR is PR links end to end.
- iOS: a parity row is added as missing. The phone follow-up is needed.
Changelog
Added: GitHub pull request links in a chat open in a native page with the state, checks, review and changed files at once; View diff and Open on GitHub are one click.
Observed / Not run
Observed:
prepush-gate.pypasses.scripts/web-lint.shpasses.bun test src/pages/github: 7/7.- Localization catalog check passes.
- Release-notes highlight validated with
digest.py. - Independent review (subagent, opus-5.5, medium, correctness first): SHIP. Its should-fixes 2ā4 are fixed in this head (web fallback when the store is not connected, no second diff read from a cold cache, the diff read off the main thread). The rest are listed above.
- Fleet compile check of the app passes at 4dccd049.
GitHubPageProviderTests(fleet, macOS): 6/6 at 31d67323. Later commits touch only the bench.- The bench above.
Not run:
- A real click in a dogfood build.
- A Mac capture.
š¤ Generated with Claude Code
Agent session: agent session