Skip to content

Humanize tool-call cards and fix empty expanders - #24

Merged
SmartAI merged 1 commit into
mainfrom
worktree/clear-meadow-246a
Jul 14, 2026
Merged

Humanize tool-call cards and fix empty expanders#24
SmartAI merged 1 commit into
mainfrom
worktree/clear-meadow-246a

Conversation

@SmartAI

@SmartAI SmartAI commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Problem

Tool-call rows in the chat showed the raw tool name (run_build123d) and, for text-only tools (load_skill, search_docs, lookup_docs, the record_* family, classify_reference), expanding the chevron revealed an empty box - the card only knew how to render code, measurements, the verify gate, or images, so a text-only result hit none of those branches.

Two asks from this:

  1. Stop surfacing the build123d implementation detail in the UI.
  2. Fix the chevron that opens onto nothing.

Change

Reworked ToolCallCard into an icon activity feed:

  • Human summaries instead of raw names. toolPresentation() builds a per-tool icon + plain-language one-liner from the call's args/details (run_build123d -> "Executing code", load_skill -> Loaded skill "gears", search_docs -> Searched docs "fillet edge"). The raw name still rides in the row's title tooltip for debugging.
  • No empty expanders. A row is collapsible only when it has a real body. Payload-less tools render as a flat row with no chevron, so nothing opens empty.
  • Doc lookups are readable. search_docs/lookup_docs now render their result text and start collapsed to keep the chat tidy.
  • CAD evidence unchanged. run_build123d and inspect_evidence keep their code / verify-gate / view-sheet bodies open by default.

Tests

  • npm run typecheck clean across all workspaces.
  • Full client suite passes; ToolCallCard.test.tsx gains cases for the friendly label + raw-name tooltip, the flat payload-less row, and doc-lookup expand-to-text.

Purely presentational (client-only); no protocol or server changes.

Tool-call rows showed the raw tool name (run_build123d) and, for
text-only tools like load_skill/search_docs/record_*, expanded into an
empty box because the card only rendered code, measurements, the verify
gate, or images.

Replace the raw name with a per-tool icon and plain-language summary
(run_build123d -> "Executing code", load_skill -> "Loaded skill X").
The raw name stays in the row's title tooltip. A row is collapsible only
when it has a real body: payload-less tools render as a flat row with no
chevron, so nothing opens empty. Doc lookups now render their result text
and start collapsed; run_build123d and inspect_evidence keep their code,
gate, and view-sheet bodies open as before.
@SmartAI
SmartAI merged commit c34c7ed into main Jul 14, 2026
1 check passed
@SmartAI
SmartAI deleted the worktree/clear-meadow-246a branch July 14, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant