From e4cfb628feacddbec420fd7f37cf311cacaa2736 Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Thu, 18 Jun 2026 02:17:44 +0300 Subject: [PATCH] fix(diff): keep header controls and horizontal scroll within the panel when line wrap is off MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the changes/diff view, an unwrapped diff's intrinsic width leaked up the flex chain: the flex-1 column holding the scroll area lacked min-width:0, so its min-content (the widest line) stretched it — and every nested w-full element, including the .pierre-diff-wrapper (overflow-x-auto) and the file header — grew to the content width. That pushed the header's action controls past the narrow viewport and left overflow-x-auto with nothing to scroll. Add min-w-0 to the diff layout's flex items so the chain stays at viewport width: long lines now scroll horizontally inside the diff, and the file header controls stay visible. --- packages/ui/src/components/views/DiffView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ui/src/components/views/DiffView.tsx b/packages/ui/src/components/views/DiffView.tsx index e8974b19..fa1d21ac 100644 --- a/packages/ui/src/components/views/DiffView.tsx +++ b/packages/ui/src/components/views/DiffView.tsx @@ -1484,7 +1484,7 @@ export const DiffView: React.FC = ({ }; return ( -
+
{showFileSidebar && (
@@ -1498,7 +1498,7 @@ export const DiffView: React.FC = ({ />
)} -
+