From 6b78ad0b4942a7cff75eaa11e2b2067e6f431963 Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Mon, 15 Dec 2025 13:56:01 +0200 Subject: [PATCH] feat: optimized diff viewer element sizes layout --- packages/ui/src/components/views/PierreDiffViewer.tsx | 8 ++++++++ packages/ui/src/index.css | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/packages/ui/src/components/views/PierreDiffViewer.tsx b/packages/ui/src/components/views/PierreDiffViewer.tsx index 4f21d6bf..feb46265 100644 --- a/packages/ui/src/components/views/PierreDiffViewer.tsx +++ b/packages/ui/src/components/views/PierreDiffViewer.tsx @@ -28,6 +28,14 @@ const WEBKIT_SCROLL_FIX_CSS = ` [data-code] { -webkit-overflow-scrolling: touch; } + /* Reduce hunk separator height */ + [data-separator-content] { + height: 24px !important; + } + [data-expand-button] { + height: 24px !important; + width: 24px !important; + } `; // Fast cache key - use length + samples instead of full hash diff --git a/packages/ui/src/index.css b/packages/ui/src/index.css index 25efd3b7..d61af43c 100644 --- a/packages/ui/src/index.css +++ b/packages/ui/src/index.css @@ -718,6 +718,11 @@ html:not(.dark) .chat-scroll { --diffs-gap-block: 0; } +/* Desktop: slightly smaller diff code text */ +:root:not(.mobile-pointer) .pierre-diff-wrapper { + --diffs-font-size: 0.8125rem; +} + /* WebKit scroll rendering optimizations */ /* Note: avoid will-change and contain as they break resize behavior */ .pierre-diff-wrapper,