Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(ChatConversationMap): make container programmatically focusable

Steven Enamakel69f51f3f2130
diff --git a/app/src/features/conversations/aui/ChatConversationMap.tsx b/app/src/features/conversations/aui/ChatConversationMap.tsx
index 617c2377d6..b5ad319f7f 100644
--- a/app/src/features/conversations/aui/ChatConversationMap.tsx
+++ b/app/src/features/conversations/aui/ChatConversationMap.tsx
@@ -160,7 +160,15 @@ export function ChatConversationMap({ children }: { children: ReactNode }) {
);
return (
- <div ref={setContainerRef} className="relative flex h-full min-h-0 w-full flex-col" data-testid="chat-conversation-map">
+ <div
+ ref={setContainerRef}
+ // Programmatically focusable (not tab-reachable, `-1`) so the
+ // `Cmd`/`Ctrl+F` scope check below (`container.contains(document.activeElement)`)
+ // has a container-level focus target even when the click/focus that
+ // opened this thread landed on a descendant that later unmounts.
+ tabIndex={-1}
+ className="relative flex h-full min-h-0 w-full flex-col outline-none"
+ data-testid="chat-conversation-map">
{(searchOpen || timelineOpen) && (
<div className="absolute inset-x-0 top-2 z-20 flex justify-center px-2">
{searchOpen && (