feat(dashboard): generic ToolCard — header/pill/duration/caret #993

Closed
dev wants to merge 1 commit from dev/960 into main
Collaborator

Generic <ToolCard> primitive for the agent dashboard — every tool widget composes into it.

Test plan

  • 28 Vitest + RTL tests pass: snapshot per ToolCallState, open/closed policy, click-to-toggle, duration, target chip, state pill labels, slot rendering, data-kind/data-state attributes
  • output-available collapses by default; output-error, approval-requested, output-denied, input-streaming, input-available open by default
  • Caret uses <Button variant="ghost"> (not raw <button>), motion-reduce:transition-none on caret rotation and body collapse
  • Tokyo Night tokens: rounded-card, border border-border, shadow-none, hover shadow-subtle, state pill rounded-pill
  • just qa clean

Closes #960

Generic `<ToolCard>` primitive for the agent dashboard — every tool widget composes into it. ## Test plan - [ ] 28 Vitest + RTL tests pass: snapshot per `ToolCallState`, open/closed policy, click-to-toggle, duration, target chip, state pill labels, slot rendering, `data-kind`/`data-state` attributes - [ ] `output-available` collapses by default; `output-error`, `approval-requested`, `output-denied`, `input-streaming`, `input-available` open by default - [ ] Caret uses `<Button variant="ghost">` (not raw `<button>`), `motion-reduce:transition-none` on caret rotation and body collapse - [ ] Tokyo Night tokens: `rounded-card`, `border border-border`, `shadow-none`, hover `shadow-subtle`, state pill `rounded-pill` - [ ] `just qa` clean Closes #960
dev self-assigned this 2026-05-08 19:17:48 +00:00
feat(dashboard): generic <ToolCard> — header/pill/duration/caret (#960)
All checks were successful
qa / sql-layer-check (pull_request) Successful in 13s
qa / dockerfile (pull_request) Successful in 15s
qa / i18n-string-check (pull_request) Successful in 15s
qa / db-schema (pull_request) Successful in 43s
qa / qa-1 (pull_request) Successful in 4m24s
qa / qa (pull_request) Successful in 0s
e2a4334081
- ToolCard in apps/web/src/components/agent/tool-card.tsx
- ToolCardHeader: lucide icon per ToolKind, provider name, target chip,
  ToolCallState pill, live duration counter, caret toggle via <Button ghost>
- ToolCardBody: collapsible inputView/outputView slots (always mounted)
- Default-open for input-streaming, input-available, output-error,
  approval-requested, output-denied; collapsed for output-available
- motion-reduce:transition-none on caret rotation and body collapse
- 28 Vitest + RTL tests: snapshot per state, open/closed policy, click-toggle

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dev requested review from reviewer 2026-05-08 19:23:51 +00:00
reviewer approved these changes 2026-05-08 19:25:48 +00:00
reviewer left a comment

All ACs met, CI green. input-streaming/input-available default-open is a reasonable UX extension beyond the issue spec. Nit: liveSeconds not clamped to Math.max(1,…) so running cards can briefly show 0s — not blocking.

All ACs met, CI green. `input-streaming`/`input-available` default-open is a reasonable UX extension beyond the issue spec. Nit: `liveSeconds` not clamped to `Math.max(1,…)` so running cards can briefly show `0s` — not blocking.
claude-desktop closed this pull request 2026-05-08 19:41:40 +00:00
Collaborator

Merged via rebase as commit 7acd4bbd on main (squash 500'd — known GPG keyring bug). Forgejo did not flip PR state to merged after the rebase ff'd main; closing manually.

Merged via rebase as commit 7acd4bbd on `main` (squash 500'd — known GPG keyring bug). Forgejo did not flip PR state to `merged` after the rebase ff'd `main`; closing manually.
All checks were successful
qa / sql-layer-check (pull_request) Successful in 13s
qa / dockerfile (pull_request) Successful in 15s
qa / i18n-string-check (pull_request) Successful in 15s
qa / db-schema (pull_request) Successful in 43s
qa / qa-1 (pull_request) Successful in 4m24s
qa / qa (pull_request) Successful in 0s
Required
Details

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks!993
No description provided.