Skip to content

The agent that grows with you

fix(desktop): hand nested transcript scrolling back to the thread

brooklyn!e82fc060d0e9
diff --git a/apps/desktop/DESIGN.md b/apps/desktop/DESIGN.md
index 7f89dc47bef..a5994459e9b 100644
--- a/apps/desktop/DESIGN.md
+++ b/apps/desktop/DESIGN.md
@@ -293,6 +293,12 @@ so glass and message-bubble transparency do not reveal scrolling text.
ambiguous exit-1 results use neutral notices, with details still available.
Errors described inside returned data are not tool failures. Expanded failures
show the actual explanation; supporting output keeps its normal text color.
+- Nested transcript scrollers keep their height caps and hand vertical scrolling
+ back to the thread at either edge (`overscroll-behavior-y: auto`), even when
+ their content fits. Only the outer thread contains vertical overscroll;
+ horizontal code/output boundaries may remain contained. Thinking previews
+ follow new tokens only while near the bottom, preserving the user's reading
+ position until they scroll back down.
- Composer status groups start collapsed except todos. Progress updates and queue
pause/resume preserve the user's disclosure choice. Error banners meet the
stack's top edge without a blank padding strip. File and preview links remain
diff --git a/apps/desktop/src/components/assistant-ui/thread/changed-files-card.tsx b/apps/desktop/src/components/assistant-ui/thread/changed-files-card.tsx
index 6d3f6b8346f..d0b061c191f 100644
--- a/apps/desktop/src/components/assistant-ui/thread/changed-files-card.tsx
+++ b/apps/desktop/src/components/assistant-ui/thread/changed-files-card.tsx
@@ -55,7 +55,7 @@ export const ChangedFilesCard: FC<{ parts: readonly unknown[] }> = ({ parts }) =
{copy.reviewChanges}
</button>
</div>
- <FadeScroll className="-mx-1.5 mt-1.5 flex flex-col px-1.5" maxHeight={MAX_ROWS_HEIGHT}>
+ <FadeScroll className="-mx-1.5 mt-1.5 flex flex-col overscroll-y-auto px-1.5" maxHeight={MAX_ROWS_HEIGHT}>
{files.map(file => (
<button
className="row-hover flex shrink-0 items-center gap-2 rounded-md px-1.5 py-1 text-left"
diff --git a/apps/desktop/src/components/assistant-ui/thread/system-message.tsx b/apps/desktop/src/components/assistant-ui/thread/system-message.tsx
index e643e159cf8..941a1e411d1 100644
--- a/apps/desktop/src/components/assistant-ui/thread/system-message.tsx
+++ b/apps/desktop/src/components/assistant-ui/thread/system-message.tsx
@@ -50,9 +50,9 @@ export const BackgroundResult: FC<BackgroundResultProps> = ({ text, report, proc
</div>
{open &&
(process ? (
- <LogView className="mt-2 max-h-80 overscroll-contain">{report}</LogView>
+ <LogView className="mt-2 max-h-80 overscroll-x-contain overscroll-y-auto">{report}</LogView>
) : (
- <div className="mt-2 max-h-80 min-w-0 max-w-full overflow-auto overscroll-contain wrap-anywhere">
+ <div className="mt-2 max-h-80 min-w-0 max-w-full overflow-auto overscroll-x-contain overscroll-y-auto wrap-anywhere">
<MarkdownTextContent isRunning={false} text={report} />
</div>
))}
diff --git a/apps/desktop/src/components/chat/terminal-output.tsx b/apps/desktop/src/components/chat/terminal-output.tsx
index 6b12c5b9d21..da80be3d8f0 100644
--- a/apps/desktop/src/components/chat/terminal-output.tsx
+++ b/apps/desktop/src/components/chat/terminal-output.tsx
@@ -52,7 +52,11 @@ export function TerminalOutput({ className, text }: TerminalOutputProps) {
}, [text])
return (
- <div className={cn('max-h-16 overflow-auto overscroll-contain', className)} data-selectable-text="true" ref={ref}>
+ <div
+ className={cn('max-h-16 overflow-auto overscroll-x-contain overscroll-y-auto', className)}
+ data-selectable-text="true"
+ ref={ref}
+ >
<pre className="w-max min-w-full font-mono text-[0.5625rem] leading-[0.85rem] whitespace-pre text-muted-foreground/70">
{text}
</pre>