Humanize tool-call cards and fix empty expanders - #24
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, therecord_*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:
build123dimplementation detail in the UI.Change
Reworked
ToolCallCardinto an icon activity feed: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'stitletooltip for debugging.search_docs/lookup_docsnow render their result text and start collapsed to keep the chat tidy.run_build123dandinspect_evidencekeep their code / verify-gate / view-sheet bodies open by default.Tests
npm run typecheckclean across all workspaces.ToolCallCard.test.tsxgains 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.