Nutrient Toolbar Layout
One-pass, feedback-loop-free toolbar layout (P0-5).
A Layout over two content groups — the items, and the overflow (⋮) affordance with its menu — that measures each item at its intrinsic width and then delegates the visible/overflow split to the pure ToolbarGrouping algorithm (#7) using the measured widths and the real available width. The split is computed in the measure pass and consumed immediately for placement.
The two content groups are why this is a plain Layout and not a SubcomposeLayout: composition happens once, up front, so there is no deferred-composition cost per measure pass and the layout answers intrinsic measurements — Modifier.width(IntrinsicSize.Max) and anything built on it works above this layout, which it cannot above a SubcomposeLayout. The ⋮ button's width comes from its intrinsic width rather than a throwaway probe composition, and the collapsed items reach its menu through ToolbarOverflowState — the same shape as Material 3's own AppBarRow.
Each item's ToolbarItem.overflowBehavior is the single source of truth for placement: Never items are always collapsed into the overflow menu regardless of width, AlwaysShow items claim row slots first (but collapse too when the row genuinely cannot fit them), and IfRoom items fill the remaining space (see ToolbarGrouping).
Placement honors ToolbarItem.position: Start items are placed leading-to-trailing from the leading edge; End items are packed against the trailing edge (in front of the overflow button), matching the View toolbar where action items gravitate to the end and the leading area belongs to the title.
The row is as wide as its content within the constraints it is given, so a parent that measures it tightly (the main toolbar filling the window) gets a full-width row with the trailing items pinned to the far edge, and a parent that measures it loosely or without a bound (a floating, wrap-width toolbar) gets a row as wide as its icons.