Skip to content

refactor(site): replace custom scroll implementation with react-infinite-scroll-component#24687

Merged
DanielleMaywood merged 3 commits intomainfrom
refactor/site-chat-scroll-library
Apr 23, 2026
Merged

refactor(site): replace custom scroll implementation with react-infinite-scroll-component#24687
DanielleMaywood merged 3 commits intomainfrom
refactor/site-chat-scroll-library

Conversation

@DanielleMaywood
Copy link
Copy Markdown
Contributor

@DanielleMaywood DanielleMaywood commented Apr 23, 2026

Note

🤖 This PR was written by Coder Agent on behalf of Danielle Maywood

Replace the custom Agents chat scroll state machine with react-infinite-scroll-component@7.1.0, following the library's inverse-scroll integration pattern while preserving the floating scroll-to-bottom affordance.

This removes the old bespoke bottom-lock, touch, wheel, resize, and prepend-restoration machinery from ChatScrollContainer, replaces it with the library-managed inverse scroll container, threads messageCount through the page so InfiniteScroll can re-arm correctly after prepends, and rewrites the Storybook coverage around the new contract. The floating "Scroll to bottom" button is added back as a thin overlay that listens to the library-managed scroll container instead of reviving the deleted state machine.

@DanielleMaywood DanielleMaywood marked this pull request as ready for review April 23, 2026 20:46
Copy link
Copy Markdown
Collaborator

@david-fraley david-fraley left a comment

Choose a reason for hiding this comment

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

Stamping per convo with Danielle

@DanielleMaywood DanielleMaywood merged commit 4505278 into main Apr 23, 2026
32 checks passed
@DanielleMaywood DanielleMaywood deleted the refactor/site-chat-scroll-library branch April 23, 2026 21:12
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants