Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions src/dashboard/react-components/LogViewerPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,21 @@ export function LogViewerPanel({
return () => window.removeEventListener('keydown', handleKeyDown);
}, [isOpen, onClose]);

// Prevent body scroll when fullscreen
// Prevent body scroll when panel is open (fix mobile scroll capture)
useEffect(() => {
if (isOpen && position === 'fullscreen') {
document.body.style.overflow = 'hidden';
return () => {
document.body.style.overflow = '';
};
}
}, [isOpen, position]);
if (!isOpen) return;

const previousOverflow = document.body.style.overflow;
const previousOverscroll = document.body.style.overscrollBehavior;

document.body.style.overflow = 'hidden';
document.body.style.overscrollBehavior = 'none';

return () => {
document.body.style.overflow = previousOverflow;
document.body.style.overscrollBehavior = previousOverscroll;
};
}, [isOpen]);

if (!isOpen) return null;

Expand Down Expand Up @@ -280,7 +286,7 @@ export function LogViewerPanel({
</div>

{/* Log viewer */}
<div className="flex-1 min-h-0">
<div className="flex-1 min-h-0 overflow-hidden">
<LogViewer
agentName={agent.name}
mode="panel"
Expand Down
23 changes: 13 additions & 10 deletions src/dashboard/react-components/XTermLogViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -549,17 +549,20 @@ export function XTermLogViewer({
</div>
)}

{/* Terminal container - don't use overflow-auto here, xterm-viewport handles scrolling */}
{/* Terminal container - keep a dedicated scroll boundary for mobile */}
<div
ref={containerRef}
className="flex-1 touch-pan-y"
style={{
maxHeight,
minHeight: '200px',
overscrollBehavior: 'contain',
touchAction: 'pan-y',
}}
/>
className="flex-1 min-h-0 overflow-hidden"
style={{ maxHeight, minHeight: '200px' }}
>
<div
ref={containerRef}
className="h-full w-full touch-pan-y"
style={{
overscrollBehavior: 'contain',
touchAction: 'pan-y',
}}
/>
</div>

{/* Footer status bar */}
<div
Expand Down
Loading