From 4355667d96f3e93d8a89047d09880efcd6851250 Mon Sep 17 00:00:00 2001 From: amosblomqvist Date: Thu, 8 Oct 2026 19:25:47 +0300 Subject: [PATCH] =?UTF-8?q?ui:=20the=20reading=20field's=20phantom=20scrol?= =?UTF-8?q?lbar=20=E2=80=94=20the=201px=20font-box=20surplus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Empirically diagnosed via live browser measurement: Source Sans 3's font box is 22px at 16px, but lh-input's 1.25 leading gives a 20px line box - the font's content area sticks 1px below the line, Chromium counts it in scrollHeight, and the zero-padding field-sizing textarea turned it into a permanent 1px scroll: the bar showed EMPTY and at every expansion size below max-h (owner report). The composer and dock fields never showed it because their py-2 absorbs the surplus implicitly. Fix: py-0.5 on the reading field - the same absorption, line-height untouched (the caret law, typography round 2), and the max-h-40 cap still scrolls honestly past 160px of text. --- components/reading-thinking.tsx | 11 ++++++++++- tests/reading-thinking-field.test.tsx | 23 +++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 tests/reading-thinking-field.test.tsx diff --git a/components/reading-thinking.tsx b/components/reading-thinking.tsx index a2c86b5..5f9ce38 100644 --- a/components/reading-thinking.tsx +++ b/components/reading-thinking.tsx @@ -57,6 +57,15 @@ export function ReadingThinkingField({