From ebcda1b50b6bf859e1fdbdfe2f06d82bbdfe1d45 Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 9 Apr 2026 15:54:11 +0200 Subject: [PATCH] fix(agent-manager): fix version group splitting when sections exist (#8667) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .../kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx b/packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx index e8147a0abd..863eec6376 100644 --- a/packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx +++ b/packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx @@ -2416,7 +2416,9 @@ const AgentManagerContent: Component = () => { ) } - return renderWt(item.wt, idx) + const ug = ungrouped() + const wtIdx = () => ug.indexOf(item.wt) + return renderWt(item.wt, wtIdx, false, ug) }} )