Skip to content

The agent that grows with you

fix(desktop): drop overscroll-contain on the thinking body (dead zone + broken chaining)

Kenshin651268b8a760
diff --git a/apps/desktop/src/components/assistant-ui/thread/message-parts.tsx b/apps/desktop/src/components/assistant-ui/thread/message-parts.tsx
index 694e667bdee..4c94a1e2b33 100644
--- a/apps/desktop/src/components/assistant-ui/thread/message-parts.tsx
+++ b/apps/desktop/src/components/assistant-ui/thread/message-parts.tsx
@@ -271,6 +271,7 @@ const ThinkingDisclosure: FC<{
// and inherits the disclosure-level opacity fade defined in
// styles.css (~0.67 at rest, 1 on hover/focus). overflow-auto so
// the max-h-40 preview is a real scroller, not a clip.
+ // Even a body that fits must hand vertical input to the thread.
'mt-0.5 w-full min-w-0 max-w-full overflow-auto overscroll-x-contain overscroll-y-auto wrap-anywhere pb-1',
isPreview && 'max-h-40'
)}
diff --git a/apps/desktop/src/components/assistant-ui/thread/streaming.test.tsx b/apps/desktop/src/components/assistant-ui/thread/streaming.test.tsx
index e65df81f3e5..844a334fffe 100644
--- a/apps/desktop/src/components/assistant-ui/thread/streaming.test.tsx
+++ b/apps/desktop/src/components/assistant-ui/thread/streaming.test.tsx
@@ -697,6 +697,31 @@ describe('assistant-ui streaming renderer', () => {
expect(body.scrollTop).toBe(height - body.clientHeight)
})
+ it('allows vertical handoff in both preview and expanded thinking bodies', () => {
+ const { container } = render(<RunningReasoningHarness />)
+ const ui = within(container)
+ const toggle = ui.getByRole('button', { name: /thinking/i })
+
+ const preview = container.querySelector('[data-slot="aui_thinking-body"]')?.className ?? ''
+
+ expect(preview).toContain('max-h-40')
+ expect(preview).toMatch(/\boverflow-auto\b/)
+ expect(preview).toMatch(/\boverscroll-y-auto\b/)
+
+ // Manual expansion removes the cap but must keep vertical handoff.
+ fireEvent.click(toggle)
+ expect(toggle.getAttribute('aria-expanded')).toBe('false')
+
+ fireEvent.click(toggle)
+ expect(toggle.getAttribute('aria-expanded')).toBe('true')
+
+ const expanded = container.querySelector('[data-slot="aui_thinking-body"]')?.className ?? ''
+
+ expect(expanded).toMatch(/\boverflow-auto\b/)
+ expect(expanded).not.toContain('max-h-40')
+ expect(expanded).toMatch(/\boverscroll-y-auto\b/)
+ })
+
it('does not collapse a live thinking preview when the turn settles', async () => {
const { container, settle } = renderSettlingReasoning()
const toggle = within(container).getByRole('button', { name: /thinking/i })