Skip to content

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

fix(chat): restore missing conversation map on chat page

Steven Enamakel8d0aac2cd822
diff --git a/app/src/features/conversations/aui/ChatConversationMap.tsx b/app/src/features/conversations/aui/ChatConversationMap.tsx
index 5dffec65b8..617c2377d6 100644
--- a/app/src/features/conversations/aui/ChatConversationMap.tsx
+++ b/app/src/features/conversations/aui/ChatConversationMap.tsx
@@ -181,11 +181,16 @@ export function ChatConversationMap({ children }: { children: ReactNode }) {
<Timeline
events={events}
visibleCount={events.length}
- onClick={(event: React.MouseEvent<HTMLDivElement>) => {
- const target = (event.target as HTMLElement).closest<HTMLElement>('[data-slot="timeline"] > div');
- const index = target
- ? Array.from(target.parentElement?.children ?? []).indexOf(target)
- : -1;
+ onClick={event => {
+ // Each event renders as one direct child of the `Timeline`
+ // root (`data-slot="timeline"`), in `events` order — there is
+ // no per-row id in the vendored markup to select on, so the
+ // clicked row's position among its siblings is the row's
+ // index into `events`.
+ const root = event.currentTarget;
+ const index = Array.from(root.children).findIndex(child =>
+ child.contains(event.target as Node)
+ );
const clicked = index >= 0 ? events[index] : undefined;
if (clicked) onTimelineClick(clicked.id);
}}