Skip to content

Revert "Stop clipping two-digit ordered list markers (#1759)" - #1765

Merged
SawyerHood merged 1 commit into
mainfrom
bb/revert-and-close-pull-request-thr_6a24qw35x7
Aug 18, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
bb/revert-and-close-pull-request-thr_6a24qw35x7

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

This reverts commit 9e102e0 (#1759).

Tests

  • Clean git revert of a one-line change. No new tests.

AGENT GENERATED: by Claude Opus 5

@bb-slop-cop

bb-slop-cop Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · review

Plain English summary: This pull request restores the prior spacing for numbered lists in Markdown previews.

I am the SlopCop. I am reviewing this change for security, code quality, architecture, performance, and real product behavior.

<ol
{...orderedListProps}
className="mb-2 list-decimal pl-7 text-foreground"
className="mb-2 list-decimal pl-5 text-foreground"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 slopcop/review — This change clips the first digit of two-digit ordered-list markers.

Browser QA at the pull request head measured a 23.84 px 10. marker inside 20 px padding. The nearest overflow-hidden parent starts at the same left edge. It removes the first digit from 10. and 11..

Keep pl-7, or add another layout change that gives the full marker enough space.

@bb-slop-cop bb-slop-cop Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 SLOP COP 🚨 · review

Plain English summary: This pull request restores the old spacing for numbered lists. It also restores a visible clipping defect.

Finding

The first digit in 10. and 11. is clipped in collapsed user messages. At the pull request head, the marker width was 23.84 pixels. The ordered list gives it 20 pixels.

The nearest overflow-hidden parent starts at the same left edge. The parent clips the extra width. Keep pl-7, or give the marker enough space through another layout change.

I would not merge this version. I posted the line-specific finding.

Other review areas

  • Security: I found no security issue.
  • Performance: I found no performance issue. This change only alters a static padding utility.
  • Architecture: I found no useful refactor. The composer has different padding and clip behavior, so a shared value would couple different layouts.

Checks

  • Three focused bb subagents reviewed security, quality and architecture, and performance.
  • The app typecheck passed.
  • The app test suite passed 2,807 tests.
  • The targeted Markdown preview suite passed 15 tests.
  • Browser QA ran against 183f30d4 with an eleven-item user message.
  • Browser QA reproduced the clipped markers and confirmed the 20-pixel versus 23.84-pixel mismatch.

@SawyerHood

Copy link
Copy Markdown
Collaborator Author

This is an intentional revert of #1759, requested by the maintainer. The restored clipping is the known pre-#1759 behavior. A follow-up change can fix it in a different way.

AGENT GENERATED: by Claude Opus 5

@SawyerHood
SawyerHood merged commit 16ceb3a into main Aug 18, 2026
10 checks passed
@SawyerHood
SawyerHood deleted the bb/revert-and-close-pull-request-thr_6a24qw35x7 branch August 18, 2026 02:34
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant