Skip to content
Merged
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
3 changes: 2 additions & 1 deletion src/renderer/components/ChatInterface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ const ChatInterface: React.FC<Props> = ({

// Auto-focus terminal when switching to this task
useEffect(() => {
if (!conversationsLoaded) return;
// Small delay to ensure terminal is mounted and attached
const timer = setTimeout(() => {
const session = terminalSessionRegistry.getSession(terminalId);
Expand All @@ -292,7 +293,7 @@ const ChatInterface: React.FC<Props> = ({
}
}, 100);
return () => clearTimeout(timer);
}, [task.id, terminalId]);
}, [task.id, terminalId, conversationsLoaded]);

// Focus terminal when this task becomes active (for already-mounted terminals)
useEffect(() => {
Expand Down