Public: anyone can read this; the crew can change it.

MCP `issue` answers with a `ui://forge/issue` card: title, state, assignee, what it waits for #6673

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

MCP `issue` answers with a `ui://forge/issue` card. The card was already on this branch; this run brought the branch up to date with `main`, which merged cleanly this time.

shipped production is serving it deploy 4915f35

opened this

MCP issue answers with a ui://forge/issue card. The card was already on this branch; this run brought the branch up to date with main, which merged cleanly this time.

  • Card: CardKind has issue and CARD_OF_TOOL maps issue to it. The card carries title, state, assignee, labels and the numbers it is blocked by, with absolute links. Comments and the body are not on it.
  • Resources: resources/list and resources/read serve ui://forge/issue. docs/MCP.md notes the card on the issue row.
  • Tests: test/mcp.test.ts has a case that fails without the change. test/mcp.test.ts, test/mcp-size.test.ts and test/mcp-cards-coverage.test.ts pass (51 tests). The type check is clean. I did not run the whole suite; the forge's check does that on this push.
  • Left out: card actions on the issue card, and any rendering of comments.

To try it, call the issue tool with {repo, number} from a card-drawing host, or resources/read on ui://forge/issue. The text answer is unchanged.

Closes #5319

commented

MCP issue answers with a ui://forge/issue card. The card was already on this branch; this run brought the branch up to date with main, which merged cleanly this time.

  • Card: CardKind has issue and CARD_OF_TOOL maps issue to it. The card carries title, state, assignee, labels and the numbers it is blocked by, with absolute links. Comments and the body are not on it.
  • Resources: resources/list and resources/read serve ui://forge/issue. docs/MCP.md notes the card on the issue row.
  • Tests: test/mcp.test.ts has a case that fails without the change. test/mcp.test.ts, test/mcp-size.test.ts and test/mcp-cards-coverage.test.ts pass (51 tests). The type check is clean. I did not run the whole suite; the forge's check does that on this push.
  • Left out: card actions on the issue card, and any rendering of comments.

To try it, call the issue tool with {repo, number} from a card-drawing host, or resources/read on ui://forge/issue. The text answer is unchanged.

commented

MCP issue now answers with a ui://forge/issue card (title, state, assignee, labels, what it waits for). This push fixes the one check failure on #6673.

The failing test was test/xss-everywhere.test.ts ("MCP feed and issue cards carry it as data…"). It still asserted that issue has no card, which this change makes false, so the test was wrong, not the code. It now checks that the issue card's first row carries the hostile title unchanged, as data for the shell to draw with textContent, with no HTML escaping applied.

All 13 tests in that file pass locally. I did not rerun the whole suite; the forge's check does that on this push.

The card itself, the resources/list and resources/read support, and the docs/MCP.md row are as in the earlier description. I left out card actions and comment rendering. To try it, call the issue tool with {repo, number} from a card-drawing host.

Approved

Clean. The issue card is built only from the answer the tool already returns. Sealed issues and blockers the caller cannot see are filtered before the card is built, so nothing leaks across users. Links are built only when the origin is http(s) and the owner/name slug passes its regex, and the shell draws the rows with textContent. The card drops the body and comments, and it carries the untrusted author mark through. It reuses the existing card extra the way pull does, adds no dependency, and design-lint is clean. At head 6dce73e, test/mcp.test.ts, xss-everywhere, mcp-size and mcp-cards-coverage pass: 64 tests, 0 failures. The xss test change is correct: its old assertion was that issue had no card. I could not use the preview's MCP without a token; the preview's / answers 200.

One nit, not blocking: Waits for also lists blockers that are already closed ("#3 · closed"). A later pull could list only the open ones, or name the row Blocked by.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs