Skip to content

fix(ChatLayout): the Panel View story's composer rests in its panel - #10447

Merged
cixzhang merged 1 commit into
meta:mainfrom
vjeux:uikit/c08-panel-view-story
Nov 7, 2026
Merged

cixzhang merged 1 commit into
meta:mainfrom
vjeux:uikit/c08-panel-view-story

Conversation

@vjeux

@vjeux vjeux commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

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:ChatLayout FR3: with no scrollRef, 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' and flexDirection: 'column'. The panel also gets a data-testid for 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

  • Reproduction before the change: the new ChatLayoutPanelView.interaction.browser.spec.ts finds 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.
  • Result after the change: the dock rests at the panel's bottom edge at both sizes.
  • Representative unchanged path: the other ChatLayout stories and specs.
  • Regression test: the new spec.

Scope

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • Red-first, ChatLayoutPanelView.interaction.browser.spec.ts against a Storybook built from main 9782dea with only the panel's data-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).
  • Chat unit suites: 445/445. pnpm typecheck: 0 errors. pnpm check:knowledge passes. Prettier is clean on both files.

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.
@vercel

vercel Bot commented Nov 7, 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 7, 2026 3:45am UTC

Request Review

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

astracat-bot Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 7, 2026, 3:55 AM UTC

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 3184192

Storybook · Sandbox · built from this PR's head

Modified components

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) before frame after frame diff frame
Chat · Default (neutral, light) before frame after frame diff frame
Chat · Clipping (neutral, dark) before frame after frame diff frame
Chat · Clipping (neutral, light) before frame after frame diff frame

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

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

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]

@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 7, 2026
@vjeux
vjeux marked this pull request as ready for review November 7, 2026 04:41
@cixzhang
cixzhang merged commit c9f603a into meta:main Nov 7, 2026
121 checks passed
@vjeux
vjeux deleted the uikit/c08-panel-view-story branch November 7, 2026 05:10

This branch was successfully deployed

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

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants