fix(desktop): stop the transcript boundary from clipping the first glyph - #4904
Closed
Adarsh-Me wants to merge 1 commit into
Closed
fix(desktop): stop the transcript boundary from clipping the first glyph#4904Adarsh-Me wants to merge 1 commit into
Adarsh-Me wants to merge 1 commit into
Conversation
content-visibility: auto on [data-maka-transcript-boundary] applies paint containment, which clips descendants at the marked element's own box. The ghost assistant bubble has no horizontal padding, so that clip edge sat on the line-box origin itself: glyph ink reaching a pixel or two past the origin — italic overhang, CJK ideographs — lost its leftmost column, and the first character of each assistant line rendered partially (apache#4898). Pad the assistant boundary by one space token and pull the wider box back with a matching negative margin. The clip edge moves four pixels past the text on each side, the text keeps its exact position, and the ghost bubble paints nothing of its own, so the wider box is invisible. Card-styled boundary sites (reasoning, tool activity) already pad their content and are untouched. Measured on the partial-history Storybook fixture: the first glyph's origin sat at the clip edge with zero clearance before, 4px inside it after.
6 tasks
Contributor
|
Thanks. Closing in favor of #4906. Head CI already shows the cost. Storybook smoke failed on #4906 keeps containment and sets Reviewed with Grok. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #4898.
content-visibility: autoon[data-maka-transcript-boundary](added by d2d9f90 for #4259) applies paint containment, which clips descendants at the marked element's own box. The ghost assistant bubble carries no horizontal padding (padding: var(--space-0-5) 0 0), so the containment clip edge sat on the line-box origin itself: glyph ink reaching a pixel or two past the origin — italic overhang, CJK ideographs — lost its leftmost column, and the first character of each assistant line rendered partially.The fix keeps the containment (and with it the #4259 rendering bound) and moves the clip edge instead of the text: the assistant boundary gains
padding-inline: var(--space-1)with a matchingmargin-inline: calc(-1 * var(--space-1)). The clip boundary now sits four pixels past the text on each side; the text keeps its exact position; the ghost bubble paints nothing of its own, so the wider box is invisible. Card-styled boundary sites (reasoning, tool activity) already pad their content, so they are untouched.Verification
Measured live on the fixture the issue names (
product-shell-official-appshell--partial-history-notice, served by Storybook from this branch):AI use
Select exactly one:
Tool(s) and scope:
Checklist
biome checkclean on the changed file; CSS-only change, no TS surface touched.Does this PR entail a change in behavior?