diff --git a/packages/apollo-react/src/chat/wind/messages/message-list.test.tsx b/packages/apollo-react/src/chat/wind/messages/message-list.test.tsx index 9ce59e16f1..a6b8019b36 100644 --- a/packages/apollo-react/src/chat/wind/messages/message-list.test.tsx +++ b/packages/apollo-react/src/chat/wind/messages/message-list.test.tsx @@ -246,6 +246,19 @@ describe('Wind message list', () => { expect(document.querySelector('[data-slot="wind-chat-messages-skeleton"]')).not.toBeNull(); }); + it('keeps the initial skeleton in the full-screen column', () => { + const service = createService(); + render(); + + act(() => + service.__internalService__.publish(AutopilotChatInternalEvent.ShowLoadingState, true) + ); + expect(document.querySelector('[data-slot="wind-chat-messages-skeleton"]')).toHaveClass( + 'mx-auto', + 'max-w-[var(--chat-column-max-width)]' + ); + }); + it('hides actions while streaming and keeps them off a lone message with disableActions', () => { const service = createService(); render(); diff --git a/packages/apollo-react/src/chat/wind/messages/message-list.tsx b/packages/apollo-react/src/chat/wind/messages/message-list.tsx index b8f904d5ea..1638eeeb43 100644 --- a/packages/apollo-react/src/chat/wind/messages/message-list.tsx +++ b/packages/apollo-react/src/chat/wind/messages/message-list.tsx @@ -38,11 +38,12 @@ import { ThinkingRow } from './thinking-row'; const ANCHOR_PEEK = 12; const COMPACT_ANCHOR_PEEK = 0; -function InitialLoading() { +// Takes the transcript's column classes and padding, so it fills the column the messages will. +function InitialLoading({ className }: { className?: string }) { return (