Repository navigation
Conversation
## 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 managed by the CI sweep. ## 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
ymichael
deleted the
bb/stop-clipping-two-digit-list-numbers-in-messages-thr_q78sze8v7c
branch
October 7, 2026 18:20
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.
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
marker 10. needs 20.56px, but the computed gutter is 20px".
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.
browser changes stack story labels above messages and hide unrelated
rows; production message styles are unchanged.
250 existing warnings and no errors.