Bug Description
The Insights chat panel becomes invisible after messages load. The content briefly flashes on screen, then smoothly scrolls off the top of the viewport and cannot be seen without zooming out in the Electron window.
Root Cause
Two issues in src/renderer/src/components/insights/Insights.tsx (or equivalent):
1. Missing min-h-0 overflow-hidden on inner flex column
The main content div uses flex flex-1 flex-col but is missing min-h-0 overflow-hidden. Without min-h-0, the flex item respects its default min-height: auto, allowing it to grow taller than its parent. This causes the ScrollArea inside to also grow unconstrained.
Fix: Change "flex flex-1 flex-col" → "flex flex-1 flex-col min-h-0 overflow-hidden"
2. scrollIntoView scrolls the wrong ancestor
The effect that auto-scrolls to the latest message uses:
messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
Chromium (and therefore Electron) allows programmatic scrolling of overflow: hidden elements. The <main> layout container has overflow-hidden, so scrollIntoView bubbles up past the ScrollArea viewport and scrolls <main> instead — pushing the entire Insights panel above the top of the screen.
Fix: Target the Radix UI ScrollArea viewport directly:
useEffect(() => {
const el = messagesEndRef.current;
if (el) {
const viewport = el.closest("[data-radix-scroll-area-viewport]");
if (viewport) {
viewport.scrollTo({ top: viewport.scrollHeight, behavior: "smooth" });
} else {
el.scrollIntoView({ behavior: "smooth" });
}
}
}, [session?.messages, streamingContent]);
Steps to Reproduce
- Open a project with existing Insights chat history (multiple messages)
- Navigate to the Insights view
- The messages briefly appear, then the entire panel scrolls off the top of the screen
- Only the input box at the bottom remains visible
Environment
- macOS (Electron app)
- Aperant v2.7.5
Notes
Both fixes were verified by patching the installed app.asar directly. The content stays properly visible after applying them.
Bug Description
The Insights chat panel becomes invisible after messages load. The content briefly flashes on screen, then smoothly scrolls off the top of the viewport and cannot be seen without zooming out in the Electron window.
Root Cause
Two issues in
src/renderer/src/components/insights/Insights.tsx(or equivalent):1. Missing
min-h-0 overflow-hiddenon inner flex columnThe main content div uses
flex flex-1 flex-colbut is missingmin-h-0 overflow-hidden. Withoutmin-h-0, the flex item respects its defaultmin-height: auto, allowing it to grow taller than its parent. This causes theScrollAreainside to also grow unconstrained.Fix: Change
"flex flex-1 flex-col"→"flex flex-1 flex-col min-h-0 overflow-hidden"2.
scrollIntoViewscrolls the wrong ancestorThe effect that auto-scrolls to the latest message uses:
Chromium (and therefore Electron) allows programmatic scrolling of
overflow: hiddenelements. The<main>layout container hasoverflow-hidden, soscrollIntoViewbubbles up past theScrollAreaviewport and scrolls<main>instead — pushing the entire Insights panel above the top of the screen.Fix: Target the Radix UI
ScrollAreaviewport directly:Steps to Reproduce
Environment
Notes
Both fixes were verified by patching the installed
app.asardirectly. The content stays properly visible after applying them.