From 764a48018fdae700bb4d08a09a6a9e18bf40e0a1 Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Tue, 16 Dec 2025 13:26:03 +0200 Subject: [PATCH] feat: enhance font styling in Diff Viewer and Streamdown components --- CHANGELOG.md | 5 +++++ packages/ui/src/components/views/PierreDiffViewer.tsx | 11 +++++++++++ packages/ui/src/index.css | 2 ++ 3 files changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75f8dab2..7475398b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file. ## [Unreleased] + +## [1.2.1] - 2025-12-16 + - Todo task tracking: collapsible status row showing AI's current task and progress +- Switched "Detailed" tool output mode to only open the 'task', 'edit', 'multiedit', 'write', 'bash' tools for better performance + ## [1.2.0] - 2025-12-15 diff --git a/packages/ui/src/components/views/PierreDiffViewer.tsx b/packages/ui/src/components/views/PierreDiffViewer.tsx index feb46265..2dff1c2f 100644 --- a/packages/ui/src/components/views/PierreDiffViewer.tsx +++ b/packages/ui/src/components/views/PierreDiffViewer.tsx @@ -19,12 +19,23 @@ interface PierreDiffViewerProps { // CSS injected into Pierre's Shadow DOM for WebKit scroll optimization // Note: avoid will-change and contain:paint as they break resize behavior const WEBKIT_SCROLL_FIX_CSS = ` + :host { + font-family: var(--font-mono); + font-size: var(--text-code); + } + :host, pre, [data-diffs], [data-code] { transform: translateZ(0); -webkit-transform: translateZ(0); -webkit-backface-visibility: hidden; backface-visibility: hidden; } + + pre, [data-code] { + font-family: var(--font-mono); + font-size: var(--text-code); + } + [data-code] { -webkit-overflow-scrolling: touch; } diff --git a/packages/ui/src/index.css b/packages/ui/src/index.css index 4678dbac..a5e238a8 100644 --- a/packages/ui/src/index.css +++ b/packages/ui/src/index.css @@ -1381,10 +1381,12 @@ html:not(.dark) .chat-scroll { .streamdown-content code, .streamdown-content pre { font-family: var(--font-mono); + font-size: var(--text-code); } /* Streamdown code blocks: ensure light/dark Shiki vars work even when Tailwind doesn't scan Streamdown's internal class names. */ .streamdown-content [data-streamdown="code-block-body"] { + font-size: var(--text-code); background-color: var(--shiki-light-bg, transparent); color: var(--shiki-light, inherit); }