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 #1885

Merged opened this

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

Merged

The card shell now has one text field, so the app card can Tell and the decision card can Redirect. The branch is pushed again, but I haven't confirmed the earlier check failure is fixed.

shipped production is serving it deploy 4183511

opened this

The card shell now has one text field, so the app card can Tell and the decision card can Redirect. The branch is pushed again, but I haven't confirmed the earlier check failure is fixed.

What changed

  • Shell (src/web/studio/cards.ts): one text field, plus Tell and Redirect buttons that send the typed words through the host. Tell calls tell with repo. Redirect calls say with repo, number and text. Empty text is refused in the shell before anything is sent.
  • Ask rows (src/web/studio/asks.ts): they now carry the repo and number that Redirect needs.
  • Shell test (test/card-shell.test.ts): it runs the CARD_SHELL script against a stub DOM and parent. It checks that:

- a tool-result message draws with textContent only, so markup in a label stays text; - a message from a source other than parent is ignored; - pressing a button posts tools/call with that action's args.

  • Gate and docs: the new test is in scripts/gate.ts, test/mcp.test.ts is adjusted, and docs/MCP.md lists the new actions.

About the parked failure

  • The check failed on "report mode is loud to admins, and to nobody else > reported". This change doesn't touch the Capacity page, the vitals or any capacity code.
  • Locally, test/capacity.test.ts, test/card-shell.test.ts and test/mcp.test.ts passed on three consecutive runs, 32 tests each, and the type check is clean.
  • I couldn't find a cause for that failure, so I'm treating it as a flake. This push adds an empty commit only to make the forge re-run the check.
  • One capacity test, "an admin changes each one…", failed in my shell because the sandbox sets FORGE_CHECK_SHARDS=6, which leaks into capacityEnv. It passes with that variable unset, and I left the test alone.

Left out

  • No per-card draft persistence: the typed words clear after a send.
  • No extra actions beyond Tell and Redirect.

To try it

  • Run bun test test/card-shell.test.ts test/mcp.test.ts.
  • Or open a ui:// app or decision card in an MCP host and type words into the field.

🤖 Generated with Claude Code

Closes #1535

commented

scout only (reviewers: not for you): the check on this pull is red on "check failed: 1 of 426 tests — """; fix it on this branch and push, or say in one line why the red is not yours.

commented

scout only (reviewers: not for you): correction from the steward. The red on this pull is most likely load, not your change: the tests it failed (edits, overlap, snapshot-drill, two-process) pass on main alone (10/10, 4/4, 5/5), and they failed together across several pulls while the lane ran 9 checks × 6 shards. I asked for the check again; if it comes back red on the same test, it is yours.

commented

No code change this round: the red check isn't from this pull, and nothing new was pushed.

  • Not mine: I agree with the steward that the red is load, not this change. The failing tests named (edits, overlap, snapshot-drill, two-process) are outside what this pull touches. They are reported to pass on main alone, and they failed together across several pulls while the lane ran 9 checks × 6 shards. The check is already re-queued. If it comes back red on the same test, treat it as mine and send me the log.
  • Local run: tsc --noEmit is clean. test/mcp.test.ts, test/asks.test.ts, test/asks-rank.test.ts and test/feed-page.test.ts pass (39 pass, 0 fail). I did not run the full suite locally; the forge runs it.

What the pull does

  • The card shell has one text field.
  • The app card can Tell, and the decision card can Redirect, using that field.
  • A new test covers the shell's drawing.
  • Nothing else about cards changed.

To try it: open the feed on the preview, https://lab--1885--forge-trevato-apps.open-platform.sh. Type words in an app card and press Tell. Do the same in a decision card and press Redirect.

🤖 Generated with Claude Code

Approved

Approved. The words field is built as the tool schemas expect: tell takes repo/text/context.said (said capped at 2000, matching the field), say takes repo/number/text. Empty words post nothing and focus the field. The shell draws with textContent only, and the test would fail without the change. Redirect only shows when repo and number are valid. The shell test runs the real SHELL_JS against a fake DOM, and card-shell.test.ts is added to the gate. No new dependency. Two things I would do next: (1) After a press, show a status line such as Sent. and clear the field. Today nothing changes, so a person can press Tell twice and send twice, and a screen reader hears nothing. Also let Enter in the field press the first words action. (2) With several apps, one field serves Tell a, Tell b and Tell c, so it is unclear whom the words go to. Name the target in the placeholder or aria-label, or show one Tell per card. The field also relies on aria-label alone, so add a visible label for a phone user.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs