…Marker, MessageScroller)
Land the shadcn chat primitives from the spike-shadcn-autopilot-chat branch on
main as apollo-wind components, the building blocks for the Wind renderer of
ApChat.
- MessageScroller styles a vendored copy of shadcn/ui's headless MessageScroller
(packages/react/src/message-scroller and use-render at @shadcn/[email protected],
commit eda7e539, MIT) in message-scroller/primitive. The published package
passes ref as a plain prop and declares react >=19 as a peer, so it cannot
be used by React 18 consumers; the vendored copy converts Root, Viewport,
Content, Item and Button to forwardRef (Root now composes an external ref
instead of letting it replace its own registration) and toggles `inert`
through the DOM. The primitive's own unit tests are vendored with it. The
README in that folder records the upstream commit and local changes for
future syncs.
- Message, Bubble, Attachment and Marker are owned source. Marker and
Attachment use forwardRef like the rest of apollo-wind instead of the React
19 ref prop the spike used. Every part carries a data-slot.
- MessageScrollerButton takes a strings prop (DEFAULT_MESSAGE_SCROLLER_BUTTON_STRINGS)
and supports direction="start".
- scroll-fade-x/y, shimmer and scrollbar-none utilities live in
tailwind.utilities.css; scrollbar-none did not exist and AttachmentGroup
needs it.
- The spike's InputGroup block-start/block-end addon hack is dropped: the
pattern story's composer uses the InputGroup layout="block" row and body
that landed since.
- Stories under Components/Chat for each primitive, plus the Patterns/Autopilot
Chat panel and the Wind vs Material guidance, reworded to say the service
gaps are planned, not inherent.
- Unit tests for all five primitives.
Refs MST-16173
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Summary
Lands the shadcn chat primitives from the
spike-shadcn-autopilot-chatspike onmainas apollo-wind components. These are the building blocks for the Wind renderer ofApChat(epic MST-16172, story MST-16173). No existing component or consumer changes.forwardRefthroughout,data-sloton every part,cvavariants exported.@shadcn/[email protected], commiteda7e539, MIT) inmessage-scroller/primitive/. Vendored rather than installed because the package passesrefas a plain prop and declaresreact >=19, which would have forced React 19 on every consumer of the Wind chat components. Local changes: Root/Viewport/Content/Item/Button areforwardRef(Root composes an external ref with its own registration),inertis toggled through the DOM, prop types useComponentPropsWithoutRef. Upstream's unit tests (message-scroller.test.tsx,geometry.test.ts) are vendored alongside and pass. The folder README records the upstream commit, the local changes to keep, and how to sync.scroll-fade-x/y,shimmerandscrollbar-noneintailwind.utilities.css.MessageScrollerButtontakes astringsprop (DEFAULT_MESSAGE_SCROLLER_BUTTON_STRINGS) and supportsdirection="start".Departures from the spike
@shadcn/reactis not a dependency (see above); the release-age exclusion is not needed.InputGroupblock-start/block-endaddon hack is dropped. The pattern story's composer uses thelayout="block"row and body that landed in the meantime.flex-1; consumers size it (h-*,h-full, orflex-1in a sized flex column). Withflex-1in an auto-height flex column the frame grew with the transcript.forwardRefinstead of React 19 ref-as-prop.Notes for reviewers
aria-labelto "Messages" in English; hosts should pass a translated label (noted in the JSDoc).useExhaustiveDependenciesis turned off formessage-scroller/primitive/**only: the upstream controller passes a stable refs bag into its callbacks by design.components/ui/index.ts(json-tree-view). The remainingorganizeImportsfailure onsrc/index.tsis pre-existing onmain.Verification
pnpm --filter @uipath/apollo-wind test: 126 files, 2367 tests passpnpm turbo run build --filter=@uipath/apollo-wind: green;dist/styles.csscontains the new utilities; no@shadcn/reactreferences indisttsc --noEmitand Biome clean on all touched filesPlan: https://uipath.atlassian.net/wiki/spaces/CLD/pages/91226013878
🤖 Generated with Claude Code