Skip to content

fix(session-ui): share timeline tool headers - #46205

Open
opencode-agent[bot] wants to merge 1 commit into
v2from
shared-tool-header
Open

fix(session-ui): share timeline tool headers#46205
opencode-agent[bot] wants to merge 1 commit into
v2from
shared-tool-header

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Summary

  • Extract ToolHeader from BasicTool so ordinary timeline rows supply titles, details, arguments, paths, and actions instead of rebuilding header markup and typography.
  • Reuse it for grouped Read/Grep/Glob/List rows, Shell/Execute, Webfetch, Edit/Write, reasoning, and tool-group summaries. Existing structured tool triggers use it automatically.
  • Centralize 13px text with a 16px line height, consistent title/detail weights, and filename/directory truncation. Remove the separate Edit/Write header CSS and compact/group typography overrides.

Validation

  • Production-component browser reproduction: baseline Write is 14px / 21px; shared header is 13px / 16px. The same font assertion fails on the baseline and passes on this branch.
  • Added a deterministic production timeline story and browser coverage for typography, pending paths, light/dark narrow layouts, keyboard disclosure, and link semantics.
  • bun typecheck in packages/session-ui and packages/app.
  • Session UI unit tests: 166 passed.
  • 47 scoped browser checks verified: 46 passed in the combined run; the pending-state test passed after correcting its locator, with no production-code changes.

Visual verification

  • Before: e70d667a9fe3e84cc071a5596aa522c142c525b7; after: b530418425586cdaf2f3a7a074b9d3ebb98ab0eb.
  • Real production timeline components in Storybook with identical deterministic tool data, dark theme, 1000×1000 viewport, device scale 1, and reduced motion.
  • Both tool-group screenshots are 770×481. Intentional typography changes affect 3.194% of pixels; disclosure layout and row geometry remain unchanged.
  • Separate tests cover 390px/1000px widths in light and dark themes.

Requested by: @Hona (Hona via Slack)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant