+ {state === 'ready' && index ? null :
}
{state === 'ready' && index && (() => {
const needle = query.trim().toLowerCase();
const groups = groupSections(index.sections)
@@ -176,62 +213,65 @@ const V2AgentMemory: React.FC = () => {
}))
.filter((sec) => sec.notes.length > 0),
}));
+ const firstShown = groups.find((g) => g.sections.length > 0)?.id;
+ // The frame marks one nav item as current: the one clicked, else the first with notes.
+ const current = groups.find((g) => g.id === activeGroup && g.sections.length > 0)?.id ?? firstShown;
return (
-
-