Skip to content

fix(Toolbar, OverflowList): a start lane's own OverflowList folds beside the end lane - #12238

Merged
cixzhang merged 29 commits into
mainfrom
fix/toolbar-overflowlist-shrink
Nov 19, 2026
Merged

cixzhang merged 29 commits into
mainfrom
fix/toolbar-overflowlist-shrink

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Approach change from 2e5995a (current head 81191dd, main merged at 9cd6c44, after #12401) — please review fresh. Earlier heads measured each list's share of its flex row's free width. Five review rounds found a new shape that share math misread each time: caller widths, calc() caps, a start-side indicator, the min-width floor, flex basis, and a text indicator. This head deletes the share math. OverflowList now owns its width contract in its own CSS, and Toolbar lays out lanes with plain CSS.

Primary intent

Fix: an OverflowList placed directly in a horizontal Toolbar's startContent folds its actions into its overflow trigger beside endContent. Before, it pushed the end content past the toolbar's edge. Fixes #8804. Supersedes #11996.

User impact

  • People using a toolbar with overflowing actions (bulk selection bars, table toolbars): on a narrow screen the end content (a Clear button, a view switch) stayed off-screen, and the actions never folded into "+N". Now the actions fold, the trigger stays whole, and the end content stays inside the toolbar. When the row widens again, the actions unfold.
  • People using any single-row OverflowList in a flex row: a list that folded never unfolded when the row widened. Now it does, whichever side it folds from and whatever its indicator is.
  • Unchanged: a toolbar whose list sits deeper in the start lane (inside a wrapper, as in the table filter template) keeps its layout, and a list with room shows every item at its items' width.
  • Visible trade-offs:
    • In a flex row, a folded list keeps the width the row gives it, up to its unfolded width, so content after it (a button) sits after that width rather than right after "+N". The button stays whole (story FollowedBySibling).
    • In a block parent nothing changes: the list fills the line, as on main.
    • In a parent narrower than a list's folded width, the list overflows the parent instead of clipping its trigger.
  • Builders: no API change. A caller's width, max-width (including calc() and min()) or flex basis still sets the list's width.

Cause

A list in a flex row was as wide as its shown content. Once it folded, its box shrank to the folded items, so it never saw the room to unfold. A Toolbar start lane also counted the list's unfolded items in its automatic minimum, so the list never got a narrower width to fold into.

Change

  • OverflowList (single row): the list publishes two sizes in its own CSS.
    • Its width, in a flex row only: its unfolded items (exact sub-pixel width in layout pixels: with no scale, from each item's rect; under a scaled ancestor, from each item's computed style through layoutSize in utils/hitArea.ts, so a scale changes nothing; plus its own padding and border), at most the row's width (max-width: 100%), when it does not observe its parent. With maxVisibleItems, the width is the items the cap allows plus the indicator. The parent's layout is read at every measurement, and the list also measures when its parent resizes, so a parent that switches between a flex row and a block is followed. In a block, grid or column parent the width stays automatic. Nothing is read before the first client measurement, so server markup is unchanged.
    • Its minimum: its fully folded width, rounded up so the trigger never clips, and never wider than the unfolded items.
    • A flex row shrinks the list toward that minimum before any sibling (its shrink factor dwarfs theirs, so a badge or button beside it keeps its whole label until the list is fully folded), the list folds against the width it gets (its own ResizeObserver), and it unfolds as room returns. A caller's width, max-width or flex basis replaces the published width by the cascade. A basis or width narrower than the folded width holds the folded width with "+N".
  • Fit: the list fits sub-pixel item widths into its sub-pixel content box. A set that fits whole reserves no indicator space; before, a start-folding list whose last item was narrower than the indicator could stay folded at its full width.
  • Toolbar: when the start lane holds an OverflowList as its own child (:has(> .astryx-overflow-list)), the lane takes the width the end lane leaves (flex: 1 1 0%, min-width: 0). This is plain CSS, with no new attribute and no measuring.
  • Removed: the row free-width share, its row observer and its gates.
  • Scale read: utils/hitArea.ts now exports two helpers, and useOverflow calls both: its existing screenScale, with a tolerance parameter, decides whether the list is scaled, and the new layoutSize (which screenScale also uses) gives an element's untransformed border-box size (architecture:react-component-runtime INV16: extend the shared owner). Hit areas keep their tolerance, a one-pixel shortcut and a thousandth of a ratio; hit-area browser specs pass 26/26. The list passes no pixel shortcut and a relative tolerance of six millionths, inside the computed width's six significant digits, so a scale however close to 1 counts while a wide unscaled list settles. hitArea.ts stays internal (not re-exported from utils).
  • With main's two-lane wrap: main gives a two-lane toolbar's end lane flex-grow: 1 and its start lane flex-wrap: wrap. A two-lane start lane takes one merged style: main's flex-wrap: wrap and min-width: fit-content by default, and only when it holds an OverflowList (:has()), nowrap, min-width: 0, a 0% basis and flex-grow: 1000000, so the end lane keeps its content width and the list folds instead of moving to a line of its own. Two-lane rows without a list keep main's wrap and width exactly.
  • Gap the browser draws: since [Component Audit] OverflowList: items and the overflow indicator are no longer cut off in themes with a different spacing scale #12401, the fold reads the gap a list renders (its measurement copy's computed column-gap). The width a single row publishes for itself now sums its items with that same drawn gap, not the fixed gap table. In a theme whose gap step draws wider (matcha and y2k draw step 2 at 12 px, where the table says 8 px), the old sum was narrower than the items, so a list with room folded one away.
  • Widths under a scale: a scaled rect is rounded on screen, so a width divided by the scale could come out a layout unit short (1/64 px in Chromium, 1/60 px in Firefox). The list then published a width a unit narrower than its items, and an item shrank below its text. Under a scale, an item's width now comes from its computed style, through a new layoutSize helper in hitArea.ts that screenScale also uses. Half of the serialized width's last digit is added back, so the sum is never short. With no scale, widths still come from the rect.
  • No new public prop or data attribute. useOverflow's public return is unchanged.

Limit

Below the folded start lane's width, the Toolbar's start lane still overlaps the end lane instead of wrapping. The lane gives up its automatic minimum so the list, whose own width is its unfolded width, can shrink. That is recorded as an FR2 gap. The lanes stay apart across the spec's tested range (down to 160 px), and the 320 px no-overlap test guards the supported range.

Authority

  • Toolbar FR2 (no lane clips or overlaps another; the row wraps only when the lanes don't fit at their minimums): a shipped defect, fixed for a start lane's own OverflowList. Toolbar's verification table names this PR's browser spec, and its current-state impact keeps the one FR2 gap above.
  • OverflowList FR2 (shows the items that fit the measured width) is restored for widening.
  • OverflowList FR4 now states the single row's width in a flex row only (its unfolded width at most its parent's, replaced by a caller's width, max-width or flex basis) and its minimum (replaced by a caller's min-width).
  • The Specification session ruled this shape records-decided, with no API change. It confirmed the flex-row trade-off is within FR2 and FR4, and asked that the width apply in a flex row only, so block parents keep their box.

Evidence

Real Chromium and Firefox (Playwright 1.61.1), ToolbarOverflowList.interaction.browser.spec.ts. The main arm is main 484f7af with this branch's stories and spec copied in.

Test main this PR
folds beside the end lane at 380 px, trigger whole (#8804) fails passes
lanes apart at 320 px fails passes
every action, no trigger, when the row has room passes passes
unfolds again when the row widens after a fold fails passes
width where the lanes first meet (down to 160 px) fails never
nested list keeps its lane at content width passes passes
table filter template shows every clause at 1280 px; lanes never meet passes passes
content-sized parent and a one-item list keep their items' width (42.7 px) passes passes
two lists in one row settle without clipping or flicker (380, 530, 900 px) passes passes
two lists in one row both fold into their own triggers at 380 px fails passes
a list in a 30 px parent keeps its indicator whole (41 px floor) fails passes
with room, the floor is no wider than the unfolded items passes passes
width: 200px and max-width: 200px lists fold within 200 px passes passes
fold holds across 10 frames at the edge (565 px; two lists at 597 and 901 px) passes passes
a start-folding list, a minVisibleItems={1} list and a plain-text indicator unfold when a narrow row widens to 900 px fails passes
a calc(25% + 30px) cap holds one fold across 12 frames passes passes
a flex: 0 0 30px list and a width: 30px list hold "+6" across 10 frames passes passes
folds before the content beside it in the start lane truncates ("5 selected" whole at 380 px) passes passes (failed at 103a5f9: "5 s…")
a list followed by a button: the button's label stays whole after the list at 900, 300 and 900 px (it sits at the row's end when the list folds) fails passes (label cut at 103a5f9)
a list in a block parent fills the line passes passes
under scale(0.5), a list at exactly its own width keeps all six items across ten fractional widths passes passes
a list that measures inside a box at scale(0.9) keeps all six items during and after the scale ends passes passes
a list that measures at scale(0.9995), the last frame of a scale-in, publishes its unscaled width and keeps all six (story absent) passes (0.20 px short in Chromium, 0.23 in Firefox, at 3d01853)
a list wider than 1000 px holds its width and attributes still across twelve fractional widths (story absent) passes (re-measured every frame at several widths in Chromium at a678570)
under scale(0.5) and scale(0.9), across 21 letter-spacings each, no item is narrower than its text and all six stay (row absent) passes (items 1/64–1/60 px short at many steps at 76274d5, in Chromium and Firefox: the farm's Firefox "Sa…" and "Duplic…" cut, and the folded "Delete" after a scale-in from 0.9)
in matcha (gap step 2 drawn at 12 px), a list with room shows all six items, none narrower than its text, at a width that holds its drawn gaps (story absent) passes (five items with the table gap)
the overflow-actions toolbar at 1280 px in Y2K and matcha and at 390 px in neutral keeps the badge and the list on one line, the end lane at its content width, and every action at 1280 px (row absent) passes (at 30e81e8 the lanes split the row: the badge sat above the actions, and Y2K folded Delete with room)
a two-lane start lane without a list keeps main's min-width: fit-content, flex-wrap: wrap and no grow (row absent) passes (min-width: auto at 2f6de0f)
a list capped at three items is as wide as those items and its trigger (row absent) passes (155 px blank after "+3" at 89f9b52)
under an ancestor scaled to 0.5, a list with room shows all six items, and one in a 30 px parent keeps "+6" whole, label included fails (lone "+") passes (folded with room, half-width floor at 89f9b52)
a list whose parent flips between a flex row (900 px) and a block (700 px) follows it both ways (not run) passes
  • Local runs at head 81191dd (main 9cd6c44 merged): the spec passes 36/36 in Chromium phone, Firefox phone and Firefox desktop DPR 2 (42/42 with ToolbarTextSize in Chromium); the 900 px, widen and wide-theme cases also fail if a "+N" trigger shows. Toolbar and OverflowList a11y (including main's two-lane wrap spec) pass 20/20, hit-area browser specs 26/26, units 3564/3564; check:knowledge is clean.
  • Local runs at head d1826cc: the spec passes 33/33 in Chromium and Firefox, on the phone profile and on a 1400×900 desktop at DPR 2 (39/39 with ToolbarTextSize in Chromium). Hit-area browser specs pass 26/26, and units pass 3554/3554. The new scaled-sweep case fails at 76274d5 in all four profiles.
  • Local runs at head 37fdd5c: Chromium 28/28 plus ToolbarTextSize 6/6, and Firefox 28/28. The two new cases fail at 89f9b52 in both engines. At 531b267 (test only) the scaled-row case also checks the trigger's label renders whole; it fails on main (lone "+") and passes here in both engines. At 76274d5 the spec passes 32/32 in Chromium and Firefox, and the hit-area browser specs pass 26/26. The two new scale cases (exact width across fractions; scale-in from 0.9) pass at 531b267 too in this rig: a forty-step sweep of fractional item widths never folded the 700 px row at 531b267 in either engine, so they guard the exact-ratio read rather than reproduce the reported fold.
  • Units: OverflowList, Toolbar, hooks (including a new computeOverflow case that fails on main), Breadcrumbs, TabList and Tokenizer pass 1710/1710. Toolbar a11y (Chromium) passes 13/13.
  • Prior evidence: vjeux's farm turned round 4 into a real red/green. The previous head 7b99232 reproduced both the stuck widen-after-fold list and the flickering calc() cap (0/5), and 87637c6 fixed both (5/5), in Chromium and Firefox. Both cases are kept here as regression tests.
  • Stills: below. The previous head 103a5f9 still cut "5 selected" and "After" in the farm control frames.

Stills (real Chromium and Firefox, main 2ff1afc vs head 89f9b52, from vjeux's farm):

Case main head
Chromium: #8804 overflow actions at 380 px, LTR main-2ff1afc9f8 head-89f9b524ba
Chromium: #8804 at 380 px, RTL main-2ff1afc9f8 head-89f9b524ba
Chromium: two lists at 380 px main-2ff1afc9f8 head-89f9b524ba
Chromium: a list followed by a button at 300 px main-2ff1afc9f8-step2-300px head-89f9b524ba-step2-300px
Chromium: caller-limited widths main-2ff1afc9f8 head-89f9b524ba
Firefox: #8804 overflow actions at 380 px, LTR main-2ff1afc9f8 head-89f9b524ba
Firefox: #8804 at 380 px, RTL main-2ff1afc9f8 head-89f9b524ba
Firefox: two lists at 380 px main-2ff1afc9f8 head-89f9b524ba
Firefox: a list followed by a button at 300 px main-2ff1afc9f8-step2-300px head-89f9b524ba-step2-300px
Firefox: caller-limited widths main-2ff1afc9f8 head-89f9b524ba

Scaled and capped rows (main 2ff1afc vs head 37fdd5c, from vjeux's farm; labels):

Case main head
Chromium: scaled to 0.5 (wide row; 30 px row) main head
Chromium: maxVisibleItems={3} in a 700 px row (outlined) main head
Firefox: scaled to 0.5 (wide row; 30 px row) main head
Firefox: maxVisibleItems={3} in a 700 px row (outlined) main head
  • Two lists at 380 and 530 px each keep the share of the row they are given ("Save +5 · Save +5 · Clear", all whole), the same reading as the followed-by-sibling story.

Writing rubric results

  • R1 narration: the added record sentences state the system in the present tense. Toolbar adds one current-state gap bullet and one FR2 verification row. OverflowList FR4 adds a single row's minimum inline width and, in a flex row only, its width and shrink priority, with caller overrides. The compatibility lines and PR1 name the published sizes and the parent observation.
  • R2 research: none.
  • R3 evidence: none in the records beyond verification rows.
  • R4 rejected alternatives: none.
  • R5 change references: none.
  • R6 open questions: none.
  • R7 project status: none.
  • Sentence length: one topic each. The longest added sentence is FR4's minimum inline width at 31 words; the flex-row width and the Toolbar gap are split into sentences of 23 words or fewer.

Credit

Thanks to @quocluongg, whose #11996 found the cause and whose tests and stories this builds on (co-authored). This PR carries the fix from main, without the shared styling module #11996 added, and narrows the lane rule to a list that is the lane's own child.

Owner and land path

  • Owner: Astryx maintainers, fix-loop lane 1.
  • Land path: code review, CI, merge.

Overlap checked: #11996 (superseded: this carries its fix from main without the shared styling module it added, so its approved head stays untouched; reviewers close #11996 in favor of this PR)

cixzhang and others added 3 commits November 16, 2026 19:49
…ide the end lane

A horizontal two-slot Toolbar sized its start lane from its content, and
its automatic minimum counted an OverflowList's unfolded items. The list
then never saw a narrower width, so it never folded, and the end lane was
pushed past the toolbar's edge.

When the start lane holds an OverflowList as its own child
(:has(> .astryx-overflow-list)), it takes the width the end lane leaves
(flex 1 1 0%) and drops its automatic minimum, so the list folds to fit.
A lane whose list sits deeper, such as the table filter template's, keeps
its layout. A single-row OverflowList publishes a minimum width of its
folded set, measured from sub-pixel widths and rounded up, and never wider
than its items, so a squeezed row keeps its trigger whole and a list with
room is unchanged.

Fixes #8804. Supersedes #11996.

Co-authored-by: quocluongg <[email protected]>
In a single flex row a folded list is as wide as its folded items, so its
own width never showed room returning, and it stayed folded after the row
widened. A single-row list in such a row now adds the row's free width
(the row's content width less its in-flow children and gaps) to its own,
and also observes the row, so a widening row lets it unfold.

The browser spec measures lanes from their own children, takes the frame's
edge as the limit (edge compensation reaches into the toolbar's padding),
handles a toolbar with one lane, and adds a widen-after-fold case.

Co-authored-by: quocluongg <[email protected]>
A start-only toolbar's lane is flex 1 1 0% on main too, so the spec now
checks the template's clauses, all shown at desktop width, instead of the
lane's basis.

Co-authored-by: quocluongg <[email protected]>
@cixzhang cixzhang added the lane:1 Astryx fix-loop lane 1 owns this label Nov 17, 2026
@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 19, 2026 7:34am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 17, 2026
@astracat-bot

astracat-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 19, 2026, 8:59 AM UTC

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 9466a54

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 81191dd

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
OverflowList · Storybook 12.6 kB (+1.4 kB) · 3.7 kB CSS (+56 B) 262 (+22) ✓ · ✓ · ✓
Tokenizer 107.2 kB (+869 B) · 20.5 kB CSS (+27 B) — — · — · —
PowerSearch 311.9 kB (+859 B) · 25.8 kB CSS (+27 B) — — · — · —
96 more components
Component Size LoC Visual · A11y · RTL
TableSelectionToolbar 77.2 kB (+115 B) · 14.3 kB CSS (+64 B) — — · — · —
Toolbar · Storybook 47.6 kB (+65 B) · 8.3 kB CSS (+72 B) 360 (+15) ✓ · ✓ · —
AlertDialog 130.3 kB (+83 B) · 15.6 kB CSS (0) — — · — · —
TopNavHeading 83.8 kB (+66 B) · 12.1 kB CSS (0) — — · — · —
TopNavMenu 83.3 kB (+64 B) · 12.1 kB CSS (0) — — · — · —
TopNavMegaMenu 78.0 kB (+62 B) · 12.7 kB CSS (0) — — · — · —
SideNavHeading 84.2 kB (+61 B) · 12.2 kB CSS (0) — — · — · —
TableHeaderCell 104.8 kB (+61 B) · 19.3 kB CSS (0) — — · — · —
TableCell 105.0 kB (+60 B) · 19.5 kB CSS (0) — — · — · —
IconButton 66.7 kB (+59 B) · 10.8 kB CSS (0) — — · — · —
SegmentedControlItem 19.0 kB (+59 B) · 4.3 kB CSS (0) — — · — · —
Thumbnail 71.2 kB (+59 B) · 12.4 kB CSS (0) — — · — · —
ButtonGroup 44.5 kB (+58 B) · 3.7 kB CSS (0) — — · — · —
DateRangeInput 101.3 kB (+57 B) · 13.4 kB CSS (0) — — · — · —
Banner 68.8 kB (+56 B) · 11.4 kB CSS (0) — — · — · —
ChatSendButton 67.1 kB (+56 B) · 10.9 kB CSS (0) — — · — · —
DrawerHeader 70.0 kB (+56 B) · 14.0 kB CSS (0) — — · — · —
ToggleButtonGroup 41.7 kB (+56 B) · 3.7 kB CSS (0) — — · — · —
Toast 106.3 kB (+55 B) · 11.1 kB CSS (0) — — · — · —
Calendar 77.9 kB (+54 B) · 11.5 kB CSS (0) — — · — · —
ChatComposerInput 83.9 kB (+54 B) · 12.2 kB CSS (0) — — · — · —
ChatComposerTokenElement 83.9 kB (+54 B) · 12.2 kB CSS (0) — — · — · —
Carousel 76.8 kB (+53 B) · 11.8 kB CSS (0) — — · — · —
DialogHeader 69.8 kB (+53 B) · 12.5 kB CSS (0) — — · — · —
InputGroup 61.7 kB (+53 B) · 7.9 kB CSS (0) — — · — · —
MobileNavToggle 67.0 kB (+51 B) · 10.8 kB CSS (0) — — · — · —
BreadcrumbItem 98.4 kB (+49 B) · 13.4 kB CSS (0) — — · — · —
ChatDictationButton 67.3 kB (+49 B) · 10.9 kB CSS (0) — — · — · —
Markdown 205.7 kB (+49 B) · 22.4 kB CSS (0) — — · — · —
Popover 100.7 kB (+49 B) · 15.2 kB CSS (0) — — · — · —
Stepper 68.5 kB (+49 B) · 11.0 kB CSS (0) — — · — · —
BaseTypeahead 80.0 kB (+48 B) · 11.8 kB CSS (0) — — · — · —
Button 66.7 kB (+48 B) · 10.8 kB CSS (0) — — · — · —
MobileNav 78.1 kB (+48 B) · 11.5 kB CSS (0) — — · — · —
SideNavCollapseButton 67.6 kB (+48 B) · 10.9 kB CSS (0) — — · — · —
TextArea 93.0 kB (+47 B) · 9.4 kB CSS (0) — — · — · —
ToggleButton 94.1 kB (+47 B) · 11.0 kB CSS (0) — — · — · —
DropdownMenu 109.2 kB (+46 B) · 19.1 kB CSS (0) — — · — · —
Field 60.1 kB (+46 B) · 7.3 kB CSS (0) — — · — · —
Lightbox 150.3 kB (+46 B) · 12.0 kB CSS (0) — — · — · —
MultiSelector 103.9 kB (+46 B) · 18.1 kB CSS (0) — — · — · —
RadioListItem 76.8 kB (+46 B) · 10.8 kB CSS (0) — — · — · —
Switch 110.2 kB (+46 B) · 10.1 kB CSS (0) — — · — · —
FileInput 75.7 kB (+45 B) · 11.8 kB CSS (0) — — · — · —
MoreMenu 109.5 kB (+45 B) · 19.1 kB CSS (0) — — · — · —
Pagination 148.1 kB (+45 B) · 19.3 kB CSS (0) — — · — · —
CodeBlock 82.2 kB (+44 B) · 12.2 kB CSS (0) — — · — · —
RadioList 61.4 kB (+44 B) · 7.4 kB CSS (0) — — · — · —
Selector 115.2 kB (+44 B) · 18.9 kB CSS (0) — — · — · —
Typeahead 89.6 kB (+44 B) · 13.5 kB CSS (0) — — · — · —
ChatLayout 90.4 kB (+43 B) · 11.4 kB CSS (0) — — · — · —
ChatLayoutScrollButton 67.3 kB (+43 B) · 11.0 kB CSS (0) — — · — · —
CheckboxListItem 80.9 kB (+43 B) · 12.2 kB CSS (0) — — · — · —
ContextMenu 103.8 kB (+43 B) · 19.0 kB CSS (0) — — · — · —
Slider 115.4 kB (+43 B) · 8.9 kB CSS (0) — — · — · —
SideNavItem 78.6 kB (+42 B) · 12.0 kB CSS (0) — — · — · —
Table 122.0 kB (+41 B) · 20.1 kB CSS (0) — — · — · —
TopNav 79.8 kB (+40 B) · 11.8 kB CSS (0) — — · — · —
ChatComposer 86.3 kB (+39 B) · 13.0 kB CSS (0) — — · — · —
InfoTip 51.0 kB (+39 B) · 5.4 kB CSS (0) — — · — · —
CheckboxList 73.8 kB (+38 B) · 7.8 kB CSS (0) — — · — · —
ComplexSelector 79.2 kB (+38 B) · 12.7 kB CSS (0) — — · — · —
NumberInput 104.5 kB (+38 B) · 12.3 kB CSS (0) — — · — · —
TabMenu 80.5 kB (+38 B) · 12.0 kB CSS (0) — — · — · —
CheckboxInput 70.1 kB (+37 B) · 10.3 kB CSS (0) — — · — · —
DateTimeInput 227.2 kB (+37 B) · 19.8 kB CSS (0) — — · — · —
ListItem 80.1 kB (+37 B) · 12.2 kB CSS (0) — — · — · —
DateInput 203.7 kB (+35 B) · 18.1 kB CSS (0) — — · — · —
TextInput 99.4 kB (+35 B) · 12.0 kB CSS (0) — — · — · —
AppShell 99.6 kB (+34 B) · 14.6 kB CSS (0) — — · — · —
FieldLabel 56.0 kB (+33 B) · 5.8 kB CSS (0) — — · — · —
TimeInput 178.4 kB (+31 B) · 17.0 kB CSS (0) — — · — · —
SideNav 122.9 kB (+21 B) · 12.2 kB CSS (0) — — · — · —
Timestamp 30.8 kB (0) · 11.1 kB CSS (0) — — · — · —
SegmentedControl 102.6 kB (−1 B) · 7.0 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 123.1 kB (new) · 773 B CSS (new) — — · — · —
lab/ChatReactionBar 124.3 kB (new) · 1.1 kB CSS (new) — — · — · —
lab/CommentComposer 181.0 kB (new) · 1.9 kB CSS (new) — — · — · —
lab/Comments 381.0 kB (new) · 2.5 kB CSS (new) — — · — · —
lab/CommentThread 374.0 kB (new) · 2.4 kB CSS (new) — — · — · —
lab/DialogHeroHeader 91.0 kB (new) · 372 B CSS (new) — — · — · —
lab/DiffViewer 94.9 kB (new) · 2.1 kB CSS (new) — — · — · —
lab/EmojiPicker 119.1 kB (new) · 751 B CSS (new) — — · — · —
lab/ListInput 95.7 kB (new) · 922 B CSS (new) — — · — · —
lab/PageControl 78.5 kB (new) · 709 B CSS (new) — — · — · —
lab/Schedule 116.5 kB (new) · 3.9 kB CSS (new) — — · — · —
lab/SelectableCardGroup 69.6 kB (new) · 162 B CSS (new) — — · — · —
lab/TabBar 84.2 kB (new) · 1.8 kB CSS (new) — — · — · —
lab/TabBarItem 3.9 kB (new) · 1.8 kB CSS (new) — — · — · —
lab/TabBarMoreList 102.9 kB (new) · 1.8 kB CSS (new) — — · — · —
lab/TourStep 95.5 kB (new) · 691 B CSS (new) — — · — · —
lab/TransferList 137.0 kB (new) · 1.2 kB CSS (new) — — · — · —
lab/TransferListSelector 145.9 kB (new) · 1.4 kB CSS (new) — — · — · —
richtext/RichTextEditor 308.6 kB (new) · 2.7 kB CSS (new) — — · — · —
richtext/RichTextEditorToolbar 309.9 kB (new) · 454 B CSS (new) — — · — · —
richtext/RichTextView 285.9 kB (new) · 2.4 kB CSS (new) — — · — · —

Package size: measured; main has no measurement of the merge base to compare yet.

API changes: unknown (base surface unavailable): richtext, theme-butter, theme-chocolate, theme-gothic, theme-matcha, theme-neutral, theme-stone, theme-y2k

Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot 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.

Changes requested: the Toolbar lane fix works for one list, but the new flex-row free-width measurement breaks rows that hold two lists.

  • Every single-row OverflowList in a flex row adds the row's whole free width to its own (useOverflow.ts:566-569), so two lists in one row, including two lists as a Toolbar start lane's own children, flicker every frame after a resize between folded and clipped, with items cut off and no "+N" trigger half the time; share the free width among the row's folded lists and add a browser test with two lists in one row.

Two smaller notes: public useOverflow now returns an extra inlineBounds key at runtime (remove it where remeasure is removed), and two new comments run past the comment style's sentence length (see the inline comments). The single-list case is solid: in the overflow-actions story the actions fold beside Clear from 400 px down to 160 px and unfold again, where the base pushes Clear out of the toolbar.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim: an OverflowList that is a horizontal Toolbar start lane's own child folds beside the end lane instead of pushing it out. Verified in the overflow-actions story at 400 to 160 px (base: Clear leaves the frame).
  • Claim: the actions unfold again when the row widens. Verified for one list (all six return at 900 px).
  • Claim: a single-row OverflowList never shrinks below its folded width and is never wider than its items. Verified (OverflowList.tsx:418-422).
  • Claim: a squeezed row keeps its trigger whole. False with two lists in one row (see the blocking finding).
  • Claim: the fix covers the reported selection-toolbar case. Verified: TableSelectionToolbar passes startContent to Toolbar unchanged.
  • Claim: a deeper-nested list and the table filter template keep their layout. Verified (nested lane basis stays auto; template shows 3 of 3 clauses, identical frames).
  • Claim: no new public prop or data attribute. Verified (no API surface change).
  • Claim: useOverflow's public return is unchanged. True for its type; at runtime it gains an inlineBounds key.
  • Claim: the Toolbar, OverflowList and useOverflow unit suites pass. Verified.
  • File .changeset/toolbar-start-lane-overflow-folds.md: the trigger-whole sentence does not hold for two lists in one row.
  • File apps/storybook/stories/OverflowList.stories.tsx: clear.
  • File apps/storybook/stories/Toolbar.stories.tsx: clear.
  • File packages/core/src/OverflowList/OverflowList.tsx: non-blocking comment wording.
  • File packages/core/src/Toolbar/Toolbar.tsx: clear.
  • File packages/core/src/Toolbar/__tests__/ToolbarOverflowList.interaction.browser.spec.ts: clear; it has no two-list case.
  • File packages/core/src/hooks/useOverflow.ts: blocking free-width finding; non-blocking runtime inlineBounds key and comment wording.

Automated review (maintainer link)

Comment thread packages/core/src/hooks/useOverflow.ts Resolved
Comment thread packages/core/src/hooks/useOverflow.ts Resolved
Each single-row list in a flex row added the row's whole free width to its
own. Two lists in one row then both unfolded into the same space, the row
overflowed, both clipped, the next measurement folded them, and the cycle
repeated every frame. The lists that may unfold into a row now split its
free width, so together they never claim more than it.

The public useOverflow no longer returns the internal inline bounds. A
Toolbar story holds two lists as the start lane's own children, and the
browser spec checks that they settle without clipping or flicker at 380,
530 and 900 px.

Co-authored-by: quocluongg <[email protected]>
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec bc82097

The no-clip, no-flicker cases pass on main too, since main never folds.
This case needs both lists to fold into their own triggers beside the end
lane, without clipping and steady across frames: main fails it (no fold),
and so did the head before the lists shared the row's free width (flicker).

Co-authored-by: quocluongg <[email protected]>
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 2832696

The floor is the smaller of the folded and unfolded widths. Both were
rounded up, so a list whose items span a sub-pixel width (a one-item list
of 42.7 px) grew to the next pixel. Only the folded width now rounds up, so
its trigger never clips; the unfolded width stays exact. The browser spec
checks the one-item list's width to a tenth of a pixel.

Co-authored-by: quocluongg <[email protected]>
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 30514ed

A single row is never narrower than the smaller of its fully folded width
and its unfolded width, so its indicator is never clipped. In a narrower
parent the list overflows the parent, and the parent's own overflow decides
what shows. Browser cases cover a list in a parent narrower than its folded
width (indicator whole) and a list with room (floor no wider than its
items).

Co-authored-by: quocluongg <[email protected]>
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 9c969c3

@github-actions github-actions Bot added needs:spec-owner-review Current knowledge records await owner approval and removed needs:spec-owner-review Current knowledge records await owner approval labels Nov 17, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 76274d5

@astracat-bot astracat-bot 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.

Approved pending CI. CI has not run on this head yet: a draft runs no CI, and marking it ready for review runs the required checks. There are no blocking findings; the open inline comment-writing suggestions stay non-blocking.

Claims and files checked

Review mode: same-head; reason: none

changed rules (0): none

Claims:

  • Changeset: a start lane's own list folds beside the end content instead of pushing it out: verified (380 px capture: Clear ends at 404 of 412 px, where the base pushes it to 616 px; the 380 px browser case).
  • Changeset: a folded single-row list in a flex row unfolds when the row widens: verified (capture narrowed to 140 px then widened to 900 px: all ten items in each list, where the base stays folded).
  • Changeset: a single-row list never shrinks below its folded width, so its trigger stays whole: verified (a 30 px width and a 30 px flex basis both hold a 41 px list showing a whole "+6").
  • Changeset: in a flex row the list's width is its unfolded items up to the row's width, and content after it sits after that width: verified (300 px capture: the folded list keeps 218.5 px and "After" sits whole at the row's end).
  • Changeset: in a block parent the list fills the line as before: verified (block-parent list as wide as its parent on both sides).
  • Changeset: a caller's width, max-width or flex basis still sets the width: verified (200 px width and max-width hold 200 px, a calc() cap holds its computed width; a narrower width or basis keeps the folded floor, as the description states).
  • Description: no public API change, no new prop or data attribute, and the public hook's return is unchanged: verified (named exports only; the public hook strips the internal fields).
  • Description: a nested list and the table filter template keep their layout, and a list with room shows every item: verified (nested, template and content-sized browser cases).
  • Description: in a parent narrower than its folded width the list overflows the parent instead of clipping its trigger: verified (30 px parent cases).
  • Description: the width is published in a flex row only, in layout pixels, capped by the visible-item cap, and follows a parent that switches between a flex row and a block: verified (source; capped-list capture shows three items and "+3"; display-flip case).
  • Description: nothing is read before the first client measurement, so server markup is unchanged: verified (no size style until the first measurement).
  • Description: the list shrinks before its siblings, so a badge or button keeps its label until the list is fully folded: verified (badge and following-button cases; "After" uncut at 300 px).
  • Description: a set that fits whole reserves no indicator space: verified (new unit case).
  • Description: a start lane whose own child is a list takes the width the end lane leaves, in plain CSS with no new attribute: verified (source).
  • Description: the row free-width share is removed: verified (no share code at this head).
  • Description: the scale read goes through the existing hit-area helper with its own tolerance, hit areas keep theirs, and the helper stays internal: verified (source; hit-area browser and unit suites pass, 28 browser cases where the description counts 26 from a different set).
  • Description: below the folded start lane's width the lanes overlap, recorded as a gap, with no overlap down to 160 px and a 320 px guard: verified (record gap bullet; first-meet scans).
  • Description: the browser spec passes 32 of 32 in both browsers, units 1710 of 1710 and Toolbar accessibility 13 of 13, and the evidence table's main column: verified (runs at this head; 11 of 32 fail on the base with this branch's stories, matching the table).
  • Description: the record changes were ruled within the records: verified as far as the repository shows (an engineering owner approved the record changes at this head).
  • Description: fixes the reported selection-toolbar bug: verified (the selection toolbar passes its start content straight to the toolbar's start lane).
  • Description: notes on earlier commits: consistent with the reviews of those commits.

Files:

  • .changeset/toolbar-start-lane-overflow-folds.md: clear.
  • apps/storybook/stories/OverflowList.stories.tsx: clear.
  • apps/storybook/stories/Toolbar.stories.tsx: clear.
  • docs/specs/components/OverflowList/OverflowList.spec.md: non-blocking (one long PR1 sentence).
  • docs/specs/components/Toolbar/Toolbar.spec.md: clear.
  • packages/core/src/OverflowList/OverflowList.tsx: non-blocking (long comment sentences).
  • packages/core/src/Toolbar/Toolbar.tsx: clear.
  • packages/core/src/Toolbar/__tests__/ToolbarOverflowList.interaction.browser.spec.ts: clear.
  • packages/core/src/hooks/computeOverflow.test.ts: clear.
  • packages/core/src/hooks/computeOverflow.ts: clear.
  • packages/core/src/hooks/useOverflow.ts: non-blocking (a stale comment on rendered and long comment sentences).
  • packages/core/src/utils/hitArea.ts: clear.

Automated review (maintainer link)

Comment on lines +139 to +143
/**
* The list counts any scale beyond the computed width's rounding (six
* significant digits), however close to 1: the last frames of a layer
* scaling in still shorten its measured items.
*/

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.

Non-blocking (comment style): this is one 30-word sentence with two topics. Suggest: "The computed width keeps six significant digits. The list counts any larger scale, however close to 1. The last frames of a scale-in still shorten its items."

…he scaled rect

A scaled rect is rounded on screen, so a width divided by the scale could
come out a layout unit short. The list then published a width a unit
narrower than its items, and an item shrank below its text: Firefox cut
'Save' and 'Duplicate' with an ellipsis under scale(0.5), and folded
'Delete' after a scale-in from 0.9. Under a scale, an item's width now
comes from its computed style, through a new layoutSize helper that
hitArea's screenScale also uses, plus half of the serialized width's last
digit so the sum is never short. A browser case sweeps letter-spacing
under scale(0.5) and scale(0.9) and checks that no item is narrower than
its text; it fails at the previous head in Chromium and Firefox and passes
here.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec d1826cc

@astracat-bot astracat-bot 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.

Changes requested. The code at this head holds up: a start lane's own list folds beside Clear, a folded list unfolds when its row widens, and under a scaled ancestor every item now keeps its whole label (the new scale sweep fails on the previous head and passes here in Chromium and Firefox). One thing blocks approval, and it needs only a description edit, no new commit:

  • The pull request description is out of date for this head: its opening note names the previous commit as the current head, its Change bullet says scaled item widths are "divided by the list's screen-to-layout ratio from screenScale" while useOverflow.ts:142-151 now reads them from the computed style through the new layoutSize export, and its Scale read bullet names only screenScale as the new hitArea.ts export.

Two non-blocking comment-style suggestions are inline; the earlier comment-style threads stay open as non-blocking.

Claims and files checked

Review mode: incremental; reason: none

changed rules (0): none

Claims:

  • Changeset: a start lane's own list folds beside the end content instead of pushing it out: verified (380 px browser case in both engines; Clear ends inside the toolbar, where the base pushes it past the edge).
  • Changeset: a folded single-row list in a flex row unfolds when the row widens: verified (widen-after-fold case: all ten items in each list).
  • Changeset: a single-row list never shrinks below its folded width, so its trigger stays whole: verified (30 px parent, 30 px width and 30 px flex basis cases keep a whole "+6").
  • Changeset: in a flex row the list's width is its unfolded items up to the row's width, and content after it sits after that width: verified (button-after-list case; the list's dynamic width style).
  • Changeset: in a block parent the list fills the line as before: verified (block-parent case).
  • Changeset: a caller's width, max-width or flex basis still sets the width: verified (200 px width, 200 px max-width and calc() cases).
  • Description: the opening note names the current head: false (it names the previous commit).
  • Description: a single row's width uses item widths divided by the screen-to-layout ratio: false under a scale (widths now come from the computed style through layoutSize, useOverflow.ts:142-151).
  • Description: the scale read goes through the existing hit-area helper with its own tolerance, hit areas keep theirs, and the helper stays internal: verified, but incomplete (it also adds and uses layoutSize).
  • Description: no public API change, no new prop or data attribute, and the public hook's return is unchanged: verified (the API surface generator lists no change; the public hook strips the internal fields).
  • Description: the minimum is the folded width rounded up and never wider than the unfolded items: verified (source; one-item floor case).
  • Description: the list shrinks before its siblings and folds against the width it gets: verified (shrink factor in source; the button after the list keeps its whole label).
  • Description: a set that fits whole reserves no indicator space: verified (new unit case).
  • Description: a start lane whose own child is a list takes the width the end lane leaves, in plain CSS: verified (source; 380 px and 320 px cases).
  • Description: the share math is removed: verified (none at this head).
  • Description: a nested list and the table filter template keep their layout, and a list with room shows every item: verified (nested, template and content-sized cases).
  • Description: below the folded start lane's width the lanes overlap, recorded as a gap, with a 320 px guard: verified (record gap bullet; no overlap found down to 160 px).
  • Description: the evidence table's results for this pull request: verified at this head (the browser spec passes every case in both engines); the runs and stills from earlier commits are consistent with earlier reviews and were not re-run.
  • Description: the record changes are approved: verified (an engineering owner approved this exact head).

Files:

  • .changeset/toolbar-start-lane-overflow-folds.md: clear.
  • apps/storybook/stories/OverflowList.stories.tsx: clear.
  • apps/storybook/stories/Toolbar.stories.tsx: clear.
  • docs/specs/components/OverflowList/OverflowList.spec.md: non-blocking (one long PR1 sentence).
  • docs/specs/components/Toolbar/Toolbar.spec.md: clear.
  • packages/core/src/OverflowList/OverflowList.tsx: non-blocking (long comment sentences).
  • packages/core/src/Toolbar/Toolbar.tsx: clear.
  • packages/core/src/Toolbar/__tests__/ToolbarOverflowList.interaction.browser.spec.ts: clear.
  • packages/core/src/hooks/computeOverflow.test.ts: clear.
  • packages/core/src/hooks/computeOverflow.ts: clear.
  • packages/core/src/hooks/useOverflow.ts: non-blocking (the new width comment, a stale comment on rendered, long comment sentences).
  • packages/core/src/utils/hitArea.ts: non-blocking (the file header grows to 16 lines).

Automated review (maintainer link)

Comment on lines +136 to +140
* without layout. Under a scale, the width comes from the computed style: a
* scaled rect is rounded on screen, and divided by the scale it can be a
* layout unit short, which shrinks an item below its text. The computed
* width keeps six significant digits, so half of its last digit is added
* back: the sum of the widths is then never short of the items.

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.

Non-blocking (comment style): the second sentence is 36 words with three topics, and the last one is passive. Suggest, for the sentences after the first:

 * Under a scale, read the width from the computed style. The browser rounds
 * a scaled rect, so the rect divided by the scale can be one layout unit
 * short, and the item shrinks below its text. The computed width keeps six
 * significant digits. Add half of its last digit, so the sum is never short
 * of the items.

Comment on lines +15 to +16
* `screenScale` reads how far transforms scale a box, and `layoutSize` a
* box's untransformed size (hooks/useOverflow.ts uses both)

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.

Non-blocking (file header): the header now runs 16 lines. These two lines fit in one:

 *   `screenScale` and `layoutSize` also serve hooks/useOverflow.ts.

@astracat-bot astracat-bot 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.

Approved pending CI. CI has not run on this head yet: a draft runs no CI, and marking the pull request ready for review starts it. A start lane's own list now folds beside Clear, a folded list unfolds when its row widens, every item keeps its whole label under a scaled ancestor, and the description now matches the code. The comment-style and record-sentence suggestions in the open inline threads are non-blocking.

Claims and files checked

Review mode: same-head; reason: none

changed rules (0): none

Claims:

  • Changeset: a list placed directly in a toolbar's start content folds beside the end content instead of pushing it out: verified (380 px browser case in Chromium and Firefox; the end lane stays inside the frame).
  • Changeset: a folded single-row list in a flex row unfolds when the row widens: verified (widen-after-fold case, including a start-folding list, a one-kept list and a text indicator).
  • Changeset: a single-row list never shrinks below its folded width, so its trigger stays whole: verified (30 px parent, 30 px width and 30 px flex-basis cases keep a whole "+6").
  • Changeset: in a flex row the list is as wide as its unfolded items, at most the row, and content after it sits after that width: verified (published width and max-width in OverflowList.tsx; button-after-list case).
  • Changeset: in a block parent the list fills the line as before: verified (block-parent case; no width is published outside a flex row).
  • Changeset: a caller's width, max-width or flex basis still sets the list's width: verified (200 px width, 200 px max-width and calc() cases; the caller's style wins by the cascade).
  • Description: the opening note names the current head and the merged base: verified.
  • Description: the share math is gone; the list owns its width in CSS and the toolbar lane rule is plain CSS: verified (no share code; the :has() lane rule).
  • Description: user impact (fold beside the end content, unfold on widening from either side and with any indicator, nested list and template unchanged, block parent unchanged, overflow instead of clipping in a too-narrow parent, no API change): verified (browser cases and source).
  • Description: the cause (a folded list's box follows its folded items; the lane's automatic minimum counts every item): verified (base code).
  • Description: the single row's width uses each item's rect without a scale and its computed style through layoutSize under a scale, plus padding and border, capped at the row, only in a flex row and only without observeParent: verified (useOverflow.ts).
  • Description: a capped list is as wide as the allowed items plus the indicator: verified (source; three-item cap case).
  • Description: the parent's layout is read at every measurement and the parent is observed, so a flex-to-block switch is followed: verified (source; display-flip case).
  • Description: nothing is published before the first client measurement: verified (initial bounds are zero, which gates both styles).
  • Description: the minimum is the folded width rounded up and never wider than the unfolded items: verified (source; one-item floor case).
  • Description: the list shrinks before its siblings and a too-narrow basis or width holds the folded width with "+N": verified (shrink factor; sibling and narrow cases).
  • Description: a set that fits whole reserves no indicator space: verified (new unit case).
  • Description: hitArea.ts exports screenScale with a tolerance and the new layoutSize, useOverflow calls both, hit areas keep their tolerance, the list uses a relative tolerance of six millionths, and hitArea.ts stays internal: verified (source).
  • Description: a scaled rect divided by the scale could be one layout unit short, so widths under a scale now come from the computed style with half of the last digit added back: verified (source; the scale sweep fails on the previous commit by 1/64 px in Chromium and 1/60 px in Firefox and passes here).
  • Description: no new prop or data attribute, and the public hook's return is unchanged: verified (the public hook strips the internal field; API surface unchanged).
  • Description: below the folded start lane's width the lanes overlap, recorded as a gap, with no overlap found down to 160 px and a 320 px guard: verified (record gap bullet; first-meet scan).
  • Description: the authority bullets match the current Toolbar and OverflowList records, and the record changes carry an engineering owner's approval for this head: verified.
  • Description: the head's local runs (33 of 33 browser cases in both engines; the new sweep fails on the previous commit): verified at this head; the full unit and hit-area totals are the author's runs and match the subsets run here; historical rows at earlier commits match the earlier reviews of those commits.
  • Description: the writing rubric (one gap bullet and one verification row; the longest added sentence is 31 words): verified for added sentences; the changed performance sentence is 42 words (non-blocking thread).

Files:

  • .changeset/toolbar-start-lane-overflow-folds.md: clear.
  • apps/storybook/stories/OverflowList.stories.tsx: clear.
  • apps/storybook/stories/Toolbar.stories.tsx: clear.
  • docs/specs/components/OverflowList/OverflowList.spec.md: non-blocking (one long performance sentence).
  • docs/specs/components/Toolbar/Toolbar.spec.md: clear.
  • packages/core/src/OverflowList/OverflowList.tsx: non-blocking (long comment sentences).
  • packages/core/src/Toolbar/Toolbar.tsx: clear.
  • packages/core/src/Toolbar/__tests__/ToolbarOverflowList.interaction.browser.spec.ts: clear.
  • packages/core/src/hooks/computeOverflow.test.ts: clear.
  • packages/core/src/hooks/computeOverflow.ts: clear.
  • packages/core/src/hooks/useOverflow.ts: non-blocking (a stale comment on rendered, long comment sentences).
  • packages/core/src/utils/hitArea.ts: non-blocking (the file header grows to 16 lines).

Automated review (maintainer link)

# Conflicts:
#	docs/specs/components/Toolbar/Toolbar.spec.md
#	packages/core/src/OverflowList/OverflowList.tsx
#	packages/core/src/hooks/useOverflow.ts
…draws

Main now reads the gap a list renders (the computed column-gap of its
measurement copy) for the fold. The width a single row publishes for
itself still summed its items with the fixed gap table, so in a theme
whose gap step draws wider (matcha, y2k: 12 px for step 2) the list
published a width narrower than its items and folded one with room. It
now sums them with the drawn gap. A browser case in matcha checks the
list shows all six items with none narrower than its text and a width
that holds its drawn gaps; it fails with the table gap (five items) and
passes here.
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 19, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 30e81e8

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 19, 2026

@astracat-bot astracat-bot 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.

Changes requested: the single-row width contract holds outside a toolbar, but since main was merged a start lane's own list no longer folds beside its badge, which is this pull request's main scenario.

  • Regression: with main's two-lane wrap styles (twoLane gives the start lane flex-wrap: wrap and twoLaneEnd gives the end lane flex-grow: 1), the startFolds rule in Toolbar.tsx lets the list wrap onto its own line under "5 selected" and take only half the free width, so at 900 px the overflow-actions toolbar grows to two rows and still shows "+1", against Toolbar FR2; keep the lane on one line and let it outgrow the end lane under the :has() condition, and make the spec's 900 px and unfold cases fail when a +N trigger shows, since today they count the trigger as an action.

startFolds also drops twoLane's min-width: fit-content from every horizontal start lane, so restoring it in the same fix is worthwhile. The comment-style suggestions in the open inline threads are non-blocking, and CI has not run on this draft head.

Claims and files checked

Review mode: same-head; reason: none

Claims:

  • Changeset: a list placed directly in a toolbar's start content folds beside the end content instead of pushing it out: partly false (it folds and the end content stays inside, but the list wraps under the badge).
  • Changeset: a folded single-row list in a flex row unfolds when the row widens: verified outside a toolbar; false inside the toolbar's start lane at 900 px.
  • Changeset: a single-row list never shrinks below its folded width, so its trigger stays whole: verified (narrow parent, width and flex-basis cases).
  • Changeset: in a flex row the list is as wide as its unfolded items, at most the row, and content after it sits after that width: verified (button-after-list case).
  • Changeset: in a block parent the list fills the line: verified.
  • Changeset: a caller's width, max-width or flex basis still sets the list's width: verified (fixed width, max-width and calc() cases).
  • Description: the toolbar lane takes the width the end lane leaves: false (the end lane's grow takes half the free width).
  • Description: every action and no trigger when the row has room: false (the test passes because it counts the trigger).
  • Description: the actions unfold when the row widens again: false inside the toolbar at 900 px.
  • Description: share math removed; width in a flex row only, in layout pixels, from each item's rect or, under a scale, its computed style; padding and border added; capped at the row; parent observed: verified.
  • Description: a capped list is as wide as the allowed items and its indicator; nothing is published before measurement; the minimum is rounded up and never wider than the unfolded items: verified.
  • Description: a set that fits whole reserves no indicator space: verified (new unit case).
  • Description: the published width sums items with the gap the theme draws: verified (matcha case).
  • Description: hit areas keep their scale tolerance, the list uses its own, and the helper stays internal: verified.
  • Description: no new prop or data attribute, and the public hook's return is unchanged: verified.
  • Description: nested lists and the table filter template keep their layout: verified.
  • Description: the record changes carry an engineering owner's approval for this head: verified.
  • Description: the local browser run passes all cases at this head: verified in Chromium.

Files:

  • .changeset/toolbar-start-lane-overflow-folds.md: first claim partly false (part of the blocking finding).
  • apps/storybook/stories/OverflowList.stories.tsx: clear.
  • apps/storybook/stories/Toolbar.stories.tsx: clear.
  • docs/specs/components/OverflowList/OverflowList.spec.md: non-blocking (one long performance sentence).
  • docs/specs/components/Toolbar/Toolbar.spec.md: clear.
  • packages/core/src/OverflowList/OverflowList.tsx: non-blocking (long comment sentences).
  • packages/core/src/Toolbar/Toolbar.tsx: blocking (start-lane regression); non-blocking (dropped two-lane minimum).
  • packages/core/src/Toolbar/__tests__/ToolbarOverflowList.interaction.browser.spec.ts: part of the blocking finding (the 900 px and unfold cases count the trigger).
  • packages/core/src/hooks/computeOverflow.test.ts: clear.
  • packages/core/src/hooks/computeOverflow.ts: clear.
  • packages/core/src/hooks/useOverflow.ts: non-blocking (stale comment on rendered, long comment sentences).
  • packages/core/src/utils/hitArea.ts: non-blocking (file header length).

Automated review (maintainer link)

Comment thread packages/core/src/Toolbar/Toolbar.tsx Resolved
…de the two-lane wrap

Main's two-lane wrap gives the end lane flex-grow 1 and the start lane
flex-wrap: wrap. With a start lane that folds its OverflowList
(flex 1 1 0%), the lanes then split the row's free space, and the
wrapping start lane moved the list, at its unfolded width, to a line of
its own: the badge sat above the actions and the list folded with room.
Such a lane now takes all the free space (flex-grow 1000000) and does
not wrap, so the end lane stays at its content width and the list folds.
Two-lane rows without a list keep the wrap. A browser case checks the
overflow-actions toolbar at 1280 px in Y2K and matcha and at 390 px in
neutral: badge and list on one line, the end lane at its content width,
and every action shown at 1280 px; it fails at the previous head and
passes here.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 2f6de0f

@astracat-bot astracat-bot 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.

Changes requested: the start lane's own list now folds beside Clear and stays on one line with main's two-lane wrap (at 900 px the toolbar matches main exactly), but the lane rule now also stops every other two-lane start lane from wrapping.

  • startFolds in Toolbar.tsx gives its flexWrap and minWidth a null default and is applied to every horizontal start lane, so StyleX drops twoLane's flex-wrap: wrap and min-width: fit-content from two-lane toolbars that hold no OverflowList, and a start lane wider than its toolbar now runs off it (the Default story at 390 px with 200% text ends 92 px past the toolbar and scrolls the page 20 px), against Toolbar FR2's "a start or end lane whose controls do not fit a line of their own wraps them"; keep twoLane's values on the default branch for a two-lane start lane and add a browser case for a wide start lane without a list.

The description's "Two-lane rows without a list keep main's wrap" becomes true with that fix. Separately, the 900 px, 1280 px and unfold "every action" assertions still count the "+N" trigger as an action, and the comment-style threads stay open; both are non-blocking. CI has not run on this draft head.

Claims and files checked

Review mode: incremental; reason: none

Claims:

  • Changeset: a list placed directly in a toolbar's start content folds beside the end content instead of pushing it out: verified (380 and 320 px).
  • Changeset: a folded single-row list in a flex row unfolds when the row widens: verified (320 to 900 px).
  • Changeset: a single-row list never shrinks below its folded width, so its trigger stays whole: verified in the last review; code unchanged.
  • Changeset: in a flex row the list is as wide as its unfolded items, at most the row, and content after it sits after that width: verified in the last review; code unchanged.
  • Changeset: in a block parent the list fills the line: verified in the last review; code unchanged.
  • Changeset: a caller's width, max-width or flex basis still sets the list's width: verified in the last review; code unchanged.
  • Description: a start lane holding a list takes all the free space, the end lane keeps its content width, and the lane does not wrap: verified (neutral, Y2K and matcha).
  • Description: two-lane rows without a list keep the base branch's wrap: false (their start lanes no longer wrap; part of the blocking finding).
  • Description: every action and no trigger when the row has room: verified by probe at 900 and 1280 px (the test counts the trigger).
  • Description: the actions unfold when the row widens again: verified.
  • Description: a nested list and the table filter template keep their layout: verified (same as the base at 1280 to 320 px).
  • Description: lanes stay apart across the tested range, guarded at 320 px: verified (down to 180 px).
  • Description: no new prop or data attribute, and the public hook's return is unchanged: verified (no API rows).
  • Description: share math removed; width in a flex row only, in layout pixels; scale reads; drawn gap; capped width; rounded minimum; a set that fits reserves no indicator: verified in the last review; code unchanged.
  • Description: the record changes carry an engineering owner's approval for this head: verified.
  • Description: local runs pass every case at this head, including the two-lane wrap spec: not re-run; that spec's story fits its start lane, so it does not exercise the regression.

Files:

  • .changeset/toolbar-start-lane-overflow-folds.md: clear.
  • apps/storybook/stories/OverflowList.stories.tsx: clear.
  • apps/storybook/stories/Toolbar.stories.tsx: clear.
  • docs/specs/components/OverflowList/OverflowList.spec.md: non-blocking (one long PR1 sentence).
  • docs/specs/components/Toolbar/Toolbar.spec.md: clear.
  • packages/core/src/OverflowList/OverflowList.tsx: non-blocking (long comment sentences).
  • packages/core/src/Toolbar/Toolbar.tsx: blocking (start-lane wrap removed from two-lane toolbars without a list).
  • packages/core/src/Toolbar/__tests__/ToolbarOverflowList.interaction.browser.spec.ts: non-blocking ("every action" assertions count the trigger); a wide start lane without a list has no case.
  • packages/core/src/hooks/computeOverflow.test.ts: clear.
  • packages/core/src/hooks/computeOverflow.ts: clear.
  • packages/core/src/hooks/useOverflow.ts: non-blocking (stale rendered comment, long comment sentences).
  • packages/core/src/utils/hitArea.ts: non-blocking (file header length).

Automated review (maintainer link)

Comment thread packages/core/src/Toolbar/Toolbar.tsx Resolved
…s it holds a list

The start-lane fold's style set flex-wrap and min-width to null outside
its :has() condition, and it came after the two-lane style, so it dropped
the two-lane start lane's wrap and fit-content width from every two-lane
toolbar, list or not. A two-lane start lane now takes one merged style:
wrap and fit-content by default, and only under the :has() condition
nowrap, min-width 0, a 0% basis and the large grow. Other start lanes keep
the original fold. A browser case reads a two-lane start lane without a
list (fit-content, wrap, no grow); it fails at the previous head
(min-width auto) and passes here. The 900 px and widen cases, and the
wide-theme case at 1280 px, now also fail when a +N trigger shows,
since the label count includes it.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 81191dd

@astracat-bot astracat-bot 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.

Approved: CI passed on this head, including the full browser interaction suite and the touched-component visual and accessibility checks.

The start lane's own list folds beside Clear on one row and unfolds as the row widens, and two-lane toolbars without a list keep the base branch's start-lane wrap, rendering identically to it. The open comment-style threads are non-blocking.

Claims and files checked

Review mode: same-head; reason: none

Claims:

  • Release note: a list placed directly in a horizontal toolbar's start content folds into its trigger beside the end content instead of pushing it out: verified (380 and 320 px browser cases pass at this commit and fail on the base).
  • Release note: a folded single-row list in a flex row unfolds when the row widens: verified (320 to 900 px; the row-widens case).
  • Release note: the list never shrinks below its folded width, so its trigger stays whole: verified (narrow-parent and 30 px cases).
  • Release note: in a flex row the list is as wide as its unfolded items, at most the row, and content after it sits after that width: verified (followed-by-sibling and parent-flip cases).
  • Release note: in a block parent it fills the line: verified (block-parent case).
  • Release note: a caller's width, max-width or flex basis still sets the width: verified (caller-limited cases).
  • Description: the end content stays inside the toolbar, the actions fold with the trigger whole and unfold when the row widens: verified (browser cases).
  • Description: any single-row list in a flex row unfolds, whichever side it folds from and whatever its indicator: verified (start-folding, one-kept and text-indicator rows).
  • Description: a nested list and the table filter template keep their layout, and a list with room keeps its items' width: verified.
  • Description: the flex-row trade-off, unchanged block parents and a list wider than a narrow parent: verified.
  • Description: the width is published only in a flex row, in layout pixels, follows a parent that switches between flex and block, and is not read before the first client measurement: verified (useOverflow.ts:660, :795-805; OverflowList.tsx:433-444; the parent-flip case).
  • Description: the minimum is rounded up and never wider than the unfolded items, the list shrinks before its siblings, and a narrow basis holds the folded width: verified (useOverflow.ts:161-205; OverflowList.tsx:81-91).
  • Description: a set that fits reserves no indicator: verified (computeOverflow.ts:84-89 and its new unit case).
  • Description: a two-lane start lane holding a list does not wrap, drops its minimum and takes the free width, and one without a list keeps the base branch's wrap and width exactly: verified (Toolbar.tsx:150-158; six toolbars render identically to the base).
  • Description: the earlier free-width share and its observer are removed: verified.
  • Description: hit areas keep their own tolerance, the list uses a finer one, and the helper stays internal: verified (hitArea.ts:477, useOverflow.ts:158; not re-exported from the utilities entry).
  • Description: the published width sums the gap the browser draws, and scaled widths come from the computed style: verified (useOverflow.ts:595-597, :142-151; wide-gap theme and scaled-sweep cases).
  • Description: no new public prop or data attribute, and the public hook's return is unchanged: verified (no public API rows; useOverflow.ts:468-475).
  • Description: below the folded width the lanes still overlap, recorded as a Toolbar gap and guarded at 320 px: verified (record bullet; first-meet case).
  • Description: the record changes carry an engineering owner's approval for this commit: verified.
  • Description: the fix is carried without the shared styling module the superseded pull request added: verified.
  • Description: the new browser spec passes every case in Chromium and Firefox at this commit, with the text-size spec: verified (Chromium phone; Firefox phone and desktop).
  • Description: the Toolbar and OverflowList accessibility specs, hit-area specs, unit tests and knowledge check pass: verified (the component audits run in CI, which passed at this commit).
  • Description: the evidence table's base column: consistent (14 of the 36 cases fail on the base with this branch's stories).
  • Description: runs and stills from earlier commits: historical, not re-run.
  • Description: the longest added record sentence is 31 words: verified for added sentences; the edited measurement sentence is 42 words (non-blocking note).

Files:

  • .changeset/toolbar-start-lane-overflow-folds.md: clear.
  • apps/storybook/stories/OverflowList.stories.tsx: clear.
  • apps/storybook/stories/Toolbar.stories.tsx: clear.
  • docs/specs/components/OverflowList/OverflowList.spec.md: non-blocking (one long PR1 sentence).
  • docs/specs/components/Toolbar/Toolbar.spec.md: clear.
  • packages/core/src/OverflowList/OverflowList.tsx: non-blocking (long comment sentences).
  • packages/core/src/Toolbar/Toolbar.tsx: non-blocking (one long comment sentence).
  • packages/core/src/Toolbar/__tests__/ToolbarOverflowList.interaction.browser.spec.ts: clear.
  • packages/core/src/hooks/computeOverflow.test.ts: clear.
  • packages/core/src/hooks/computeOverflow.ts: clear.
  • packages/core/src/hooks/useOverflow.ts: non-blocking (stale rendered comment, long comment sentences).
  • packages/core/src/utils/hitArea.ts: non-blocking (file header length).

Automated review (maintainer link)

Comment on lines +145 to +149
// A two-lane start lane: `twoLane`, except that a lane holding an
// OverflowList folds it. Such a lane takes all the free space, because the
// end lane grows by 1 and this factor dwarfs it, so the end lane stays at
// its content width. It does not wrap, because a wrapping lane would move
// the list, at its unfolded width, to a line of its own.

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.

Non-blocking (comment style): the second sentence is 29 words and joins a cause and its result. Suggest:

  // A two-lane start lane: `twoLane`, except that a lane holding an
  // OverflowList folds it. Such a lane takes all the free space: the end lane
  // grows by 1, and this factor dwarfs it. The end lane stays at its content
  // width. It does not wrap, because a wrapping lane would move the list, at
  // its unfolded width, to a line of its own.

@cixzhang
cixzhang marked this pull request as ready for review November 19, 2026 08:34
@cixzhang
cixzhang merged commit 472896d into main Nov 19, 2026
156 checks passed
@github-actions
github-actions Bot deleted the fix/toolbar-overflowlist-shrink branch November 20, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — 81191dd7 Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. lane:1 Astryx fix-loop lane 1 owns this needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Toolbar start slot prevents OverflowList actions from shrinking beside end content

1 participant