Repository navigation
fix(site): add chat input skeleton to prevent layout shift on agent detail - #23439
Merged
Merged
Conversation
…etail The AgentDetailSkeleton (Suspense fallback) rendered a top bar and conversation skeleton but no chat input area. When the lazy-loaded AgentDetail chunk arrived, AgentDetailLoadingView rendered the real AgentChatInput at the bottom, causing a visible layout shift. Add a ChatInputSkeleton that mirrors the dimensions of the real input (rounded-2xl container, min-h-[60px]/sm:min-h-24 textarea area, and bottom toolbar placeholders) so the layout is stable from first paint.
DanielleMaywood
marked this pull request as ready for review
March 23, 2026 12:19
mafredri
reviewed
Mar 23, 2026
mafredri
left a comment
Member
There was a problem hiding this comment.
🤖 Generated by Coder Agent
Skeleton dimensions verified line-by-line against AgentChatInput.tsx and AgentDetailView.tsx. Classes match, placement inside the flex column is correct. No findings from the full review panel.
🤖 LGTM
mafredri
approved these changes
Mar 23, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
When loading a chat with an agent, the
AgentDetailSkeleton(the<Suspense>fallback while the lazy-loadedAgentDetailJS chunk downloads) rendered a top bar skeleton and conversation skeleton but no chat input area at the bottom.Once the chunk loaded,
AgentDetailLoadingViewrendered the same skeleton plus the realAgentChatInput, causing visible layout shift as the input box appeared and pushed the conversation content upward.Fix
Added a
ChatInputSkeletoncomponent that mirrors the dimensions and structure of the realAgentChatInput:shrink-0wrapper with matching padding and scrollbar-guttermax-w-3xlcentered containerrounded-2xlborder/background stylingmin-h-[60px] sm:min-h-24textarea area heightThis ensures the layout is stable from the very first paint through chunk load and data fetch.