fix(agent-manager): fix version group splitting when sections exist (#8667)

Top-level worktrees were passing the mixed topLevelItems index to
isGroupStart/isGroupEnd which compared against sortedWorktrees — a
different array. This caused grouped worktrees sharing the same groupId
to render as separate version groups. Pass ungrouped() list and the
correct index within it instead.
This commit is contained in:
Marius
2026-04-09 15:54:11 +02:00
committed by GitHub
parent b27e628c6b
commit ebcda1b50b
@@ -2416,7 +2416,9 @@ const AgentManagerContent: Component = () => {
</SectionHeader>
)
}
return renderWt(item.wt, idx)
const ug = ungrouped()
const wtIdx = () => ug.indexOf(item.wt)
return renderWt(item.wt, wtIdx, false, ug)
}}
</For>
)