Replace the Wind placeholder with WindChatRenderer, registered as 'wind'
in @uipath/apollo-react/chat. The root carries the ApChatTheme class and
data-density="compact" from spacing.compactMode; overlays portal inside
it. Embedded and FullScreen layouts match Material's footprint, Closed
animates out (reduced-motion aware), and SideBySide renders an explicit
placeholder. The header has title, logo (FullScreen), preview badge,
new chat, settings, history, close and the custom actions menu. Action
icons are lucide names loaded on demand through lucide-react/dynamic;
unknown names show a neutral box. Message list, composer, history and
settings are placeholder regions for the following tickets; the composer
region already shows the configured placeholder and disclaimer.
The renderers are registered by the module that defines ApChat rather
than the package entry, whose statements bundlers drop under
sideEffects when only re-exports are used; that module is listed in
sideEffects. During the exit fade the header keeps the layout's mode and
the panel is inert. The chat CSS no longer scans stories and tests.
Hoisted into chat/headless and adopted by Material:
- useChatHeaderActions / getChatHeaderActionVisibility: visibility rules
and pre-hooked handlers for the header actions
- resolveChatLayout: header, composer, history, settings and fullHeight
rules per mode
- useChatLabels: title, input placeholder and footer disclaimer with
their localized defaults
- publishChatEvent: the single wrapper around the private event bus
- the Autopilot logo, now a component under chat/assets
Add the Apollo React/Chat playground (Embedded, FullScreen, Compare
renderers) driven by args applied in place through the service setters,
with scripted scenarios replayed into both renderers. Its fixtures are
shared with the Material showcase, which keeps all of its stories and
controls. Both renderers share the docked Embedded panel frame. Story
folders are excluded from the published build.
Material's tiptap value sync now skips an editor that was destroyed
when its extensions changed, which threw in production builds, and its
scroll container only narrows its padding for a scrollbar that takes
width: with overlay scrollbars the compensation widened the content,
ended the overflow and flipped back on every resize.
MST-16562
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
First PR of the Wind chat renderer stack for
@uipath/apollo-react/chat(MST-16562).wind/WindChatRenderer.tsxreplacesWindChatPlaceholderand is registered as'wind', soApChatfrom/chatnow renders it by default.ApChatTheme(light,dark,light-hc,dark-hc,future-light,future-dark), so the chat themes itself whatever the host's body class. Alsodata-density="compact"fromspacing.compactMode, anddata-mode/data-statefor styling and tests. Menus and tooltips portal into aPortalContainerProviderboundary inside the themed root. When the host passesportalContainer, they portal into a themed node inside it instead.ApChatThemegainsfuture-lightandfuture-dark(additive, existing values unchanged).isDarkcountsfuture-dark.apolloMaterialUiThemeFutureLightandapolloMaterialUiThemeFutureDarkinMUI_THEME_MAP.lightanddark.setThemedocs,DOCS.md, and theap-chatweb component README and dev page list them.wind/layout/):embeddedContainerthrough the existingChatRootportal.CHAT_WIDTH_FULL_SCREEN_MAX_WIDTH, with right-hand drawers for history and settings. It has the same footprint as Material:100vwbycalc(100vh - 48px), or the full viewport height withfullHeight: false.wind/header/):DropdownMenuSub,disabledanddescriptionhonoured).Button,DropdownMenu,BadgeandTooltip, with lucide icons.disabledFeatures,headerSeparatorandreadOnly.iconvalues are lucide names, kebab-case or the PascalCase export name. They load on demand throughlucide-react/dynamicin a separate chunk, and unknown names render a neutral dashed box. Material keeps taking Material Icons names.The composer region already shows the configured
inputPlaceholderand footer disclaimer.root/ApChat.tsx, the module that definesApChat, not in the package entry;dist/chat/root/ApChat.{js,cjs}is listed insideEffectsnext to the entry (kept so aChatRoot-only import still registers). Production bundlers drop the entry barrel's statements undersideEffects, which left the deployed preview without a Wind renderer.Cannot read properties of null (reading 'nodes')in production builds when the editor was recreated.offsetWidth > clientWidth). With overlay scrollbars (macOS) the compensation widened the content, which ended the overflow and restored the padding on the next resize: the panel jittered whenever content sat within a few pixels of the container height.inert.tailwind.chat.cssno longer scanschat/storiesand test files (@source not).data-slotthe real regions will keep (wind-chat-messages,wind-chat-composer,wind-chat-history,wind-chat-settings); tests query those, not the placeholder names.chatcatalog id with the same default message.Hoisted into
src/chat/headless(Material switched in this PR)hooks/use-chat-header-actions.ts:useChatHeaderActions,getChatHeaderActionVisibilitynewChat,stopResponse,setPrompt(''),clearAttachments), history, settings, full-screen toggle, close, custom actionheader-actions.tsxdrops its own handlers and visibility conditionslayout/chat-layout.ts:resolveChatLayout!readOnly), history and settings availability,fullHeightMaterialChatRenderer.tsxfeeds its layouts from ithooks/use-chat-labels.ts:useChatLabelsheader.tsx,chat-input.tsx,chat-input-footer.tsxutils/publish-chat-event.ts:publishChatEventpublishpicker-provider.tsxcustom header action clickassets/autopilot-logo.tsxheader.tsximports itThese are hooks and pure helpers only. No new contexts, and nothing is added to apollo-wind.
Storybook
pnpm storybook:design(port 6007), then Apollo React / Chat / Playground:chat-story-frame.ts).renderer,mode,locale,compactMode,readOnly,firstRunExperience,customHeaderActions,preHooksdisabledFeaturesflag (disableCloseis three-way because Embedded only shows close for an explicitfalse)title,inputPlaceholder,footerDisclaimerscenario,autoReply,streamDelayMschat event, prefixed[Wind]or[Material].What to try:
compactMode(shorter header,data-density) and the disabled-feature flags.preHookson, confirm and cancel header actions.modetofull-screen(logo appears, close shows by default).Apollo React / Material (Maintenance Only) / Components / Chatkeeps all three stories and every control. Its data now comes fromsrc/chat/stories/chat-story-fixtures.ts.Tests
pnpm --filter @uipath/apollo-react exec vitest --run src/chat src/material/components/ap-chat: 24 files, 138 tests pass. New tests cover:isDarkfor every theme, and Material's theme map including the future themestsc --noEmit -p packages/apollo-react: clean.biome checkon touched files: clean.lingui extractstops on the known pre-existing duplicate idautopilot-chat.error.multiple-files. This PR adds no ids.Stack
Jira: MST-16562
🤖 Generated with Claude Code