Skip to content

fix(seer): Stop drawing an empty reasoning box while Seer works - #125151

Merged
ryan953 merged 1 commit into
masterfrom
seer-empty-thinking-box
Sep 22, 2026
Merged

ryan953 merged 1 commit into
masterfrom
seer-empty-thinking-box

Conversation

@ryan953

@ryan953 ryan953 commented Sep 21, 2026

Copy link
Copy Markdown
Member

While a Seer Explorer response is in flight but has reported nothing yet, the
chat drew a bordered but empty card under the Thinking... header. It is most
visible when the agent goes off to run an autofix, because that can sit for tens
of seconds with nothing to narrate — the panel reads as broken or stuck rather
than as work in progress.

Before, the whole panel was a Thinking... row with an elapsed timer and an
empty rounded box beneath it. After, it is the row on its own.

ThinkingBlock opens its content card only when it is given children, but
ResponseGroup handed it group.map(...). An array is truthy even when every
Fragment inside it renders nothing, so that guard never fired. The blocks are
now gated on hasTrace — the predicate that already decides whether any
reasoning prose, narration, or tool row will actually appear — so the header
stands alone until there is something to put under it.

Hardening ThinkingBlock instead was the other option, and it was not taken:
React cannot ask a subtree whether it rendered anything, and
React.Children.count counts the Fragments, not their output. The caller is
the only place that knows, and hasTrace already encodes it.

The block itself still renders the whole time, so the live tool title, the Seer
spinner, and the elapsed timer are unchanged.

No feature flag — this is on the existing Seer Explorer chat path.

The existing renders a ThinkingBlock placeholder before any trace content arrives test asserted only that the disclosure exists, which passed either way;
it now also asserts the content panel is absent, and that assertion fails
against master.

While a response is in flight but has reported nothing yet — most visibly when
the agent is off running an autofix — the Explorer drew a bordered but empty
card under the "Thinking..." header, which reads as a broken or stuck panel.

`ThinkingBlock` opens that card only when it is given children, but
`ResponseGroup` handed it `group.map(...)`. An array is truthy even when every
`Fragment` inside it renders nothing, so the guard never fired. The blocks are
now gated on `hasTrace`, the predicate that already decides whether any
reasoning, narration, or tool row will actually appear, so the header stands
alone until there is something to put under it.

The block itself still renders throughout, so the live title, the Seer spinner,
and the elapsed timer are unchanged.
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Sep 21, 2026
@ryan953
ryan953 requested review from a team and natemoo-re September 22, 2026 17:46
@ryan953
ryan953 marked this pull request as ready for review September 22, 2026 17:46
@ryan953
ryan953 requested a review from a team as a code owner September 22, 2026 17:46
@ryan953
ryan953 merged commit 751ef5f into master Sep 22, 2026
81 checks passed
@ryan953
ryan953 deleted the seer-empty-thinking-box branch September 22, 2026 17:49

This branch was successfully deployed

1 active deployment
Preview 775a94e4 Deployed Sep 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants