Skip to content

ui-react: nine test files exercise ToolCallTimeline, which production never renders #2524

Open

Description

@schlessera

Context

packages/ui-react/src/components/chat/tool-call-timeline.tsx exports two components that render a run of tool calls:

  • ToolCallTimelineCell is what production renders. Its only importer is MessageBubble (packages/ui-react/src/components/chat/message-bubble.tsx:16, used at :425). The parent owns collapse state and passes collapsed, onExpand and onCollapse in.
  • ToolCallTimeline (tool-call-timeline.tsx:43-101) keeps its own collapse state (useState(!live)) and a prevLive effect that collapses the run when streaming ends. Nothing in src renders it. The package root does not export it either.

Nine test files exercise ToolCallTimeline:

Kind Files
Unit and render tests/render/render-smoke.test.tsx, tests/render/approval-effect.test.tsx, tests/render/copy-control.test.tsx, tests/registration-on-mount.test.tsx, tests/registration-on-mount-harness.ts
Browser tests/browser/overlay-stacking.pointer.tsx, tests/browser/policy-review.layout.tsx, tests/browser/tool-permission.layout.tsx, tests/browser/tool-renderer-boundary.layout.tsx

Their collapse, approval, copy and layout assertions pass against a component the app does not ship. A regression in ToolCallTimelineCell, or in how MessageBubble drives its collapse state, would leave all nine green.

Reproduce:

git grep -nw ToolCallTimeline -- packages ':!*CHANGELOG*' | grep -v /tests/   # only the definition
git grep -lw ToolCallTimeline -- packages/ui-react/tests | wc -l              # 9

Scope

  • Point the nine test files at what production renders: MessageBubble with an assistant message carrying tool calls, or ToolCallTimelineCell with a small parent harness that owns collapse state the way MessageBubble does.
  • Delete ToolCallTimeline, and any helper only it uses.

Out of scope

  • Changing ToolCallTimelineCell or MessageBubble behaviour or markup.
  • Changing visual baselines beyond what the change of rendered parent forces. Explain any baseline change in the PR.
  • Other test-only code in ui-react src (the sibling issue in this epic).

Acceptance criteria

  • git grep -nw ToolCallTimeline -- packages ':!*CHANGELOG*' returns nothing.
  • The collapse-after-streaming behaviour is asserted against the production component. Breaking MessageBubble's collapse wiring for tool runs makes a named test fail (mutation recorded in the PR).
  • The four browser specs listed above run against the production component and pass in the pinned offline browser image.
  • bun run test packages/ui-react passes.

Verification

bun run test packages/ui-react
bun run typecheck
bun run lint

Run the browser specs with the repository's browser runner. Use command-scoped sandbox escalation if the sandbox blocks the browser, rather than skipping it.

Contract impact

None. ToolCallTimeline is not exported from the package entry.

Found by a repository review on 2026-10-22.

Activity

  1. added
    type: test
    area: ui-react
    priority: p2
    agent-ready
    on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyarea: ui-reactpriority: p2type: test

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions