Repository navigation
fix(ChatLayout): the Panel View story's composer rests in its panel - #10447
Conversation
The Panel View story puts ChatLayout in a 400 by 600 px panel that clips its overflow. The panel was a block box, so the layout took its content's height, about 1,050 px, and the panel clipped the composer out of view on every viewport. The panel is now a flex column, as the docs advise, so the layout fills it and its composer rests at the panel's bottom edge.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| ChatComposer | 72.8 kB (0) · 11.7 kB CSS (0) | — | ✗ · ✓ · — |
| ChatComposerDrawer | 17.7 kB (0) · 4.7 kB CSS (0) | — | ✗ · ✓ · — |
| ChatComposerInput | 70.9 kB (0) · 11.1 kB CSS (0) | — | ✗ · ✓ · — |
14 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| ChatComposerTokenElement | 70.8 kB (0) · 11.1 kB CSS (0) | — | ✗ · ✓ · — |
| ChatDictationButton | 56.9 kB (0) · 9.9 kB CSS (0) | — | ✗ · ✓ · — |
| ChatLayout | 59.6 kB (0) · 10.4 kB CSS (0) | — | ✗ · ✓ · — |
| ChatLayoutScrollButton | 56.8 kB (0) · 10.0 kB CSS (0) | — | ✗ · ✓ · — |
| ChatMessage | 16.8 kB (0) · 3.7 kB CSS (0) | — | ✗ · ✓ · ✓ |
| ChatMessageBubble | 7.2 kB (0) · 3.7 kB CSS (0) | — | ✗ · ✓ · ✓ |
| ChatMessageList | 23.9 kB (0) · 7.0 kB CSS (0) | — | ✗ · ✓ · — |
| ChatMessageMetadata | 19.9 kB (0) · 4.1 kB CSS (0) | — | ✗ · ✓ · — |
| ChatSendButton | 56.7 kB (0) · 9.8 kB CSS (0) | — | ✗ · ✓ · — |
| ChatSystemMessage | 7.0 kB (0) · 3.8 kB CSS (0) | — | ✗ · ✓ · — |
| ChatTokenizedText | 7.2 kB (0) · 4.0 kB CSS (0) | — | ✗ · ✓ · — |
| ChatToolCalls | 27.8 kB (0) · 8.3 kB CSS (0) | — | ✗ · ✓ · — |
| Chat | — | — | ✗ · ✓ · — |
| chat | — | — | — · ✓ · — |
Visual changes: 4 snapshots in 1 component
A change is a question for the reviewer, not a failure.
| Component · story | Before | After | Diff |
|---|---|---|---|
| Chat · Default (neutral, dark) | ![]() |
![]() |
![]() |
| Chat · Default (neutral, light) | ![]() |
![]() |
![]() |
| Chat · Clipping (neutral, dark) | ![]() |
![]() |
![]() |
| Chat · Clipping (neutral, light) | ![]() |
![]() |
![]() |
Package size: measured; main has no measurement of the merge base to compare yet.
API changes: cli +14 · ~5 · −0 (against the merge base's committed report)
Committed API report behind this build: cli 19 rows, core 24 rows; run pnpm api:report.
19 API changes (advisory)
| Package | Where | Signature | Usage | |
|---|---|---|---|---|
| + | cli |
./api · Types · type SearchResultEntry |
deprecated?: ComponentDeprecation | undefined |
import type {SearchResultEntry} from '@astryxdesign/cli/api'; const x: SearchResultEntry = {deprecated: …} |
| + | cli |
./authoring · Types · interface ComponentDeprecation |
interface ComponentDeprecation |
import type {ComponentDeprecation} from '@astryxdesign/cli/authoring' |
| + | cli |
./authoring · Types · interface ComponentIconSlotDoc |
interface ComponentIconSlotDoc |
import type {ComponentIconSlotDoc} from '@astryxdesign/cli/authoring' |
| + | cli |
./authoring · Types · interface ComponentIconSlotStateDoc |
interface ComponentIconSlotStateDoc |
import type {ComponentIconSlotStateDoc} from '@astryxdesign/cli/authoring' |
| + | cli |
./authoring · Types · interface MultiComponentDoc |
deprecated?: ComponentDeprecation |
import type {MultiComponentDoc} from '@astryxdesign/cli/authoring'; const x: MultiComponentDoc = {deprecated: …} |
| + | cli |
./authoring · Types · interface SingleComponentDoc |
deprecated?: ComponentDeprecation |
import type {SingleComponentDoc} from '@astryxdesign/cli/authoring'; const x: SingleComponentDoc = {deprecated: …} |
| + | cli |
./doc · Types · interface ComponentBaseDoc |
deprecated?: ComponentDeprecation |
import type {ComponentBaseDoc} from '@astryxdesign/cli/doc'; const x: ComponentBaseDoc = {deprecated: …} |
| + | cli |
./doc · Types · interface SubComponentDoc |
deprecated?: ComponentDeprecation |
import type {SubComponentDoc} from '@astryxdesign/cli/doc'; const x: SubComponentDoc = {deprecated: …} |
| + | cli |
./doc · Also exported from an earlier entry point · ComponentDeprecation |
ComponentDeprecation (./authoring) |
import {ComponentDeprecation} from '@astryxdesign/cli/doc' |
| + | cli |
./doc · Also exported from an earlier entry point · ComponentIconSlotDoc |
ComponentIconSlotDoc (./authoring) |
import {ComponentIconSlotDoc} from '@astryxdesign/cli/doc' |
| + | cli |
./doc · Also exported from an earlier entry point · ComponentIconSlotStateDoc |
ComponentIconSlotStateDoc (./authoring) |
import {ComponentIconSlotStateDoc} from '@astryxdesign/cli/doc' |
| + | cli |
./template · Also exported from an earlier entry point · ComponentDeprecation |
ComponentDeprecation (./authoring) |
import {ComponentDeprecation} from '@astryxdesign/cli/template' |
| + | cli |
./template · Also exported from an earlier entry point · ComponentIconSlotDoc |
ComponentIconSlotDoc (./authoring) |
import {ComponentIconSlotDoc} from '@astryxdesign/cli/template' |
| + | cli |
./template · Also exported from an earlier entry point · ComponentIconSlotStateDoc |
ComponentIconSlotStateDoc (./authoring) |
import {ComponentIconSlotStateDoc} from '@astryxdesign/cli/template' |
| ~ | cli |
./api · Functions · function search |
function search: (query: string, options?: { cwd?: string | undefined; type?: "template" | "component" | "hook" | "theme" | "doc" | undefined; limit?: number | undefined }) => Promise<SearchResponse> → function search: (query: string, options?: { cwd?: string | undefined; type?: "template" | "component" | "doc" | "theme" | "hook" | undefined; limit?: number | undefined }) => Promise<SearchResponse> |
import {search} from '@astryxdesign/cli/api'; search(…) |
| ~ | cli |
./authoring · Types · interface MultiComponentDoc |
theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } |
import type {MultiComponentDoc} from '@astryxdesign/cli/authoring'; const x: MultiComponentDoc = {theming: …} |
| ~ | cli |
./authoring · Types · interface SingleComponentDoc |
theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } |
import type {SingleComponentDoc} from '@astryxdesign/cli/authoring'; const x: SingleComponentDoc = {theming: …} |
| ~ | cli |
./doc · Types · interface ComponentBaseDoc |
theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } |
import type {ComponentBaseDoc} from '@astryxdesign/cli/doc'; const x: ComponentBaseDoc = {theming: …} |
| ~ | cli |
./doc · Types · interface SubComponentDoc |
theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } |
import type {SubComponentDoc} from '@astryxdesign/cli/doc'; const x: SubComponentDoc = {theming: …} |
Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
The Panel View story's panel becomes a flex column, so ChatLayout fills it, the transcript scrolls inside it, and the composer rests on the panel's bottom edge instead of being clipped. The new interaction spec fails against main and passes with this change.
Next step: mark the pull request ready for review, and a maintainer adds the ci:run label so CI runs on this fork branch.
[Automated review]












