Chat tool chips: conform to the spec - #201
Merged
Merged
Conversation
Tool calls should stack as one chip per call and never fold into a "3 steps" count that hides which call actually happened (CL-6466). Replaces the round-folding assertions with ones that check every call renders on its own, and adds coverage for the new provider tile.
PR #190 folded runs of tool calls into one collapsed line ("3 steps", opens only on failure) and documented that behavior as canon. The spec (mock-spec.md §12.3) says chips are not collapsibles: every call renders as its own chip, stacked under the prose, so a reader can see which call happened rather than a count of implementation objects that reads identically whether the calls were benign or public. - Remove describeToolRound and the round-folding UI; ToolActivityGroup now stacks every row as its own chip. - Add the missing provider tile (22x22, brand-colored, two-letter) from the anatomy in §12.3. - Add the chip's rowIn-style entrance animation, respecting prefers-reduced-motion. - Extend the disclosure trigger's hit area to 40px via a pseudo-element without growing the visible chip. - Fix token violations: chip/detail radius now uses the shared --radius token instead of a hardcoded 0, and the caret is sized by font-size rather than width/height.
DESIGN.md documented PR #190's round-folding as canon, contradicting the mock spec. Rewrite the section to describe the actual chip contract: stacked, un-folded chips with a provider tile, not a collapsible with a step count.
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.
Summary
PR #190 shipped tool-use chips that diverge from the authoritative mock
spec (mock-spec.md §12.3, §1) on nearly every visual dimension, and edited
DESIGN.md to document its own divergence as canon. This brings the chip
back to spec. Ref CL-6466.
Findings fixed, in order from the review:
describeToolRoundand theround-folding UI.
ToolActivityGroupnow stacks every tool call as itsown chip, per §12.3 — no group-level trigger, no folding ≥2 calls into
one collapsed line.
round containing
slack__post_messagerender identically — a readercouldn't tell something public happened without clicking, and nothing
invited the click. Gone along with the folding.
anatomy (
provider tile · tool name · argument summary + elapsed · status pill).providerTile()intool-activity.tsmaps knownproviders (Slack, GitHub, Linear, …) to their brand color/initials, with
a neutral fallback for anything else.
rowIn-style keyframe list rows use elsewhere in chat-ui, gated behind
prefers-reduced-motion: no-preference..chat-tool-activity-triggerextends to a 40pxtall target via a
::beforepseudo-element without growing the visiblechip.
var(--radius)instead of a hardcoded
0(§1: radius is 8/10/12/99, nothing else).The caret icon is now sized by
font-sizeon the svg rather thanwidth/height(§1's icon-sizing rule).Conversation" section now describes the spec's actual chip contract
instead of documenting the folding behavior as canon.
Left alone, as directed: the
endsWith("s")pluralization heuristic inobjectPhrase, and the prose-sentence layer intool-activity.ts(tense,naming, failure summaries, no-JSON guarantee) — that layer is good and is
unchanged; only presentation/grouping changed.
Note for the reviewer
apps/web/src/app.csssets--radius: 0app-wide (a pre-existing,separately-documented decision predating this PR). The chip CSS now uses
var(--radius)per §1's token rule, which is the spec-correct fix at thecomponent level, but that global override means the chip will still
render square-cornered in the live app until/unless that broader app-wide
override is revisited — out of scope for this corrective pass.
Test plan
bun run typecheck— passes (had to add the newproviderfield tothe one other manual
ToolActivityRowconstruction, inturn-activity.tsx)bunx eslint .— no new errors (chat-ui scope)bunx prettier --check .— passes (chat-ui scope)bun test— 650 pass, 0 fail (chat-ui scope)deleting coverage; added tests for
providerTileDO NOT MERGE — reporting back for peer review per the corrective-lane
process.