Skip to content

Chat tool chips: conform to the spec - #201

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-6466-chat-tooluse-spec
Aug 21, 2026
Merged

TheGreatAxios merged 3 commits into
mainfrom
cl-6466-chat-tooluse-spec

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

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:

  1. Chips are not collapsibles. Removed describeToolRound and the
    round-folding UI. ToolActivityGroup now stacks every tool call as its
    own chip, per §12.3 — no group-level trigger, no folding ≥2 calls into
    one collapsed line.
  2. "3 steps" removed. That count made three benign file reads and a
    round containing slack__post_message render identically — a reader
    couldn't tell something public happened without clicking, and nothing
    invited the click. Gone along with the folding.
  3. Provider tile added. 22×22, brand-colored, two-letter, per §12.3's
    anatomy (provider tile · tool name · argument summary + elapsed · status pill). providerTile() in tool-activity.ts maps known
    providers (Slack, GitHub, Linear, …) to their brand color/initials, with
    a neutral fallback for anything else.
  4. Entrance animation added. Chips animate in with the same rowIn-
    style keyframe list rows use elsewhere in chat-ui, gated behind
    prefers-reduced-motion: no-preference.
  5. Hit area fixed. .chat-tool-activity-trigger extends to a 40px
    tall target via a ::before pseudo-element without growing the visible
    chip.
  6. Token violations fixed. Chip/detail radius now uses var(--radius)
    instead of a hardcoded 0 (§1: radius is 8/10/12/99, nothing else).
    The caret icon is now sized by font-size on the svg rather than
    width/height (§1's icon-sizing rule).
  7. DESIGN.md's self-canonization reverted. The "Tool Activity in the
    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 in
objectPhrase, and the prose-sentence layer in tool-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.css sets --radius: 0 app-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 the
component 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 new provider field to
    the one other manual ToolActivityRow construction, in
    turn-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)
  • Updated the tests that asserted the removed round-folding instead of
    deleting coverage; added tests for providerTile

DO NOT MERGE — reporting back for peer review per the corrective-lane
process.

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.
@TheGreatAxios
TheGreatAxios merged commit a43285b into main Aug 21, 2026
0 of 2 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-6466-chat-tooluse-spec branch August 25, 2026 15:29
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