User impact
In Storybook, the ChatLayout "Panel View" story shows no composer: the 600 px panel clips it, on a phone and on a desktop. A reader of the story cannot type in it, and a software-keyboard check of the story finds the composer far below the keyboard, because it was never inside the panel.
Problem and solution fit
The story's panel is 400 × 600 px with
overflow: hidden, but it is a block box. ChatLayout lays out at its content's height (about 1,050 px) unless its container sizes it, so its dock, at the layout's bottom, sits under the panel's edge. A flex-column panel sizes the layout to the panel, as the full-height stories' wrappers do: the transcript scrolls in the layout's own scroller and the composer rests at the panel's bottom.Expected behavior and authority
ChatLayout's docs: "Don't apply a fixed height on the layout; let it fill its container with flex: 1."
component:ChatLayoutFR3: with noscrollRef, the root is the scroll container and the dock is sticky at its block end. The story's own description: "same full features in a narrow sidebar container".Smallest restoration
Two style properties on the story's panel:
display: 'flex'andflexDirection: 'column'. The panel also gets adata-testidfor the spec. No component code changes.height: 100%on the layout would place the composer the same way, but the docs advise against a height on the layout, so the panel sizes it instead.Evidence
ChatLayoutPanelView.interaction.browser.spec.tsfinds the dock's bottom below the panel's bottom on main (with only the panel's test id added), at 412 × 791 and at 1280 × 800.Scope
Testing
ChatLayoutPanelView.interaction.browser.spec.tsagainst a Storybook built from main 9782dea with only the panel'sdata-testid: both cases fail, with the dock's bottom at 1066 (412 × 791) and 1028 (1280 × 800) against the panel's bottom at 615.5. With this change both pass in Chromium (2/2) and in WebKit on the CI profile (--cpus=4,LP_NUM_THREADS=4, 2/2).pnpm typecheck: 0 errors.pnpm check:knowledgepasses. Prettier is clean on both files.