From 963cbe9a5c4c71648cfb5972216aca99897397e2 Mon Sep 17 00:00:00 2001 From: Dotta Date: Tue, 9 Jun 2026 18:34:17 +0000 Subject: [PATCH] Stabilize file viewer folder transitions --- .../components/FileViewerSheet.copy.test.tsx | 12 +++++++++++ ui/src/components/FileViewerSheet.tsx | 6 +++--- .../components/WorkspaceFileBrowser.test.tsx | 21 +++++++++++++++++++ ui/src/components/WorkspaceFileBrowser.tsx | 5 ++++- 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/ui/src/components/FileViewerSheet.copy.test.tsx b/ui/src/components/FileViewerSheet.copy.test.tsx index 167a1a20de6..7aaae27a438 100644 --- a/ui/src/components/FileViewerSheet.copy.test.tsx +++ b/ui/src/components/FileViewerSheet.copy.test.tsx @@ -151,4 +151,16 @@ describe("FileViewerSheet copy actions", () => { expect(separator).not.toBeNull(); expect(separator?.getAttribute("aria-valuenow")).toBe("288"); }); + + it("keeps split panes unframed so file selection does not shift the browser", () => { + renderSheet(); + const separator = document.body.querySelector('[role="separator"][aria-label="Resize file tree"]'); + const browserPane = separator?.previousElementSibling; + const previewPane = separator?.nextElementSibling; + + expect(browserPane?.className).not.toContain("border"); + expect(browserPane?.className).not.toContain("rounded"); + expect(previewPane?.className).not.toContain("border"); + expect(previewPane?.className).not.toContain("rounded"); + }); }); diff --git a/ui/src/components/FileViewerSheet.tsx b/ui/src/components/FileViewerSheet.tsx index c50ac3c9457..33f18e2b1a6 100644 --- a/ui/src/components/FileViewerSheet.tsx +++ b/ui/src/components/FileViewerSheet.tsx @@ -743,7 +743,7 @@ export function FileViewerSheet({ {state ? (