fix(factory): render human-action cards from the factory tool call #767

Open
dries wants to merge 1 commit from fix/factory-tool-card into main
Owner

A denied ocman_factory call (e.g. approve_plan) only produced a card if the agent copied the returned [[ocman:card …]] marker into its reply. It often didn't, so no card appeared.

  • The tool-call row renders the card from the factory tool result (tool name must end in factory, so reads/greps that print a marker stay plain).
  • The MCP tool text no longer asks the agent to copy the marker. It says a card is waiting under the tool call and the user must handle it there. Help text, action descriptions and docs updated to match.
  • Card looks native: square corners, shared TextField/SelectField/Button, stacked labels, and it sits outside the error row so it isn't tinted red.
  • ToolCallDisplay.tsx (782 lines) split into toolRenderers.tsx, toolOutputFormat.tsx, TaskToolCard.tsx, ApprovalFootnote.tsx without behaviour change.

Tests: new test renders a denied approve_plan result as a factory tool call (plus a non-factory control). Saw it fail with the render switched off, pass with it on. MCP guidance tests updated. Checked visually on a real session.

A denied `ocman_factory` call (e.g. `approve_plan`) only produced a card if the agent copied the returned `[[ocman:card …]]` marker into its reply. It often didn't, so no card appeared. - The tool-call row renders the card from the factory tool result (tool name must end in `factory`, so reads/greps that print a marker stay plain). - The MCP tool text no longer asks the agent to copy the marker. It says a card is waiting under the tool call and the user must handle it there. Help text, action descriptions and docs updated to match. - Card looks native: square corners, shared `TextField`/`SelectField`/`Button`, stacked labels, and it sits outside the error row so it isn't tinted red. - `ToolCallDisplay.tsx` (782 lines) split into `toolRenderers.tsx`, `toolOutputFormat.tsx`, `TaskToolCard.tsx`, `ApprovalFootnote.tsx` without behaviour change. Tests: new test renders a denied `approve_plan` result as a factory tool call (plus a non-factory control). Saw it fail with the render switched off, pass with it on. MCP guidance tests updated. Checked visually on a real session.
fix(factory): render human-action cards from the factory tool call
Some checks failed
CI / Frontend (pull_request) Failing after 2m45s
CI / Playwright E2E (pull_request) Failing after 4m15s
CI / Backend (pull_request) Successful in 14m54s
CI / Semantic Tag (pull_request) Has been skipped
CI / Coverage Results (pull_request) Failing after 22s
29bc3e8a1d
A denied factory call only showed its card if the agent copied the marker
into its reply, which it often did not. The tool-call row now renders the
card from the result, and the tool text tells the agent a card is waiting
for the user instead of asking it to copy the marker.

The card uses square corners and the shared form controls, and sits
outside the error row so it is not tinted red. ToolCallDisplay.tsx is
split into smaller files to stay under 400 lines.
dries force-pushed fix/factory-tool-card from 29bc3e8a1d
Some checks failed
CI / Frontend (pull_request) Failing after 2m45s
CI / Playwright E2E (pull_request) Failing after 4m15s
CI / Backend (pull_request) Successful in 14m54s
CI / Semantic Tag (pull_request) Has been skipped
CI / Coverage Results (pull_request) Failing after 22s
to 1c32ea3805
Some checks are pending
CI / Frontend (pull_request) Successful in 14m25s
CI / Playwright E2E (pull_request) Successful in 13m6s
CI / Backend (pull_request) Successful in 17m41s
CI / Coverage Results (pull_request) Waiting to run
CI / Semantic Tag (pull_request) Waiting to run
2026-09-29 10:58:34 +02:00
Compare
Some checks are pending
CI / Frontend (pull_request) Successful in 14m25s
Required
Details
CI / Playwright E2E (pull_request) Successful in 13m6s
Required
Details
CI / Backend (pull_request) Successful in 17m41s
Required
Details
CI / Coverage Results (pull_request) Waiting to run
Required
Details
CI / Semantic Tag (pull_request) Waiting to run
Required
Details
Some required checks are missing.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/factory-tool-card:fix/factory-tool-card
git switch fix/factory-tool-card
Sign in to join this conversation.
No description provided.