From 4af1d1c8abd15881f5c06554cca8e2f6133003ee Mon Sep 17 00:00:00 2001 From: marius-kilocode Date: Tue, 4 Aug 2026 10:02:29 +0200 Subject: [PATCH] fix(vscode): keep final patch file visible --- .changeset/last-file-patch.md | 5 +++++ .../kilo-ui/src/components/message-part.tsx | 17 ++++------------ .../src/stories/tool-call-lab.stories.tsx | 20 ++++++++++++++++++- 3 files changed, 28 insertions(+), 14 deletions(-) create mode 100644 .changeset/last-file-patch.md diff --git a/.changeset/last-file-patch.md b/.changeset/last-file-patch.md new file mode 100644 index 0000000000..b9a269fa5e --- /dev/null +++ b/.changeset/last-file-patch.md @@ -0,0 +1,5 @@ +--- +"kilo-code": patch +--- + +Keep the final file visible when expanding multi-file patch results. diff --git a/packages/kilo-ui/src/components/message-part.tsx b/packages/kilo-ui/src/components/message-part.tsx index 0a61e75f6c..4281174d12 100644 --- a/packages/kilo-ui/src/components/message-part.tsx +++ b/packages/kilo-ui/src/components/message-part.tsx @@ -2799,18 +2799,9 @@ ToolRegistry.register({ > {(file) => { - const active = createMemo(() => expanded().includes(file.filePath)) - const [visible, setVisible] = createSignal(false) - createEffect(() => { - if (!active()) { - setVisible(false) - return - } - requestAnimationFrame(() => { - if (!active()) return - setVisible(true) - }) - }) + // Diff defers its own expensive render; mounting the container + // here avoids dropping the last item during batch expansion. + const active = createMemo(() => allExpanded().includes(file.filePath)) return ( @@ -2864,7 +2855,7 @@ ToolRegistry.register({ - + {(diff) => (