Skip to content

fix(site/src/pages/AgentsPage): fire chat-ready after store sync so scroll-to-bottom hits rendered DOM#23693

Open
EhabY wants to merge 3 commits intomainfrom
fix/onchatready-race
Open

fix(site/src/pages/AgentsPage): fire chat-ready after store sync so scroll-to-bottom hits rendered DOM#23693
EhabY wants to merge 3 commits intomainfrom
fix/onchatready-race

Conversation

@EhabY
Copy link
Contributor

@EhabY EhabY commented Mar 26, 2026

onChatReady now waits for the store to have all fetched messages (not just query success), so the DOM has content when the parent frame acts on the signal. Removed the scroll-to-bottom round-trip from onChatReady, the embed page no longer needs the parent to echo a scroll command back.

Also moved autoScrollRef check before the widthChanged guard in ScrollAnchoredContainer's ResizeObserver. The width guard is only relevant for scroll compensation (user scrolled up); it should never prevent pinning to bottom when auto-scroll is active. Also tightened the store sync guard to storeMessageCount < fetchedMessageCount.

@EhabY EhabY self-assigned this Mar 26, 2026
@github-actions github-actions bot added the community Pull Requests and issues created by the community. label Mar 26, 2026
@EhabY EhabY changed the title fix: fire chat-ready after store sync so scroll-to-bottom hits rendered DOM fix(site/src/pages/AgentsPage): fire chat-ready after store sync so scroll-to-bottom hits rendered DOM Mar 26, 2026
@EhabY EhabY removed the community Pull Requests and issues created by the community. label Mar 26, 2026
@EhabY EhabY requested a review from DanielleMaywood March 27, 2026 09:53
@EhabY EhabY force-pushed the fix/onchatready-race branch from 69c4242 to e6a8166 Compare March 27, 2026 10:29
@EhabY EhabY force-pushed the fix/onchatready-race branch from e6a8166 to e163979 Compare March 27, 2026 10:30
applyEmbedTheme(theme);
return;
}
if (event.data?.type === "coder:scroll-to-bottom") {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed this whole thing since now the embed scrolls to the bottom on load anyway

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant