Skip to content

fix: isolate typing indicator animation with geometryGroup to prevent position jumping#24531

Closed
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1775707631-fix-typing-indicator-jumping
Closed

fix: isolate typing indicator animation with geometryGroup to prevent position jumping#24531
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1775707631-fix-typing-indicator-jumping

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot commented Apr 9, 2026

Summary

Adds .geometryGroup() to TypingIndicatorView to isolate its repeatForever scale 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 MessageListView frame from .frame(maxWidth:).frame(maxWidth: .infinity) (stable full-width FlexFrame) to .frame(width: computed) (FrameLayout whose width shifts when containerWidth updates 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.

⚠️ This fix is based on code analysis only — it could not be tested locally (native macOS/iOS app). The hypothesis is plausible but not empirically confirmed.

Review & Testing Checklist for Human

  • Dots stop jumping: Open a conversation in thinking state. Verify the three dots pulse gently in scale within their bubble background — no erratic vertical/horizontal bouncing. Test on both fresh launch and conversation switch.
  • Animation still looks correct: The staggered easeInOut wave pattern (0.18s offset per dot) should be preserved. No stuttering, no delayed animation start, no frozen dots.
  • No layout regression from .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.
  • iOS build and behavior: This file is in clients/shared/. Verify it compiles and the indicator behaves correctly on iOS as well (if applicable).

Notes

  • If .geometryGroup() doesn't fix the jumping, the next approach would be replacing the .animation(_:value:) + repeatForever pattern with PhaseAnimator (macOS 14+/iOS 17+), which is inherently scoped and cannot leak animation context.
  • The indicator code in 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


Open with Devin

… position jumping

Co-Authored-By: ashlee@vellum.ai <ashlee@vellum.ai>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Contributor Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@ashleeradka ashleeradka deleted the devin/1775707631-fix-typing-indicator-jumping branch April 15, 2026 13:48
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