Skip to content

Fix chat tail-follow jitter and layout-safe geometry#2002

Merged
crossle merged 2 commits into
mainfrom
fix/chat-tail-follow-jitter
Jul 1, 2026
Merged

Fix chat tail-follow jitter and layout-safe geometry#2002
crossle merged 2 commits into
mainfrom
fix/chat-tail-follow-jitter

Conversation

@YeungKC

@YeungKC YeungKC commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Keep the old bottom position during tail-follow appends so new messages animate from the previous bottom instead of snapping first.
  • Let the clamping viewport skip one automatic bottom correction when the chat coordinator has a tail-follow anchor.
  • Treat not-yet-laid-out message geometry as unavailable for the current frame, preventing gray error frames during chat rebuilds.
  • Add regression coverage for bottom appends and the existing scroll restore paths.

Testing

  • flutter test test/ui/home/chat/chat_scroll_coordinator_test.dart
  • dart analyze lib/ui/home/chat/chat_scroll_coordinator.dart
  • dart analyze on the affected chat scroll and clamping viewport files
  • Profile smoke check with chat jump/scroll trace enabled

@YeungKC YeungKC requested review from boyan01 and crossle June 29, 2026 10:17
@YeungKC YeungKC changed the title Fix chat tail-follow jitter on new messages Fix chat tail-follow jitter and layout-safe geometry Jun 29, 2026
@crossle crossle merged commit 6424c6e into main Jul 1, 2026
3 checks passed
@crossle crossle deleted the fix/chat-tail-follow-jitter branch July 1, 2026 12:20
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.

2 participants