diff --git a/static/app/views/seerExplorer/components/chat/responseGroup.spec.tsx b/static/app/views/seerExplorer/components/chat/responseGroup.spec.tsx index 81e2902782c3..c8262b904080 100644 --- a/static/app/views/seerExplorer/components/chat/responseGroup.spec.tsx +++ b/static/app/views/seerExplorer/components/chat/responseGroup.spec.tsx @@ -1,6 +1,6 @@ import {OrganizationFixture} from 'sentry-fixture/organization'; -import {render, screen, userEvent} from 'sentry-test/reactTestingLibrary'; +import {render, screen, userEvent, within} from 'sentry-test/reactTestingLibrary'; import type {Block} from 'sentry/views/seerExplorer/types'; @@ -318,6 +318,9 @@ describe('ResponseGroup', () => { ); expect(queryReasoningBox(container)).toBeInTheDocument(); + // Title only. The panel is the bordered card, so opening it around nothing draws an + // empty box under "Thinking..." for as long as the agent takes to report anything. + expect(within(reasoningBox(container)).queryByRole('group')).not.toBeInTheDocument(); }); it('gates thinking prose on the showThinking toggle but keeps tool calls', async () => { diff --git a/static/app/views/seerExplorer/components/chat/responseGroup.tsx b/static/app/views/seerExplorer/components/chat/responseGroup.tsx index fdf00e7b9cf8..49301d5506e9 100644 --- a/static/app/views/seerExplorer/components/chat/responseGroup.tsx +++ b/static/app/views/seerExplorer/components/chat/responseGroup.tsx @@ -205,7 +205,10 @@ export function ResponseGroup({ startTime={startTime} endTime={endTime} > - {active || hasTrace + {/* `hasTrace`, not `active`: an active response with nothing to show yet still + maps to a non-empty array of blocks that each render nothing, and an array is + truthy, so ThinkingBlock would open its bordered panel around no content. */} + {hasTrace ? group.map((block, i) => { const isAnswer = block === answer; // A block's own tool calls render after its thinking, so they count as