Skip to content

feat(apollo-wind): add chat primitives (Message, Bubble, Attachment, Marker, MessageScroller) - #1291

Open
BenGSchulz wants to merge 1 commit into
mainfrom
feat/apollo-wind-chat-components
Open

BenGSchulz wants to merge 1 commit into
mainfrom
feat/apollo-wind-chat-components

Conversation

@BenGSchulz

@BenGSchulz BenGSchulz commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Lands the shadcn chat primitives from the spike-shadcn-autopilot-chat spike on main as apollo-wind components. These are the building blocks for the Wind renderer of ApChat (epic MST-16172, story MST-16173). No existing component or consumer changes.

  • Message, Bubble, Attachment, Marker: owned source, forwardRef throughout, data-slot on every part, cva variants exported.
  • MessageScroller: styled wrapper over a vendored copy of shadcn's headless MessageScroller (@shadcn/[email protected], commit eda7e539, MIT) in message-scroller/primitive/. Vendored rather than installed because the package passes ref as a plain prop and declares react >=19, which would have forced React 19 on every consumer of the Wind chat components. Local changes: Root/Viewport/Content/Item/Button are forwardRef (Root composes an external ref with its own registration), inert is toggled through the DOM, prop types use ComponentPropsWithoutRef. 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.
  • Utilities: scroll-fade-x/y, shimmer and scrollbar-none in tailwind.utilities.css.
  • MessageScrollerButton takes a strings prop (DEFAULT_MESSAGE_SCROLLER_BUTTON_STRINGS) and supports direction="start".
  • Stories: a new top-level Chat folder in the apollo-wind Storybook. Chat/Components has one page per primitive (the Message Scroller page demonstrates streaming follow, turn anchoring, prepend preservation and the hooks). Chat/Patterns has the Embedded and Fullscreen panel layouts and a Wind vs Material guidance page that links to the primitive pages.
  • Tests: unit tests for all five primitives.

Departures from the spike

  • @shadcn/react is not a dependency (see above); the release-age exclusion is not needed.
  • The spike's InputGroup block-start/block-end addon hack is dropped. The pattern story's composer uses the layout="block" row and body that landed in the meantime.
  • The scroller frame no longer defaults to flex-1; consumers size it (h-*, h-full, or flex-1 in a sized flex column). With flex-1 in an auto-height flex column the frame grew with the transcript.
  • Marker and Attachment use forwardRef instead of React 19 ref-as-prop.

Notes for reviewers

  • The primitive's viewport defaults its aria-label to "Messages" in English; hosts should pass a translated label (noted in the JSDoc).
  • Biome's useExhaustiveDependencies is turned off for message-scroller/primitive/** only: the upstream controller passes a stable refs bag into its callbacks by design.
  • Biome also reordered one pre-existing line in components/ui/index.ts (json-tree-view). The remaining organizeImports failure on src/index.ts is pre-existing on main.
  • Tested under React 19 (the repo's version). The code uses no React 19 APIs, but it has not been executed against a React 18 runtime.

Verification

  • pnpm --filter @uipath/apollo-wind test: 126 files, 2367 tests pass
  • pnpm turbo run build --filter=@uipath/apollo-wind: green; dist/styles.css contains the new utilities; no @shadcn/react references in dist
  • tsc --noEmit and Biome clean on all touched files
  • Storybook: dark theme render of all stories; streaming follow, scroll-up release and the "Scroll to latest" pill checked by hand in Chat/Components/Message Scroller and Chat/Patterns

Plan: https://uipath.atlassian.net/wiki/spaces/CLD/pages/91226013878

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 6, 2026 21:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Apollo Coded App preview deployments are ready.

Project Status Preview Updated (PT)
apollo-design Ready Preview · Logs Oct 07, 2026, 10:30:19 AM
apollo-docs Ready Preview · Logs Oct 07, 2026, 10:30:19 AM
apollo-landing Ready Preview · Logs Oct 07, 2026, 10:30:19 AM
apollo-vertex Ready Preview · Logs Oct 07, 2026, 10:30:19 AM

@github-actions github-actions Bot added the size:XXL 1,000+ changed lines. label Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Dependency License Review

  • ✅ 1937 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1708
ISC 88
Apache-2.0 55
BSD-3-Clause 27
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
MIT-0 3
CC0-1.0 3
MIT OR Apache-2.0 2
(MIT OR Apache-2.0) 2
Unlicense 2
LGPL-3.0-or-later 1
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.3.3 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Storybook visual diff

⚠️ Visual changes detected: 44 added (of 56 compared, 12 unchanged). View report

Baseline is the deployed main Storybook, so changes merged to main after this branch was last updated can also appear here. Logs

Updated (PT): Oct 07, 2026, 10:33:40 AM

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

📊 Coverage + size by package

Per-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.

Package Coverage New-line coverage Packed (gzip) Unpacked vs main
@uipath/apollo-core — — 42.02 MB 50.17 MB ±0
@uipath/apollo-react 48.8% — 7.90 MB 30.86 MB +3.4 KB
@uipath/apollo-ui-icons — — 2.86 MB 6.97 MB ±0
@uipath/apollo-wind 75.9% 92.5% (767/829) 720.1 KB 4.22 MB +41.5 KB
@uipath/ap-chat 85.8% — 43.92 MB 56.80 MB ±0

"Coverage" is each package's own coverage.include scope (e.g. apollo-core instruments only scripts/). "Packed"/"Unpacked" come from npm pack --dry-run and only cover built packages — "—" means not measured this run (package not affected / not built). "vs main" is the packed (gzipped) delta against the last successful main build (the package-sizes artifact from the Release workflow); "—" there means no main baseline was available this run. The baseline is main's latest build, not this PR's exact merge-base, so it includes any drift since the branch diverged. Packages with no vitest config are omitted.

@BenGSchulz BenGSchulz left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Review: one bug (reduced-motion shimmer), one React 18 gap in the vendored useRender, the rest nits. Otherwise matches repo standards; vendored primitive matches upstream eda7e539 apart from the documented changes.

Comment thread packages/apollo-wind/src/styles/tailwind.utilities.css Outdated
Comment thread packages/apollo-wind/src/components/ui/message-scroller/primitive/use-render.ts Outdated
Comment thread packages/apollo-wind/src/components/ui/message-scroller/primitive/README.md Outdated
Comment thread packages/apollo-wind/src/styles/tailwind.utilities.css Outdated
Comment thread packages/apollo-wind/src/components/ui/message-scroller/message-scroller.tsx Outdated
Comment thread packages/apollo-wind/src/components/ui/bubble.tsx Outdated
Copilot AI balanced review requested due to automatic review settings October 6, 2026 22:31
@BenGSchulz
BenGSchulz force-pushed the feat/apollo-wind-chat-components branch from d5a367f to 892422f Compare October 6, 2026 22:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@BenGSchulz
BenGSchulz marked this pull request as ready for review October 6, 2026 23:00
…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]>
Copilot AI balanced review requested due to automatic review settings October 7, 2026 17:23
@BenGSchulz
BenGSchulz force-pushed the feat/apollo-wind-chat-components branch from 892422f to f274e94 Compare October 7, 2026 17:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:apollo-wind size:XXL 1,000+ changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants