Repository navigation
Description
Context
packages/ui-react/src/theme.css:611-649 still ships the stacked-grid auto-grow composer: .composer-grow, its ::after mirror and the > textarea rules. No component renders that class. The live composer is the kit Composer, which sizes itself with field-sizing: content (fieldSizing, packages/ui-kit/src/chrome/Composer.tsx:243). The composer follows soft wrap (docs/decisions/design-kit/components-and-interactions.md:820-827) records the mirror as a refused alternative.
The only remaining reference is the typing benchmark, which selects ".composer-grow textarea" (textarea, packages/ui-react/tests/render/typing-bench.tsx:112-115). That selector now matches nothing, so once the chat surface mounts, the benchmark throws composer textarea not found before it measures anything. The guard it exists for, keystroke cost growing with transcript length, is therefore off.
Guide forms/form-fields-automatically-fit-contents treats the mirror only as a fallback: "The most robust fallback for textareas uses a CSS Grid trick where a hidden pseudo-element mirrors the user's input". The composer already has its own rows fallback.
Scope
- Delete the
.composer-growblock and the comment above it (packages/ui-react/src/theme.css:611-649). - Retarget the benchmark at the kit composer's own textarea,
textarea[data-composer](data-composer,packages/ui-kit/src/chrome/Composer.tsx:308-309), and update its comment attyping-bench.tsx:110-111. Keep the existingdisabledand value checks.
Out of scope
- Any change to
Composeror its sizing. - Turning the benchmark into an asserted test, or changing what it measures.
streaming-bench.tsx.
Acceptance criteria
-
git grep -n "composer-grow" -- packagesreturns nothing. -
cd packages/ui-react && bun run tests/render/typing-bench.tsx 6completes and prints its table. On the unchanged tree it throwscomposer textarea not found. Record both runs in the PR. - No visual baseline changes, because the removed rules matched nothing.
Verification
cd packages/ui-react && bun run tests/render/typing-bench.tsx 6
bun run test
bun run typecheck
bun run lint
bun run visualContract impact
- This touches the integration contract, so it needs the
contractlabel, aCONTRACT:commit prefix, and the doc updated in the same commit. - This changes a published package's behaviour, so it needs a changeset.
theme.css ships in @schlessera/brain-ui-react. The class was never documented in docs/integration-contract/, so a patch changeset is enough.
Activity