diff --git a/src/renderer/components/thread/ChatPane/parts/items/Reasoning.tsx b/src/renderer/components/thread/ChatPane/parts/items/Reasoning.tsx index f950fd74..d9b4a7e7 100644 --- a/src/renderer/components/thread/ChatPane/parts/items/Reasoning.tsx +++ b/src/renderer/components/thread/ChatPane/parts/items/Reasoning.tsx @@ -61,9 +61,7 @@ export const Reasoning = memo(function Reasoning({ item }: ReasoningProps) { > {isStreaming ? Thinking : Thought} - {/* pr keeps italic ink past the text advance from being clipped by - `truncate`'s overflow, same as ReasoningInline's preview. */} - {preview ? {preview} : null} + {preview ? {preview} : null} diff --git a/src/renderer/components/thread/ChatPane/parts/items/ReasoningInline.tsx b/src/renderer/components/thread/ChatPane/parts/items/ReasoningInline.tsx index d618dd76..2322e0b3 100644 --- a/src/renderer/components/thread/ChatPane/parts/items/ReasoningInline.tsx +++ b/src/renderer/components/thread/ChatPane/parts/items/ReasoningInline.tsx @@ -79,10 +79,9 @@ export const ReasoningInline = memo(function ReasoningInline({ item }: Reasoning {preview ? ( <> - {/* Italic ink leans past the text advance; `truncate`'s overflow - clips at the padding box, so keep a small right padding or the - last glyph's edge is shaved off. */} - + {/* Italic-overhang padding comes from the global + `.italic.truncate` rule in styles.css. */} + {preview} diff --git a/src/renderer/styles.css b/src/renderer/styles.css index 050a4f14..578756c0 100644 --- a/src/renderer/styles.css +++ b/src/renderer/styles.css @@ -885,6 +885,16 @@ min-width: 0; } +/* Italic ink leans past the text advance on the inline-end side; `truncate`'s + hidden overflow clips at the padding box and shaves the last glyph's edge + (model-visibility sub-headers, file-editor preview tabs, reasoning previews, + agent pending messages). Keep a hair of inline-end padding wherever italic + text is or sits inside a truncate box so the overhang stays painted. */ +.italic.truncate, +.italic .truncate { + padding-inline-end: 0.2em; +} + /* HeroUI Disclosure: drop the default expand/collapse height/opacity transition and indicator rotation easing. Long chat threads can host hundreds of disclosures (one per tool_call, file_change, web_search,