Skip to content

[docs] Update chat quickstart and backend adapters#22485

Open
hasdfa wants to merge 32 commits into
mui:masterfrom
hasdfa:x-chat-docs-quickstart-backend
Open

[docs] Update chat quickstart and backend adapters#22485
hasdfa wants to merge 32 commits into
mui:masterfrom
hasdfa:x-chat-docs-quickstart-backend

Conversation

@hasdfa
Copy link
Copy Markdown
Member

@hasdfa hasdfa commented May 17, 2026

Summary

  • Updates the X Chat quickstart docs and backend adapter docs.
  • Adds content for built-in adapter usage, including AI SDK and echo adapter flows.
  • Uses the shared playground/docs infrastructure from #22484 while keeping this PR limited to quickstart/backend documentation.

Details

  • This is one of the docs-content fan-out PRs after the playground infrastructure lands.
  • It explains how to start using X Chat and how backend or adapter-driven usage should be wired.
  • It does not include standalone examples or unrelated package changes.

Validation

  • git diff --check x-chat-docs-playground-infra...x-chat-docs-quickstart-backend
  • Split-scope checks confirmed this branch stays within X Chat docs paths.

Batch merge structure

Merge top to bottom. #22478 can merge independently, but it should land before #22483 because #22483 assumes the new docs IA.

