Repository navigation
feat(apollo-react): document the Wind chat setup and its delivery - #1399
Open
BenGSchulz wants to merge 1 commit into
Open
BenGSchulz wants to merge 1 commit into
BenGSchulz wants to merge 1 commit into
Conversation
Contributor
Dependency License Review
License distribution
Excluded packages
|
BenGSchulz
force-pushed
the
feat/wind-chat-css-delivery-docs
branch
from
October 16, 2026 23:47
ad58a29 to
c9deece
Compare
This was referenced Oct 16, 2026
Let hosts on @uipath/apollo-react/ap-chat opt in to the Wind renderer with renderer: 'wind': the ap-chat entry registers Wind lazily, so a host that never asks for it does not load it. Both ApChat entries now register their renderers only when the name has none, so whichever entry loads first keeps its registrations: a later entry never swaps the component type under a mounted chat or downgrades a loaded renderer to a lazy one. The <ap-chat> web component stays Material in this release: it uses a Material-only ApChat module that never reaches Wind, and pins Material through a new internal ChatRoot renderer prop, warning once when the service asks for Wind. Resolve Wind's custom icon names against the lucide-react namespace, loaded in its own chunk on first use, instead of the lucide-react/dynamic subpath. lucide-react has no exports map and ships that subpath only as dynamic.mjs, which webpack-style resolvers without .mjs (including the <ap-chat> build) could not find. The namespace also covers lucide's deprecated alias names. The web component build now also resolves .mjs and .cjs. Move the chat documentation to src/chat/DOCS.md, leaving a pointer at the old path, and add the setup for both entries, the styles a host imports (its own Tailwind build with an @source for dist/chat, or the precompiled tailwind.chat.css with its page-wide effects, never two precompiled sheets together), the configuration Wind ignores, the renderer differences decided across the Wind stack and the icon-name contract. Rewrite the Material renderer's CLAUDE.md for the two-renderer layout, drop its Stencil readme, and note that <ap-chat> stays Material. The src/chat import boundary stays lint-enforced. MST-16569 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BenGSchulz
force-pushed
the
feat/wind-chat-css-delivery-docs
branch
from
October 17, 2026 00:26
c9deece to
fdd9588
Compare
BenGSchulz
added this pull request to stack #1374
October 17, 2026 00:37
Contributor
📊 Coverage + size by packagePer-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.
"Coverage" is each package's own |
BenGSchulz
marked this pull request as ready for review
October 17, 2026 00:54
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Eighth PR of the Wind chat renderer stack (MST-16569): CSS delivery, Wind for
ap-chathosts, and the docs for hosts.CSS delivery
src/chat/styles/tailwind.chat.cssalready covered what Wind needs at runtime: the apollo-wind theme (Tailwind, the apollo-core theme variables, apollo-wind's own utilities such asscroll-fade-*), plus the utilities scanned fromsrc/chat(stories and tests excluded) and apollo-wind's built components. No change to it.pnpm build: the builtdist/chat/styles/tailwind.chat.csscontains classes from every area, e.g. headermin-h-16anddata-separator:border-b, message listmb-[var(--chat-message-group-gap)]and@container, markdown[&_math]:text-[1.15em], attachmentsmax-w-[calc(50cqw-4px)]andjustify-end-safe, composer[&_[data-slot=attachment]]:max-w-[calc(50%-4px)], historyborder-selection-indicatorand[@media(hover:none)]:opacity-100, settingsdata-[state=closed]:translate-x-[calc(100%+1rem)]andmotion-reduce:transition-none.package.json:./chat/styles/*.csswas already exported and**/*.cssis insideEffects.@sourcelines for apollo-wind and@uipath/apollo-react/dist/chatand imports no precompiled sheet; a host without one importstailwind.chat.css, with its page-wide effects spelled out (below). Two precompiled sheets should never be combined: each brings its own utility order, so a repeated utility can override one the first sheet ordered after it.Wind for
ap-chathostsApChatfrom@uipath/apollo-react/ap-chatregisters Wind lazily, so a MUI host opts in withrenderer: 'wind'(orsetRenderer('wind')) without changing its imports. Before,renderer: 'wind'fromap-chatfell back to Material with a warning.registerChatRendererIfAbsent, so whichever entry loads first keeps its registrations. An entry loaded later (for example in a code-split route) never swaps the component type under a mounted chat, which would remount it, and never downgrades a loaded renderer to a lazy one. The publicregisterChatRenderer/registerLazyChatRendererstill replace.ap-chat.tsxis now re-export only plus the Wind registration, sodist/material/components/ap-chat/ap-chat.{js,cjs}is added tosideEffects.<ap-chat>stays Material: the element imports a new Material-only module (material/components/ap-chat/ap-chat-material) that never reaches Wind, and pins Material through a new internalChatRootrendererprop, warning once when the service asks forrenderer: 'wind'. Documented in the web component README and DOCS.md.Lucide icons
lucide-reactnamespace insidewind/common/lucide-icon.tsx, whichServiceIconloads withReact.lazy. Kebab-case and PascalCase names work, including lucide's deprecated aliases (alert-circle,AlertCircle,more-horizontal,edit,bar-chart, ...); unknown names show the neutral box; lucide's non-icon exports do not count.lucide-react/dynamic: lucide-react has noexportsmap and ships that subpath only asdynamic.mjs, which the web component's resolver (and webpack's defaults) did not probe; Storybook (Vite) does, so the playground never showed it. The web component build also resolves.mjsand.cjsnow.*IconandLucide*forms). Measured with esbuild: about 704 KB raw / 172 KB gzip, of which the alias names are about 126 KB raw / 27 KB gzip over theiconsmap alone. Before,DynamicIconloaded one small chunk per icon used.Web component dist (production rsbuild)
index.jsNo chunk contains Wind or the lucide icon set: the element cannot reach either.
Docs
material/components/ap-chat/DOCS.mdmoved tosrc/chat/DOCS.md, with a one-line pointer left at the old path for published links. Links updated in the apollo-react README,src/chat/README.md, the web component README and the playground's docs page.enableInternalThemeProviderbeing Material-only, the configuration Wind ignores:theming.scrollBar,theming.chatMenu.groupItemTooltipPlacement, and inspacingeverything butcompactMode,promptBox,messageSpacingandmessageGroupGap),<ap-chat>staying Material.:root, :hostand the theme classes; scrollbar styling under.dark,.dark-hcand.future-dark, so in a MUI host withbody.darkevery scrollbar on the page is restyled;.wireframeresets; the sonner toaster;.mat-typographyresets), Tailwind's preflight in@layer baseresetting unstyled host elements, and utilities that lose to un-layered host rules on the same elements. The host accepts these or uses its own Tailwind build.setRendererin the API table,rendererand the future themes in the configuration type, and theApChatexamples'serviceprop corrected tochatServiceInstance.src/chatimport boundary: lint-enforced by BiomenoRestrictedImports; indirect reach through shared modules such assrc/i18nis left to review.material/components/ap-chat/CLAUDE.mdrewritten for the two-renderer layout: where things live, the rules (hoisting, the MUI boundary, apollo-wind only in Wind, Material for fixes,en.jsononly), and testing.material/components/ap-chat/readme.md(Stencil leftover) deleted.Decided
ap-chat.Found on the way (not changed)
animate-in,fade-in-0,zoom-in-95andslide-in-from-*classes, but nothing defines them (notw-animate-css), so those surfaces open without animation, in apollo-wind's ownstyles.csstoo. A W-10 gap.dist/chat/stories/*.d.tsis emitted by the type build (types only, as before this stack).web-packages/ap-chat/rsbuild.config.tshas a Biome format error and anoUselessTernaryinfo that predate this PR.What to verify
pnpm storybook:design, Apollo React / Chat / Playground,renderer: both, Embedded and FullScreen, light and dark. Message actions scenario withcustomHeaderActionson: the custom icons render (checked: kebab-case, PascalCase and aliases such asalert-circle; a Material icon name shows the neutral box).pnpm --filter @uipath/apollo-react build, then grepdist/chat/styles/tailwind.chat.cssfor the classes listed above;NODE_ENV=production pnpm exec rsbuild buildinweb-packages/ap-chat.Tests
vitest --run src/chat src/material/components/ap-chat src/material/components/ap-tool-call: 63 files, 371 tests pass. New: theap-chatentry renders Material by default and Wind on opt-in; both import orders of the two entries keep the first registrations;registerChatRendererIfAbsent; a pinned renderer with its single warning; the icon-name resolver with aliases.tsc --noEmitclean in both packages;biome checkon touched files: no new diagnostics.pnpm --filter @uipath/apollo-react buildand the web component production build pass.Stack
Jira: MST-16569
🤖 Generated with Claude Code