Skip to content

fix(session-ui): fix current-timeline error card trigger height and tighten subagent tests - #67006

Merged
jlongster merged 2 commits into
devfrom
fix/current-timeline-error-cards
Nov 28, 2026
Merged

jlongster merged 2 commits into
devfrom
fix/current-timeline-error-cards

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Issue for this PR

Follow-up to #66918 (review findings from the same #66509 CSS block).

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

  1. Error card trigger height (message-part.css): in the current timeline, tool-error-card.css (height: 24px) tied feat(session-ui): flat execute layout and script diffs behind full_codemode #66509's rule on specificity and won by import order while keeping padding-block: 6px and margin-block: -6px, squeezing error card triggers into a 12px content box. Added an explicit height: calc(var(--line-height-compact) + 12px) rule for tool-error-card triggers inside [data-timeline-row="AssistantPart"]:not([data-timeline="next"]), matching timeline-next.css.
  2. Selector specificity (message-part.css): wrapped :has([data-component="task-tool-card"]) in :where(...) so the base trigger rule stays below the [aria-expanded="true"], [data-locked] rule instead of tying it.
  3. Lab state (research-and-agents.lab.tsx): gave each subagent in ConsecutiveSubagents a distinct child sessionID, modeled the running one as backgrounded (status: "completed" + metadata.status: "running") instead of a foreground running tool in a completed turn, and replaced the no-op full_codemode arg with subagents: "separate" | "grouped" | "hidden".
  4. Component tests (timeline-subagent-cards.spec.ts): replaced the duplicate full_codemode loop with separate and grouped subagent placements, tightened assertions to exact 36px card height and 16px block gap, and added a test for current-timeline ToolErrorCard triggers keeping their 28px click area.

How did you verify your code works?

  • bun run test:components -- --workers=2 component-tests/timeline-subagent-cards.spec.ts component-tests/session-timeline.spec.ts (13/13 passed).
  • bun run typecheck in packages/session-ui and prettier --check on touched files.
  • Before/after screenshot of current-session-research-agents--agent-research (scenario: failures) shared in Slack.

Screenshots / recordings

Before/after error-card comparison is in the Slack thread.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Requested by: @jlongster (James Long via Slack)

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed the fix works. On the base, current-timeline ToolErrorCard triggers render at 24px, and the new component test fails (Expected: 28, Received: 24). With this change they are 28px. timeline-subagent-cards.spec.ts and session-timeline.spec.ts pass (13/13), and tsc -b passes in packages/session-ui.

Public API: unchanged. Only CSS, a Storybook lab story's args and a component test changed.

No blocking concerns. One small point: the :where(...) wrapper doesn't change anything. The [aria-expanded], [data-locked] rule sets only margin-bottom and comes later in the file, so it already won the specificity tie. I checked the other rules that size these triggers, and lowering the base rule's specificity doesn't let any of them override it. So it's safe, but it isn't needed for the fix and can be dropped to keep the change minimal.

Before

After

@jlongster
jlongster merged commit 22ab061 into dev Nov 28, 2026
10 checks passed
@jlongster
jlongster deleted the fix/current-timeline-error-cards branch November 28, 2026 18:22
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