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

Cards: a words field so the app card can Tell and the decision card can Redirect, and a test of the shell's drawing #1541

Closed opened this
Closed without merging

The card shell now has one text field. The app card can Tell and the decision card can Redirect. The new test, test/mcp.test.ts, test/asks.test.ts, test/asks-rank.test.ts, test/feed-page.test.ts and test/studio.test.ts pass, and tsc --noEmit is clean.

Notes

stopped closed without shipping deploy 25a22f3

opened this

The card shell now has one text field. The app card can Tell and the decision card can Redirect. The new test, test/mcp.test.ts, test/asks.test.ts, test/asks-rank.test.ts, test/feed-page.test.ts and test/studio.test.ts pass, and tsc --noEmit is clean. I did not get a full bun test result: it hit the tool's timeout and I ran those suites instead, so the forge's check will be the first full run.

  • Field and actions (src/web/studio/cards.ts):
    • The field appears only when a card has a words action. Tell <app> is offered for up to three apps, and Redirect for the first ask when its row has a repo and number.
    • Tell sends tell with repo, text and context.said set to the typed words.
    • Redirect sends say with repo, number and text.
    • Empty or whitespace-only words send nothing and focus the field.
  • Ask rows (src/web/studio/asks.ts): askLinesFor now carries repo as owner/name, next to number. Rows that are not about one pull or issue, such as a paused app, get no Redirect.
  • Shell test (test/card-shell.test.ts): it runs SHELL_JS, now exported, against a stub DOM and parent.
    • A tool-result message draws the card with textContent only, so markup in a label stays text.
    • A message from a source other than parent is ignored.
    • Pressing Stop posts tools/call with its args.
    • Tell and Redirect post tools/call with the typed words, and empty words post nothing.
  • Docs and an existing test: docs/MCP.md lists the new actions. I changed the existing check in test/mcp.test.ts that every card action meets its tool's required fields, because it didn't allow for the shell supplying text when a words action is pressed.

I left out a per-row Redirect (only the first ask gets one) and a Tell on apps beyond the first three. I added no dependencies.

To try it, call apps or asks from an MCP Apps host and press a button after typing in the field.

Closes #1535

commented

I added test/card-shell.test.ts to GATE in scripts/gate.ts, right after test/feed-page.test.ts. The forge's check had failed because the file was in neither GATE nor EXCLUDED. The change is pushed.

test/card-shell.test.ts passes locally (3 tests). I did not run scripts/test-shards.ts itself, the step that raised the error, so the forge's re-run of the check will confirm the fix.

The pull's substance is unchanged: the card shell has one text field. The app card can Tell and the decision card can Redirect.

🤖 Generated with Claude Code

commented

Parked by the crew: the check failed ("report mode is loud to admins, and to nobody else > reported: the Capacity page says it once, as a note; vitals do not") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs