Repository navigation
Stop clipping two-digit ordered list markers - #1759
Merged
Merged
Conversation
Ordered lists indent 20px (pl-5), but a "10." marker at text-sm is ~21px wide and paints outside the content box. Every non-expanded message body carries overflow-hidden (it also holds the 15-line clamp), and its padding box starts at the content edge, so the marker's leading digit was cut: "10." rendered as "l0.". Widen ordered lists to 28px (pl-7).
SawyerHood
added a commit
that referenced
this pull request
Aug 18, 2026
ymichael
added a commit
that referenced
this pull request
Oct 7, 2026
## Human comments ## What was wrong The shared markdown renderer reserved 20px for outside ordered-list markers. Two-digit markers exceeded the gutter and were clipped in collapsed user bubbles. The earlier fixed 28px fix in 9e102e0 (#1759) was explicitly reverted to 20px by 16ceb3a (#1765), without a regression test. A fixed wider gutter also shifts single-digit lists unnecessarily. ## What changed Count direct items in each ordered list and calculate its widest marker from its start and final number. Expose the digit count as a CSS variable and add one ch per extra digit to the existing 20px padding-inline-start. Single-digit lists keep their geometry; nested lists compute independently. User and assistant markdown use the shared renderer. Unordered lists are unchanged. Queued previews flatten lists into inline spans without markers. Add focused Ladle story cases for both message roles: 1–9, 10–12, 98–101, and nested 7–11. These expose the geometry for the story smoke and visual checks. ## How you verified - A temporary Chromium geometry check failed with the original gutter: "1280px user: marker 10. needs 20.56px, but the computed gutter is 20px". - With the fix, the geometry check passed for both user and assistant messages at 1280px and 390px: single-digit gutters remain 20px, larger gutters grow only by the extra digits, start values are preserved, and all markers fit, including independently measured nested lists. - Reviewed before/after Ladle screenshots at 1280px and 390px. Capture-only browser changes stack story labels above messages and hide unrelated rows; production message styles are unchanged. - pnpm exec turbo run typecheck lint --filter=@bb/app passed; lint reported 250 existing warnings and no errors. - The focused existing ordered-list start test passed through Turbo. - git diff --check passed. > AGENT GENERATED
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.
Ordered lists in rendered markdown indent 20px (
pl-5), but a10.marker attext-smis ~21px wide and paints outside the content box. Every message body that has not been expanded carriesoverflow-hidden(it also holds the 15-line clamp), and that box has no padding of its own, so its edge sits on the bubble content edge and cuts the marker:10.renders asl0.,11.asl1..Widen ordered lists to 28px (
pl-7). Bullet lists are unchanged — disc markers are narrow and never overflowed.Reproduction
Measured from a report screenshot: the clip sits 18.5 CSS px from the bubble border, matching
1px border + 16px padding. The1glyph loses its flag and the left half of its foot serif on the same vertical line, which is a clip rather than a font problem. Reproduced in theUserMessageMarkdownstory in its default, non-expanded state, and confirmed fixed atpl-7. Both a short list starting at 7 and the pre-existing long collapsible "Migration rollout" story hit it.The composer (
ComposerEditorSlot) uses the samepl-5but does not clip: its scroll container has 16px of padding, so the overhang has room. Verified live with rich-text editing on; left unchanged.Verification
pnpm exec turbo run typecheck --filter=@bb/app— cleanpnpm exec turbo run test --filter=@bb/app— 2807 passed