master
|-- #22478 [docs] Reorganize existing chat docs navigation
`-- #22479 [chat-headless] Add built-in chat adapters
    `-- #22480 [chat-headless] Harden runtime model and message errors
        `-- #22481 [x-chat] Harden material message surfaces
            `-- #22482 [x-chat] Add ChatBox layout slots and migration codemod
                `-- #22483 [docs] Add chat docs page shells (after #22478)
                    `-- #22484 [docs] Add chat playground infrastructure
                        |-- #22485 [docs] Update chat quickstart and backend adapters
                        |-- #22486 [docs] Update chat basics display and behavior
                        |-- #22487 [docs] Update chat customization core material and headless docs
                        `-- #22488 [docs] Update chat overview and component gallery

hasdfa added 2 commits May 17, 2026 20:45
Two built-in adapters that ship with @mui/x-chat-headless: a simple
echo adapter for examples and an AI SDK adapter that bridges Vercel
AI SDK UIMessage streams into ChatMessageChunk events. Wire both
through the headless core barrel so they can be imported from
'@mui/x-chat-headless' and '@mui/x-chat-headless/core'.
@code-infra-dashboard
Copy link
Copy Markdown

code-infra-dashboard Bot commented May 17, 2026

Deploy preview

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)
@mui/x-license 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@hasdfa hasdfa added scope: chat Changes related to the AI chat. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. docs Improvements or additions to the documentation. labels May 17, 2026
@hasdfa hasdfa force-pushed the x-chat-docs-quickstart-backend branch 4 times, most recently from ce6bb26 to 3b6619f Compare May 18, 2026 10:32
@hasdfa hasdfa marked this pull request as ready for review May 18, 2026 13:14
Copilot AI review requested due to automatic review settings May 18, 2026 13:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the X Chat documentation (quickstart + backend adapters) and introduces supporting API/runtime changes across @mui/x-chat, @mui/x-chat-headless, and @mui/x-codemod to align exports, slots/slotProps structure, message author/error handling, and docs API generation.

Changes:

  • Docs: add/refresh Chat quickstart and built-in adapter pages (echo + AI SDK) and add multiple new placeholder page shells.
  • Chat packages: add message-scoped errors + MessageError/ChatMessageError, message author resolution (useMessageAuthor), and various component sx additions / slot nesting updates.
  • Codemod: add v9.0.0/chat/preset-safe and document migrate-slots, including fixtures/tests.

Reviewed changes

Copilot reviewed 266 out of 266 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/x-chat.exports.json Updates the export manifest for new/updated Chat public APIs.
scripts/buildApiDocs/chatSettings/index.ts Excludes additional internal file(s) from API docs generation.
packages/x-codemod/src/v9.0.0/preset-safe/index.ts Wires Chat codemods into the v9 preset-safe pipeline.
packages/x-codemod/src/v9.0.0/chat/preset-safe/index.ts Adds Chat preset-safe entrypoint for v9 codemods.
packages/x-codemod/src/v9.0.0/chat/migrate-slots/pre-rename.expected.spec.tsx Adds expected fixture for pre-rename slot keys.
packages/x-codemod/src/v9.0.0/chat/migrate-slots/pre-rename.actual.spec.tsx Adds actual fixture for pre-rename slot keys.
packages/x-codemod/src/v9.0.0/chat/migrate-slots/migrate-slots.test.ts Adds codemod tests (correctness + idempotency).
packages/x-codemod/src/v9.0.0/chat/migrate-slots/expected.spec.tsx Adds expected fixture for flat-to-nested slot migration.
packages/x-codemod/src/v9.0.0/chat/migrate-slots/actual.spec.tsx Adds actual fixture for flat-to-nested slot migration.
packages/x-codemod/README.md Documents the Chat migrate-slots codemod.
packages/x-chat/src/themeAugmentation/props.ts Adds theme augmentation support for MuiChatMessageError.
packages/x-chat/src/themeAugmentation/overrides.ts Adds class-key overrides typing for MuiChatMessageError.
packages/x-chat/src/themeAugmentation/components.ts Adds theme component config typing for MuiChatMessageError.
packages/x-chat/src/internals/useCopyToClipboard.ts Adds internal copy-to-clipboard hook for CodeBlock.
packages/x-chat/src/index.ts Exports new public APIs (layout types, ChatMessageError, echo adapter re-export).
packages/x-chat/src/ChatSuggestions/ChatSuggestions.tsx Adds sx support and documents alwaysVisible prop.
packages/x-chat/src/ChatSuggestions/ChatSuggestions.test.tsx Updates suggestions rendering expectations when messages exist.
packages/x-chat/src/ChatMessageSources/ChatMessageSources.tsx Adds sx prop support.
packages/x-chat/src/ChatMessageSkeleton/ChatMessageSkeleton.tsx Adds sx prop support.
packages/x-chat/src/ChatMessageList/DefaultMessageItem.tsx Introduces shared default row component for ChatBox/ChatMessageList.
packages/x-chat/src/ChatMessageList/ChatMessageList.test.tsx Adds standalone/default row behavior tests and slot override coverage.
packages/x-chat/src/ChatMessageError/index.ts Adds barrel exports for ChatMessageError.
packages/x-chat/src/ChatMessageError/chatMessageErrorClasses.ts Adds utility classes + hooks for ChatMessageError.
packages/x-chat/src/ChatMessage/index.ts Re-exports ChatMessageError from ChatMessage package index.
packages/x-chat/src/ChatMessage/ChatMessageMeta.tsx Updates meta alignment logic to use isOwnMessage.
packages/x-chat/src/ChatMessage/ChatMessageInlineMeta.tsx Updates inline meta styling logic to use isOwnMessage.
packages/x-chat/src/ChatMessage/ChatMessageGroup.test.tsx Adds tests for default/overridden/hidden author label slot.
packages/x-chat/src/ChatMessage/ChatMessageContent.test.tsx Updates locale expectations and tool-part rendering assertions.
packages/x-chat/src/ChatMessage/chatMessageClasses.ts Adds noAvatar utility class key.
packages/x-chat/src/ChatMessage/ChatMessageActions.tsx Updates actions alignment logic to use isOwnMessage.
packages/x-chat/src/ChatMessage/ChatMessage.test.tsx Updates slotProps path test + adds “own message vs other user” behavior test.
packages/x-chat/src/ChatMessage/ChatDateDivider.tsx Adds sx prop support.
packages/x-chat/src/ChatIndicators/ChatUnreadMarker.tsx Adds sx prop support.
packages/x-chat/src/ChatIndicators/ChatTypingIndicator.tsx Adds sx prop support.
packages/x-chat/src/ChatIndicators/ChatScrollToBottomAffordance.tsx Adds sx prop support.
packages/x-chat/src/ChatConversationList/ChatConversationList.test.tsx Updates tests to enable conversation-list feature + stabilizes async selection assertion.
packages/x-chat/src/ChatConfirmation/ChatConfirmation.tsx Adds sx prop support.
packages/x-chat/src/ChatComposer/ChatComposerTextArea.test.tsx Updates slotProps nesting for composer input.
packages/x-chat/src/ChatComposer/ChatComposerSendButton.test.tsx Updates slotProps nesting for composer send.
packages/x-chat/src/ChatComposer/ChatComposerAttachmentList.tsx Switches to useChatComposer to support rendering outside ChatComposer.
packages/x-chat/src/ChatComposer/ChatComposerAttachButton.test.tsx Updates slotProps nesting for composer attach.
packages/x-chat/src/ChatComposer/ChatComposer.tsx Removes zIndex and documents onSubmit prop behavior.
packages/x-chat/src/ChatComposer/ChatComposer.test.tsx Updates slotProps nesting for composer root.
packages/x-chat/src/ChatCodeBlock/ChatCodeBlock.tsx Adds sx support and refactors clipboard behavior via new hook.
packages/x-chat/src/ChatBox/index.ts Exports new layout mode types from ChatBox.
packages/x-chat-headless/src/types/chat-state.ts Adds message-scoped error storage to internal state.
packages/x-chat-headless/src/types/chat-entities.ts Documents author and adds message author getter types/props.
packages/x-chat-headless/src/suggestions/SuggestionsRoot.tsx Adds alwaysVisible behavior for suggestions.
packages/x-chat-headless/src/stream/streamTextDeltaBuffer.ts Fixes streaming-part resolution to avoid cross-stream adoption and done-part revival.
packages/x-chat-headless/src/stream/streamHelpers.ts Adds createdAt to assistant messages created during streaming.
packages/x-chat-headless/src/stream/processStream.test.ts Adds regression test for parallel stream isolation + updates expected createdAt.
packages/x-chat-headless/src/selectors/chatSelectors.ts Adds selectors for message author + message-scoped errors.
packages/x-chat-headless/src/selectors/chatSelectors.test.ts Adds tests for message-scoped errors vs global error.
packages/x-chat-headless/src/message/parts/ToolPart.tsx Adds sectionSummary slot + section preview ownerState; adjusts showInput condition.
packages/x-chat-headless/src/message/parts/MessageParts.test.tsx Updates reasoning label expectation and tests ToolPart sectionSummary ownerState.
packages/x-chat-headless/src/message/MessageRoot.tsx Uses resolved author + adds data-is-own-message and improved aria-label source.
packages/x-chat-headless/src/message/MessageMeta.tsx Suppresses generic “error” status when message-scoped error content is present.
packages/x-chat-headless/src/message/MessageError.tsx Adds per-message error primitive with retry action hook-up.
packages/x-chat-headless/src/message/MessageContent.tsx Refactors default part renderers to avoid as any cast paths.
packages/x-chat-headless/src/message/MessageAvatar.tsx Uses resolved author avatar/display name.
packages/x-chat-headless/src/message/MessageAuthorLabel.tsx Uses resolved author display name for label content.
packages/x-chat-headless/src/message/message.types.ts Extends message ownerState with resolved author, ownership, and message error ownerState.
packages/x-chat-headless/src/message/internals/MessageContext.tsx Adds defaults for new ownerState fields.
packages/x-chat-headless/src/message/index.ts Exports MessageError and related types/ownerState.
packages/x-chat-headless/src/message-list/useMessageListBehavior.ts Adds mount guards and SSR-safe rAF/cAF usage for resize restore path.
packages/x-chat-headless/src/message-list/MessageListRoot.tsx Adds rAF/cAF guards around ResizeObserver scheduling.
packages/x-chat-headless/src/message-list/MessageListRoot.test.tsx Adds (non-jsdom) regression tests for streaming row resize auto-scroll (incl. StrictMode).
packages/x-chat-headless/src/message-group/messageGroup.types.ts Adds isOwnMessage to message group ownerState.
packages/x-chat-headless/src/message-group/MessageGroup.test.tsx Adds tests for member-based author resolution and author-id getter grouping.
packages/x-chat-headless/src/internals/useChatInstance/useChatInstance.ts Refines controlled/uncontrolled detection for activeConversationId.
packages/x-chat-headless/src/internals/useChatInstance/useChatInstance.test.tsx Adds/updates tests for controlled activeConversationId behavior.
packages/x-chat-headless/src/internals/useChatController/useChatControllerHelpers.ts Adds helper to extract messageId from ChatError details.
packages/x-chat-headless/src/internals/useChatController/realtimeActions.test.ts Adds end-to-end regression test for conversation removal during in-flight load.
packages/x-chat-headless/src/internals/useChatController/conversationActions.ts Avoids eager message reset during conversation switch while loading.
packages/x-chat-headless/src/index.ts Exposes new adapters, hooks, selectors, and message-error APIs.
packages/x-chat-headless/src/hooks/useMessageError.ts Adds hook to read message-scoped errors.
packages/x-chat-headless/src/hooks/useMessageError.test.tsx Adds tests for message-scoped error behavior.
packages/x-chat-headless/src/hooks/useMessageAuthor.ts Adds hook to resolve message author with locale-driven fallbacks.
packages/x-chat-headless/src/hooks/useChat.test.tsx Updates tests for createdAt + adds guard against duplicate initial listMessages calls.
packages/x-chat-headless/src/hooks/index.ts Re-exports new hook(s).
packages/x-chat-headless/src/core/index.ts Re-exports adapters and author getter types from core entry.
packages/x-chat-headless/src/conversation-list/ConversationListRoot.tsx Adds keyboard paging + type-ahead focus navigation; adds cleanup for timer.
packages/x-chat-headless/src/conversation-list/ConversationListItem.tsx Adds stable data-conversation-id attribute for consumers/tests.
packages/x-chat-headless/src/composer/ComposerSendButton.tsx Enables sending when attachments exist even if input is empty.
packages/x-chat-headless/src/composer/ComposerRoot.tsx Adds onSubmit prop and refines submission suppression behavior.
packages/x-chat-headless/src/composer/ComposerHelperText.tsx Sets role="alert" when composer has an error (unless overridden).
packages/x-chat-headless/src/ChatProvider.tsx Changes controlled detection for activeConversationId + threads author getter props through parameters.
packages/x-chat-headless/src/ChatProvider.test.tsx Strengthens streamFlushInterval test to validate buffering semantics.
packages/x-chat-headless/src/chat/internals/chatLocaleText.ts Adds new locale fields and updates default strings (“Thoughts”, tool labels, etc.).
packages/x-chat-headless/src/chat/ChatRoot.tsx Aligns controlled detection + threads author getter props to ChatProvider.
packages/x-chat-headless/src/chat/ChatLayout.tsx Adjusts layout container styles for flex/overflow behavior.
packages/x-chat-headless/src/chat/ChatComposition.test.tsx Updates variable naming in focus-related tests (no logic change).
packages/x-chat-headless/src/adapters/index.ts Exports new built-in adapters and types from adapters entry.
packages/x-chat-headless/src/adapters/createEchoAdapter.ts Adds built-in echo adapter implementation.
docs/translations/api-docs/chat/message-error/message-error.json Adds translation shell for new MessageError API page.
docs/translations/api-docs/chat/composer-root/composer-root.json Adds translation entry for ComposerRoot onSubmit.
docs/translations/api-docs/chat/chat-suggestions/chat-suggestions.json Adds translation entry for alwaysVisible.
docs/translations/api-docs/chat/chat-root/chat-root.json Updates generated propDescriptions for ChatRoot.
docs/translations/api-docs/chat/chat-provider/chat-provider.json Updates generated propDescriptions for ChatProvider.
docs/translations/api-docs/chat/chat-message-meta/chat-message-meta.json Adds noAvatar class description.
docs/translations/api-docs/chat/chat-message-list/chat-message-list.json Adds renderItem prop description.
docs/translations/api-docs/chat/chat-message-group/chat-message-group.json Adds noAvatar class description.
docs/translations/api-docs/chat/chat-message-error/chat-message-error.json Adds translation shell for new ChatMessageError API page.
docs/translations/api-docs/chat/chat-message-content/chat-message-content.json Adds noAvatar class description.
docs/translations/api-docs/chat/chat-message-avatar/chat-message-avatar.json Adds noAvatar class description.
docs/translations/api-docs/chat/chat-message-author-label/chat-message-author-label.json Adds noAvatar class description.
docs/translations/api-docs/chat/chat-message-actions/chat-message-actions.json Adds noAvatar class description.
docs/translations/api-docs/chat/chat-date-divider/chat-date-divider.json Adds noAvatar class description.
docs/src/modules/components/overview/chat/mainDemo/MessengerDemo.tsx Migrates to nested slots/slotProps + enables conversation list feature.
docs/src/modules/components/overview/chat/mainDemo/AgentDemo.tsx Migrates to nested slots/slotProps + enables conversation list feature.
docs/src/modules/components/chat-playground/parseSx.ts Adds sx-string parser helper for playground controls.
docs/src/modules/components/chat-playground/MessageBubble.tsx Adds helper for rendering a styled message bubble in playgrounds.
docs/src/modules/components/chat-playground/index.ts Exposes chat-playground utilities from index.
docs/pages/x/react-chat/display/unread-marker.js Adds docs page wrapper for unread-marker markdown.
docs/pages/x/react-chat/display/date-divider.js Adds docs page wrapper for date-divider markdown.
docs/pages/x/react-chat/customization/structure.js Adds docs page wrapper for structure markdown.
docs/pages/x/react-chat/customization/overview.js Adds docs page wrapper for customization overview markdown.
docs/pages/x/react-chat/customization/look-and-feel.js Adds docs page wrapper for look-and-feel markdown.
docs/pages/x/react-chat/basics/conversation.js Adds docs page wrapper for conversation markdown.
docs/pages/x/react-chat/backend/built-in-adapters/echo-adapter.js Adds docs page wrapper for echo-adapter markdown.
docs/pages/x/react-chat/backend/built-in-adapters/ai-sdk-adapter.js Adds docs page wrapper for ai-sdk-adapter markdown.
docs/pages/x/react-chat/all-components.js Adds docs page wrapper for all-components markdown.
docs/pages/x/api/chat/message-error.json Adds generated API JSON for MessageError.
docs/pages/x/api/chat/message-error.js Adds API page wrapper for MessageError.
docs/pages/x/api/chat/chat-unread-marker.json Adds unread-marker demo link to API page.
docs/pages/x/api/chat/chat-suggestions.json Adds alwaysVisible prop metadata.
docs/pages/x/api/chat/chat-message-meta.json Adds noAvatar class metadata.
docs/pages/x/api/chat/chat-message-list.json Adds renderItem prop metadata.
docs/pages/x/api/chat/chat-message-group.json Adds noAvatar class metadata.
docs/pages/x/api/chat/chat-message-error.json Adds generated API JSON for ChatMessageError.
docs/pages/x/api/chat/chat-message-error.js Adds API page wrapper for ChatMessageError.
docs/pages/x/api/chat/chat-message-content.json Adds noAvatar class metadata.
docs/pages/x/api/chat/chat-message-avatar.json Adds noAvatar class metadata.
docs/pages/x/api/chat/chat-message-author-label.json Adds noAvatar class metadata.
docs/pages/x/api/chat/chat-message-actions.json Adds noAvatar class metadata.
docs/pages/x/api/chat/chat-date-divider.json Adds date-divider demo link to API page.
docs/data/chatApiPages.ts Registers new Chat API pages for ChatMessageError and MessageError.
docs/data/chat/quickstart/RenderChatBox.tsx.preview Adds preview snippet for quickstart demo.
docs/data/chat/quickstart/RenderChatBox.tsx Adds quickstart demo source (TS).
docs/data/chat/quickstart/RenderChatBox.js Adds quickstart demo source (JS).
docs/data/chat/quickstart/quickstart.md Updates Chat quickstart content and wiring example.
docs/data/chat/material/thread/PaperBubble.tsx.preview Removes outdated preview snippet.
docs/data/chat/material/thread/PaperBubble.tsx Migrates to nested slots format.
docs/data/chat/material/thread/PaperBubble.js Migrates to nested slots format (JS).
docs/data/chat/material/thread/GradientHeader.tsx.preview Removes outdated preview snippet.
docs/data/chat/material/thread/GradientHeader.tsx Migrates to nested slots format.
docs/data/chat/material/thread/GradientHeader.js Migrates to nested slots format (JS).
docs/data/chat/material/thread/BubbleWithStatus.tsx.preview Removes outdated preview snippet.
docs/data/chat/material/thread/BubbleWithStatus.tsx Migrates to nested slots format.
docs/data/chat/material/thread/BubbleWithStatus.js Migrates to nested slots format (JS).
docs/data/chat/material/thread/AdaptiveSendButton.tsx.preview Removes outdated preview snippet.
docs/data/chat/material/thread/AdaptiveSendButton.tsx Migrates to nested slots format.
docs/data/chat/material/thread/AdaptiveSendButton.js Migrates to nested slots format (JS).
docs/data/chat/material/slot-overrides/ThemeAndSlotCombination.tsx.preview Removes outdated preview snippet.
docs/data/chat/material/slot-overrides/ThemeAndSlotCombination.tsx Migrates to nested message avatar slot.
docs/data/chat/material/slot-overrides/ThemeAndSlotCombination.js Migrates to nested message avatar slot (JS).
docs/data/chat/material/slot-overrides/SlotPropsCustomization.tsx Migrates slotProps paths to nested families.
docs/data/chat/material/slot-overrides/SlotPropsCustomization.js Migrates slotProps paths to nested families (JS).
docs/data/chat/material/slot-overrides/SlotBasicReplacement.tsx.preview Removes outdated preview snippet.
docs/data/chat/material/slot-overrides/SlotBasicReplacement.tsx Migrates to nested message avatar slot.
docs/data/chat/material/slot-overrides/SlotBasicReplacement.js Migrates to nested message avatar slot (JS).
docs/data/chat/material/message-list/MessageGrouping.tsx.preview Removes outdated preview snippet.
docs/data/chat/material/message-list/MessageGrouping.tsx Migrates group slotProps under messagesList.
docs/data/chat/material/message-list/MessageGrouping.js Migrates group slotProps under messagesList (JS).
docs/data/chat/material/message-list/DateDividerFormat.tsx Migrates dateDivider slotProps under messagesList.
docs/data/chat/material/message-list/DateDividerFormat.js Migrates dateDivider slotProps under messagesList (JS).
docs/data/chat/material/hooks/CustomComposer.tsx.preview Removes outdated preview snippet.
docs/data/chat/material/hooks/CustomComposer.tsx Migrates to nested composer root slot.
docs/data/chat/material/hooks/CustomComposer.js Migrates to nested composer root slot (JS).
docs/data/chat/material/examples/slot-overrides/SlotOverrides.tsx.preview Removes outdated preview snippet.
docs/data/chat/material/examples/slot-overrides/SlotOverrides.tsx Migrates to nested message content slot.
docs/data/chat/material/examples/slot-overrides/SlotOverrides.js Migrates to nested message content slot (JS).
docs/data/chat/material/examples/responsive-drawer/ResponsiveDrawer.tsx Enables conversation list feature for multi-conversation layout.
docs/data/chat/material/examples/responsive-drawer/ResponsiveDrawer.js Enables conversation list feature (JS).
docs/data/chat/material/examples/multi-conversation/MultiConversation.tsx Enables conversation list feature for multi-conversation layout.
docs/data/chat/material/examples/multi-conversation/MultiConversation.js Enables conversation list feature (JS).
docs/data/chat/material/examples/model-selector/ModelSelector.tsx.preview Removes outdated preview snippet.
docs/data/chat/material/examples/model-selector/ModelSelector.tsx Migrates to nested conversation headerActions slot.
docs/data/chat/material/examples/model-selector/ModelSelector.js Migrates to nested conversation headerActions slot (JS).
docs/data/chat/material/examples/compact-variant/CompactVariant.tsx Enables conversation list feature.
docs/data/chat/material/examples/compact-variant/CompactVariant.js Enables conversation list feature (JS).
docs/data/chat/material/examples/agentic-code/ToolStylingC.tsx Enables conversation list + migrates slotProps nesting for message content.
docs/data/chat/material/examples/agentic-code/ToolStylingC.js Enables conversation list + migrates slotProps nesting (JS).
docs/data/chat/material/examples/agentic-code/ToolStylingB.tsx Enables conversation list + migrates slotProps nesting for message content.
docs/data/chat/material/examples/agentic-code/ToolStylingB.js Enables conversation list + migrates slotProps nesting (JS).
docs/data/chat/material/examples/agentic-code/ToolStylingA.tsx Enables conversation list + migrates slotProps nesting for message content.
docs/data/chat/material/examples/agentic-code/ToolStylingA.js Enables conversation list + migrates slotProps nesting (JS).
docs/data/chat/material/examples/agentic-code/AgenticCode.tsx Enables conversation list feature.
docs/data/chat/material/examples/agentic-code/AgenticCode.js Enables conversation list feature (JS).
docs/data/chat/material/conversation-list/ThemedAvatar.tsx Enables conversation list + migrates list slotProps nesting.
docs/data/chat/material/conversation-list/ThemedAvatar.js Enables conversation list + migrates list slotProps nesting (JS).
docs/data/chat/material/conversation-list/RichItemContent.tsx Enables conversation list + migrates list slotProps nesting.
docs/data/chat/material/conversation-list/RichItemContent.js Enables conversation list + migrates list slotProps nesting (JS).
docs/data/chat/material/conversation-list/FullCustomRow.tsx Enables conversation list + migrates list slotProps nesting.
docs/data/chat/material/conversation-list/FullCustomRow.js Enables conversation list + migrates list slotProps nesting (JS).
docs/data/chat/material/conversation-list/CompactRow.tsx Enables conversation list + migrates list slotProps nesting.
docs/data/chat/material/conversation-list/CompactRow.js Enables conversation list + migrates list slotProps nesting (JS).
docs/data/chat/material/composer/ComposerDisabled.tsx.preview Removes outdated preview snippet.
docs/data/chat/material/composer/ComposerDisabled.tsx Migrates composer disabled slotProps nesting.
docs/data/chat/material/composer/ComposerDisabled.js Migrates composer disabled slotProps nesting (JS).
docs/data/chat/material/composer/ComposerCustomPlaceholder.tsx.preview Removes outdated preview snippet.
docs/data/chat/material/composer/ComposerCustomPlaceholder.tsx Migrates composer input slotProps nesting.
docs/data/chat/material/composer/ComposerCustomPlaceholder.js Migrates composer input slotProps nesting (JS).
docs/data/chat/display/unread-marker/unread-marker.md Adds placeholder markdown for unread marker page.
docs/data/chat/display/message-actions/RoleBasedMessageActions.tsx.preview Removes outdated preview snippet.
docs/data/chat/display/message-actions/RoleBasedMessageActions.tsx Migrates to nested message actions slot.
docs/data/chat/display/message-actions/RoleBasedMessageActions.js Migrates to nested message actions slot (JS).
docs/data/chat/display/message-actions/BasicMessageActions.tsx.preview Removes outdated preview snippet.
docs/data/chat/display/message-actions/BasicMessageActions.tsx Migrates to nested message actions slot.
docs/data/chat/display/message-actions/BasicMessageActions.js Migrates to nested message actions slot (JS).
docs/data/chat/display/date-divider/date-divider.md Adds placeholder markdown for date divider page.
docs/data/chat/customization/structure/structure.md Adds placeholder markdown for structure page.
docs/data/chat/customization/overview/overview.md Adds placeholder markdown for customization overview page.
docs/data/chat/customization/look-and-feel/look-and-feel.md Adds placeholder markdown for look-and-feel page.
docs/data/chat/behavior/error-handling/error-handling.md Updates components frontmatter to include new error components.
docs/data/chat/basics/conversation/conversation.md Adds placeholder markdown for conversation page.
docs/data/chat/backend/built-in-adapters/echo-adapter/EchoAdapterDemo.tsx.preview Adds preview snippet for echo adapter demo.
docs/data/chat/backend/built-in-adapters/echo-adapter/EchoAdapterDemo.tsx Adds echo adapter demo source (TS).
docs/data/chat/backend/built-in-adapters/echo-adapter/EchoAdapterDemo.js Adds echo adapter demo source (JS).
docs/data/chat/backend/built-in-adapters/echo-adapter/echo-adapter.md Adds echo adapter documentation page content.
docs/data/chat/backend/built-in-adapters/ai-sdk-adapter/MuiDocsAssistantDemo.tsx.preview Adds preview snippet for AI SDK adapter demo.
docs/data/chat/backend/built-in-adapters/ai-sdk-adapter/MuiDocsAssistantDemo.tsx Adds AI SDK adapter demo source (TS).
docs/data/chat/backend/built-in-adapters/ai-sdk-adapter/MuiDocsAssistantDemo.js Adds AI SDK adapter demo source (JS).
docs/data/chat/all-components/all-components.md Adds placeholder markdown for chat component gallery page.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +4 to +7
"imports": [
"import { MessageError } from '@mui/x-chat/headless';",
"import { MessageError } from '@mui/x-chat/headless';"
],
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed lower in the stack in 9941d6e3dc: chat API docs imports are deduped during generation. This branch has been rebased on that fix.

Comment on lines +484 to +487
const typeAheadRef = React.useRef<{ buffer: string; resetTimer: number | null }>({
buffer: '',
resetTimer: null,
});
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed lower in the stack in 2593e1e5a5: resetTimer now uses ReturnType<typeof setTimeout> | null and the cast was removed. This branch has been rebased on that fix.

Comment on lines 1 to 12
[
{ "name": "ChatAttachmentRejection", "kind": "Interface" },
{ "name": "ChatAttachmentRejectionReason", "kind": "TypeAlias" },
{ "name": "ChatAttachmentsConfig", "kind": "Interface" },
{ "name": "ChatBox", "kind": "Variable" },
{ "name": "chatBoxClasses", "kind": "Variable" },
{ "name": "ChatBoxClasses", "kind": "Interface" },
{ "name": "ChatBoxClassKey", "kind": "TypeAlias" },
{ "name": "ChatBoxFeatures", "kind": "Interface" },
{ "name": "ChatBoxLayoutMode", "kind": "TypeAlias" },
{ "name": "ChatBoxLayoutModeBreakpoints", "kind": "Interface" },
{ "name": "ChatBoxProps", "kind": "Interface" },
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is expected stack noise because the PR targets master: lower dependency branches still appear in the full GitHub diff. The actual #22485 layer is the quickstart/backend docs update on top of #22484; the description tree shows the merge order.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba067dac31

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +116 to +120
const payload = trimmed.startsWith('data:') ? trimmed.slice(5).trimStart() : trimmed;
if (payload === '[DONE]') {
return null;
}
return JSON.parse(payload);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Ignore non-data SSE fields before JSON parsing

parseStreamLine currently tries to JSON.parse any non-empty, non-comment line, so standard SSE metadata lines like event: ... or id: ... will throw and fail the stream with STREAM_ERROR. This breaks valid SSE responses that include those fields (for example when a server/proxy emits event IDs), even though the comment says these lines should be ignored.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed lower in the stack in 849b199246: parseStreamLine now ignores non-data SSE fields such as event:, id:, and retry: before attempting JSON parsing, with test coverage. This branch has been rebased on that fix.

Comment on lines +42 to +48
return resolveMessageAuthor(messagesById[id] ?? null, {
currentUser: parameters.currentUser,
members: parameters.members,
activeConversation,
getMessageAuthorId: parameters.getMessageAuthorId,
getMessageAuthorDisplayName: parameters.getMessageAuthorDisplayName,
getMessageAuthorAvatarUrl: parameters.getMessageAuthorAvatarUrl,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Forward locale role labels into author resolution

useMessageAuthor constructs roleDisplayNames from localized localeText, but chatSelectors.messageAuthor drops that field when calling resolveMessageAuthor. As a result, fallback author labels still come from hard-coded English defaults (User/Assistant/System) whenever a message lacks explicit author names, so localized UIs show incorrect author text.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed lower in the stack in 1dba6392bf: chatSelectors.messageAuthor now forwards parameters.roleDisplayNames, and the localized fallback label path is covered by a regression test. This branch has been rebased on that fix.

@hasdfa hasdfa force-pushed the x-chat-docs-quickstart-backend branch from ba067da to dddc2ba Compare May 18, 2026 14:31
@hasdfa hasdfa force-pushed the x-chat-docs-quickstart-backend branch from dddc2ba to 5cb2524 Compare May 18, 2026 14:45
@hasdfa hasdfa force-pushed the x-chat-docs-quickstart-backend branch from 5cb2524 to 6c8799d Compare May 18, 2026 14:52
@hasdfa hasdfa force-pushed the x-chat-docs-quickstart-backend branch from 6c8799d to a4cc18e Compare May 18, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to the documentation. scope: chat Changes related to the AI chat. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants