fix: isolate typing indicator animation with geometryGroup to prevent position jumping#24531
Closed
devin-ai-integration[bot] wants to merge 1 commit into
Closed
fix: isolate typing indicator animation with geometryGroup to prevent position jumping#24531devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
… position jumping Co-Authored-By: ashlee@vellum.ai <ashlee@vellum.ai>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds
.geometryGroup()toTypingIndicatorViewto isolate itsrepeatForeverscale animation from parent geometry changes.Problem: The three-dot typing indicator dots bounce erratically in position instead of gently pulsing in scale. This surfaced after PR #24530 changed the outer
MessageListViewframe from.frame(maxWidth:).frame(maxWidth: .infinity)(stable full-width FlexFrame) to.frame(width: computed)(FrameLayout whose width shifts whencontainerWidthupdates from 0→actual).Hypothesis: The
.animation(.easeInOut.repeatForever, value: animate)on each Circle creates a persistent animation context. When parent geometry changes reach the view (LazyVStack repositioning, outer frame resize, ChatView's.animation(VAnimation.fast, value: btwResponse)on the mainContentStack), the persistent context captures those unrelated geometry changes, causing position bouncing.Fix:
.geometryGroup()acts as a barrier — parent geometry changes are resolved to final values before being passed to children, preventing the repeatForever animation from interacting with external layout transitions.Review & Testing Checklist for Human
.geometryGroup(): The typing indicator bubble should render at the correct position and size. Check that the bubble background (rounded rectangle) still wraps the dots tightly with correct padding..geometryGroup()can subtly affect geometry propagation timing.clients/shared/. Verify it compiles and the indicator behaves correctly on iOS as well (if applicable).Notes
.geometryGroup()doesn't fix the jumping, the next approach would be replacing the.animation(_:value:)+repeatForeverpattern withPhaseAnimator(macOS 14+/iOS 17+), which is inherently scoped and cannot leak animation context.MessageListContentView(.frame(width: effectiveBubbleMaxWidth)on the indicator rows) has not changed — this fix targets the animation isolation, not the container sizing.Link to Devin session: https://app.devin.ai/sessions/ef66aadc67724413b3b5ede76cf20ca9
Requested by: @ashleeradka