Skip to content

fix(scroll): suppress pin-bottom repaint during MAM catch-up#925

Merged
mremond merged 1 commit into
mainfrom
mr/amazing-visvesvaraya-e68bb6
Jul 8, 2026
Merged

fix(scroll): suppress pin-bottom repaint during MAM catch-up#925
mremond merged 1 commit into
mainfrom
mr/amazing-visvesvaraya-e68bb6

Conversation

@mremond

@mremond mremond commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Entering a room that needs forward MAM catch-up pages in history over ~1-2s; each page merge grew scrollHeight and forced a WebKit repaint (~12ms) on every re-pin, so the bottom-follow loop never converged within its frame budget — producing a visible jump once catch-up finally settled.
  • shouldForceRepaint now takes a suppressForBackgroundLoad flag: the forced repaint is skipped while isLoadingOlder (MAM query in flight) is true, since WebKit never painted those intermediate positions anyway.
  • A new effect fires one clean settle pin exactly when isLoadingOlder transitions true → false while the reader is at the bottom, so the final position always lands correctly even when the last MAM page brings no further message-count change.

…once on completion

Entering a room that needs forward MAM catch-up pages in history over ~1-2s;
each merge grew scrollHeight and forced a WebKit repaint (~12ms) on every
re-pin, so the bottom-follow loop never converged within its frame budget
and the view visibly jumped once catch-up finally settled. The repaint is
now suppressed while isLoadingOlder is true (WebKit never painted those
intermediate positions anyway), and a single clean settle pin fires once
catch-up completes.
@mremond mremond added this to the 0.17.1 milestone Jul 8, 2026
@mremond mremond merged commit f842933 into main Jul 8, 2026
3 checks passed
@mremond mremond deleted the mr/amazing-visvesvaraya-e68bb6 branch July 8, 2026 16:19
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