fix(desktop): preserve glyphs at transcript clip edges - #4906
Conversation
Keep content-visibility paint containment for transcript boundaries while giving glyph ink a 2px overflow clip margin. This prevents Chromium from shaving flush-left assistant glyphs without changing the message box geometry. Extend the WideAssistantProse story contract to retain content visibility, the clip margin, and the existing full-width alignment. Fixes apache#4898 Generated-by: Codex
|
Thanks. This is the one to take for #4898. Head #4904 aims at the same bug with One P3: the new play asserts I am not approving yet. Someone still needs to look at Reviewed with Grok. |
…4923) The assistant answer bubble is an Astryx ghost ChatMessageBubble: no fill, no border, and the 28px --radius-chat it inherits paints nothing. #4259 made that bubble a content-visibility boundary, and paint containment clips to the rounded padding box, so the invisible corners became clip arcs. In the app's Electron 43 (Chromium 150) the arc shaves the top-left of the first glyph of the first line and the bottom-left of the last line. #4906 added overflow-clip-margin: 2px against the same symptom. That only pushes the arc out by 2px, and the pixel check that passed there ran in Playwright's headless Chromium, where the rounded clip does not reproduce. The margin makes no measurable difference once the radius is gone, so it goes. border-radius: 0 on the ghost bubble is legal under DESIGN.md's Full-Bleed Rule (width 100%, flush both sides) and changes no pixel of its own. DESIGN.md's chat rung row records the exception. The WideAssistantProse play walks from the prose to the transcript scroller and requires every clipping ancestor to be square or to pad its content past its corner radius; on main's CSS it fails naming the bubble. No migration or compatibility impact. Fixes #4898 Generated-by: Claude Code
Summary
Fix assistant text whose leading glyph pixels are clipped by transcript paint containment. Keep
content-visibility: auto, but add a 2pxoverflow-clip-marginso Chromium can paint glyph ink that extends fractionally past the flush-left boundary without changing the message box geometry.Extend
WideAssistantProseto assert that the assistant boundary keeps content visibility, receives the clip margin, and still reaches the existing full-width right edge.This is an alternative implementation to #4904. It adjusts the paint clip rather than padding and margins, so transcript layout remains unchanged.
Fixes #4898
Verification
npm --workspace @maka/desktop run smoke:storybook— passed (310 stories, 337 theme renders), includingproduct-shell-official-appshell--wide-assistant-prosenpm --workspace @maka/desktop run build-storybook— passednpm --workspace @maka/desktop run typecheck— passednpx biome check apps/desktop/src/renderer/styles/chat-message.css apps/desktop/stories/app-shell.stories.tsx— passedgit diff --check— passedpixel_diff=0); zero-margin containment removed 13 pixels within the first 1–4px of the lineAI use
Select exactly one:
Tool(s) and scope: OpenAI Codex diagnosed the paint-containment regression, implemented the CSS fix and Storybook contract, ran verification, and drafted this pull request. The commit includes the required
Generated-by: Codextrailer.Checklist
Does this PR entail a change in behavior?