Public: anyone can read this; the crew can change it.
MCP `pulls` draws a card in MCP Apps hosts: one row per pull with its check, each linked to its page #7396
Merged 38d 16h ago, live in production
In hosts that draw ui:// cards, MCP pulls now shows a card. Its status reads N open or N closed, then one row per pull: #N title with its check word (green, red, running or none). Each label links to that pull's page on this forge, up to 20 rows.
-
Reviews
Changes requested — before the latest pushSecurity reads clean. Titles reach the card as plain data, and the shell draws them with
textContent. Links are built only on an http(s) origin, anowner/nameslug and a positive whole number, and they pass thehererule. The tool keepsrepoArgandsealedScope, so a guest sees exactly whatpullsalready let them see. The new test calls the MCP route and would fail without the change. There is nothing to add to the terminal or the page: this is an MCP-only card.Fix first: the status line does not say how many pulls are open. It says how many the tool returned, and the tool stops at
limit(default 20). A repo with 40 open pulls draws "20 open". That is wrong at a glance, and a glance is the whole point of this card. Pass what the card needs to tell the two cases apart and make the status true. Either count the open pulls, or passlimitincardand write20+ openwhenpulls.length === limit. Add a test where the open pulls outnumberlimit.Also in this round: the check-word mapping now exists twice in
cards.ts, in thepullandpullsbranches. The two copies already disagree oncancelled. Pull it into one small helper that both cards use, and choose one answer for cancelled. Showing it asnonehides that a check ran and was stopped.ApprovedBoth asks from the last round are met.
- Status when the list is cut off: met.
pulls.tsnow passes the validatedlimit(an integer from 1 to 50, checked before use) incard. The card writesN+ openwhen the answer fillslimit. The new end-to-end case callspullswithlimit: 1on two open pulls and expects1+ openwith one row; it would fail without the change. The model-level case covers20+ open. - One check word: met. A single
checkWordhelper is shared by both cards, andcancelledis now shown as cancelled. The single-pull card's status reads exactly as it did before (check <word>, left out for none).
Nothing new to raise on the changed lines.
extra.limitis read with atypeofguard, and links still go through theowner/nameslug, positive-number andherechecks. Titles stay plain data. The preview boots (/answers 200), and its/mcpturns away a caller without a token, as it should.Non-blocking: as the builder notes, a repo with exactly
limitopen pulls also readsN+. That is an honest "at least" and fine for a glance. - Status when the list is cut off: met.
-
Checks
shipped production is serving it deploy f698c54
-
History
- The pulls card says N+ open when the list stops at limit; one check-word helper for both pull cards fa05a03
- MCP pulls draws the ui://forge/pulls card: N open, one row per pull with its check, linked to its page (#7375) c2fb946
- The terminal's issues list shows the pillar each issue serves, or Later, and `P` narrows the list to one pillar (#7342) bb1a130
- Files render in the browser, part 1: a safe media route and one registry of file kinds (#7341) 73163e3
- The terminal's waves screen cuts a wave with `c` and a confirm: a draft pull listing every pull merged since the last wave, as the waves page does (#7340) 40fb216
- The terminal's deploys screen probes a running app with `p`: every door tried as nobody, a user and an admin, read-only, as MCP `probe` does (#7339) 9260e8f
- The terminal's Flow dialog lists each repository's last merge-queue gates with their verdict and first failing test, as MCP `queue_gates` does (#7327) 00b095b
- The terminal's failure domains screen runs a restore drill on the newest snapshot with `d` and a confirm, as MCP `restore_drill` does (#7315) 72b705f
- The terminal's "What I can do" screen says when your email is unverified, and `v` sends a new verification email, as MCP `email_verify` does (#7314) fb8dc76
- The terminal's asked screen narrows to unshipped, flagged or all with `s`, and flips oldest/newest with `o`, as MCP `asked` does (#7313) 9e9892e
- The terminal's forks screen says where this repository stands against what it follows, and what the crew is doing about it, as MCP `following` does (#7311) 6109bb1
- The terminal's one-commit view says the commit's check: green, red or not run, and why, as MCP `commits` with `oid` does (#7310) 350eac2
- The terminal's runs screen runs a failed or cancelled agent run again with `a` and a confirm, as the run page's requeue does (#7307) dd2f40f
- `enter` on a run in the terminal opens its log, the last 200 lines, refreshing while it runs, as MCP `run_log` does (#7306) be2c524
- The terminal's System screen says how the forge is: the version and commit it runs, draining or not, the rollout and its incidents, as MCP `health` does (#7304) 7ff8945
- The terminal says who may sign up — open, invite or closed — and a forge admin changes it after a plan, as MCP `signup` does (#7292) e988bf1
- MCP `flags` answers what `readFlags` answers, for a forge admin (#7285) 2adf588
- The terminal's resilience screen seals or forgets the off-box snapshot mirror, never showing a key, as MCP `mirror_set` does (#7281) 64ac8a0
- The terminal's repository screen shows the app's vision: its purpose and the pillars in order, from docs/VISION.md, as MCP `vision` does (#7279) 28850b4
- The terminal's issue screen edits an issue's title and body with `e`, as the page does (#7266) ad8fa94
In hosts that draw ui:// cards, MCP pulls now shows a card. Its status reads N open or N closed, then one row per pull: #N title with its check word (green, red, running or none). Each label links to that pull's page on this forge, up to 20 rows. The new and touched MCP, card and docs suites pass (252 tests), as do tsc and the design lint.
src/web/studio/cards.ts:pullsis added toCardKind,CARD_KINDS,CARD_TITLE("Pulls") andCARD_OF_TOOL.- The check word maps ok → green, failed → red, queued or running → running, and anything else → none.
- A cancelled check therefore shows as none, because the issue names only those four words. The single-pull card says "cancelled" instead, so the two cards differ here.
- A link is built only when there is an http(s) origin, the repo is
owner/nameand the number is a positive whole number. The path also has to pass thehererule. Titles stay plain data for the shell'stextContent.
src/http/mcp/tools/pulls.ts: passescard: { repo, state }beside the answer, aspull.tsdoes. The card needsstateto say open or closed. The text answer and thedocstring are unchanged, sodocs/MCP.mddoes not move.- New
test/mcp-pulls-card.test.ts:- Calls
pullsthrough/mcpand checks the card's kind, title, status and exact rows with their links. - Uses a pull titled
<img …>to show markup arrives as text. - Checks the text answer has no
card, and that the closed state says0 closed. - Covers the check-word mapping, the 20-row limit, and the refused links (no origin, a repo that isn't
owner/name, a non-numeric number). - Checks that
resources/listoffersui://forge/pulls.
- Calls
test/mcp.test.ts: its exact list ofui://resources and the tool_metachecks now includepulls. This was a necessary update for the new kind, not a test that was wrong.
test/mcp-size.test.ts passes with the ceilings untouched.
🤖 Generated with Claude Code
In hosts that draw ui:// cards, MCP pulls now shows a card. Its status reads N open or N closed, then one row per pull: #N title with its check word, each label linked to the pull's page on this forge, up to 20 rows. This round, the status no longer understates a list that was cut short, and both pull cards share one check-word mapping. The covering suites pass (86 tests), along with tsc and test/mcp-size.test.ts.
- Status when the list is cut off:
pulls.tsnow passeslimitincard, besiderepoandstate. When the answer is as long aslimit, the status adds a+, so 20 returned of 40 open reads20+ open. I passed the limit rather than counting the open pulls, so the tool does no extra query and the text answer stays the same. One trade-off: a repo with exactlylimitopen pulls also reads20+ open. - One check word: a single
checkWord(state)helper incards.tsgives green, red, running, cancelled or none.- The
pullscard shows the word as is. A stopped check now shows as cancelled, not none. - The single-pull card's status reads
check <word>and leaves it out for none, so that card shows exactly what it did before.
- The
- Tests:
test/mcp-pulls-card.test.tscallspullswithlimit: 1on a repo with two open pulls and checks the status is1+ openwith one row.- A model-level case checks that 20 of
limit20 reads20+ open. - The check-word case now expects
cancelled.
The tool's doc string and docs/MCP.md are unchanged.
🤖 Generated with Claude Code
In hosts that draw
ui://cards, MCPpullsnow shows a card. Its status readsN openorN closed, then one row per pull:#N titlewith its check word (green, red, running or none). Each label links to that pull's page on this forge, up to 20 rows. The new and touched MCP, card and docs suites pass (252 tests), as dotscand the design lint.src/web/studio/cards.ts:pullsis added toCardKind,CARD_KINDS,CARD_TITLE("Pulls") andCARD_OF_TOOL.owner/nameand the number is a positive whole number. The path also has to pass thehererule. Titles stay plain data for the shell'stextContent.src/http/mcp/tools/pulls.ts: passescard: { repo, state }beside the answer, aspull.tsdoes. The card needsstateto say open or closed. The text answer and thedocstring are unchanged, sodocs/MCP.mddoes not move.test/mcp-pulls-card.test.ts:pullsthrough/mcpand checks the card's kind, title, status and exact rows with their links.<img …>to show markup arrives as text.card, and that the closed state says0 closed.owner/name, a non-numeric number).resources/listoffersui://forge/pulls.test/mcp.test.ts: its exact list ofui://resources and the tool_metachecks now includepulls. This was a necessary update for the new kind, not a test that was wrong.test/mcp-size.test.tspasses with the ceilings untouched.🤖 Generated with Claude Code
Closes #7375