Fix sticking scroll logic #3599

Merged
hj merged 10 commits from fix-scroll-bugs into develop 2026-11-03 15:30:53 +00:00
Member

Fixes chats glitching out when scrolled to bottom
Fixes chats not sticking to bottom on new posts
Fixes timeline not sticking to top on new posts
Fix scroll on thread expansion/collapse in userprofile

Fixes chats glitching out when scrolled to bottom Fixes chats not sticking to bottom on new posts Fixes timeline not sticking to top on new posts Fix scroll on thread expansion/collapse in userprofile
hj added 2 commits 2026-11-02 17:38:26 +00:00
dedupe
Some checks failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/changelog Pipeline failed
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/test-e2e Pipeline was successful
e5bb22f159
user profile scrolling fixes
Some checks failed
ci/woodpecker/pr/changelog Pipeline is pending
ci/woodpecker/pr/lint Pipeline is pending
ci/woodpecker/pr/test-e2e Pipeline is pending
ci/woodpecker/pr/test Pipeline is pending
ci/woodpecker/pr/build Pipeline was canceled
6d645ad0e6
lint
Some checks failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/changelog Pipeline failed
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/test-e2e Pipeline was successful
76cfe69ccb
even better shift/stick logic
Some checks failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/changelog Pipeline failed
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/test-e2e Pipeline was canceled
f33c724e20
hj changed title from WIP: Fix sticking scroll logic to Fix sticking scroll logic 2026-11-03 13:31:34 +00:00
"changelog"
Some checks are pending
ci/woodpecker/pr/build Pipeline is pending
ci/woodpecker/pr/changelog Pipeline is pending
ci/woodpecker/pr/lint Pipeline is pending
ci/woodpecker/pr/test-e2e Pipeline is pending
ci/woodpecker/pr/test Pipeline is pending
3cbb6efa38
lint
Some checks failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/changelog Pipeline was successful
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/test-e2e Pipeline was successful
0a6569d57e
lint
All checks were successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/changelog Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/test-e2e Pipeline was successful
c33dd855fd
hj added 2 commits 2026-11-03 15:12:26 +00:00
lint
All checks were successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/changelog Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/test-e2e Pipeline was successful
928c6586a5
Author
Member

/oc review

/oc review
opencode-fix-bot left a comment

opencode-agent:job=167:generation=1

Verdict

No findings. This PR is approved — merge-readiness 5/5.

Scope reviewed

Base-to-head diff (dc1f287 → 928c658), 3 files, +89/−51:

  • src/composables/useVirtualScrolling.js — getShift rewrite with anchor-miss compensation
  • src/components/conversation/conversation.js — scrollOffset rework to measured DOM offsets, height clamping
  • changelog.d/scrollfixes.skip — empty skip file

What I verified

  • Chat stick-to-bottom (invertDirection, sticking): anchor-miss path now scrolls by the exact added-bottom height. The old code scrolled by the full body height here, which matches the reported glitching.
  • Timeline stick-to-top (non-inverted, sticking): anchor-miss path now returns 0 via the isSticking && boundary === 'top' guard, so new posts no longer push a top-anchored view down.
  • Scrolled-away cases still compensate: non-sticking anchor-miss returns the added height at the correct end (beItem → bNearestItem span), equivalent to the old first/last-item fallback.
  • No crash paths: getShift's a[getExtreme(a)] / b[getExtreme(b)] indexing is only reachable when both lists are non-empty (explosion/implosion return earlier), and b[-1]/b[-2] misses safely yield undefined → return 0.
  • -embedded check is real: timeline.js adds the -embedded root class for embedded timelines, so className.includes('-embedded') matches as intended.
  • No new compat burden: findLastIndex is the same ES2023 generation as the findLast it replaces.
  • Minor leftovers, intentionally not raised: the removed top prop is still passed by timeline.vue (falls through as a harmless HTML attribute) and expandOffset = 0 is dead — both nits, no behavior impact.

Validation run

  • Full unit suite at the claimed head: 49 files, 514 passed, 2 skipped, 0 failed (browser-mode vitest; needed build/update-emoji.js + Playwright deps first).
  • biome check on both changed source files: clean.
  • Worktree left byte-for-byte at the claimed head; no commits, pushes, or branches created.
opencode-agent:job=167:generation=1 ### Verdict No findings. This PR is approved — merge-readiness **5/5**. ### Scope reviewed Base-to-head diff (`dc1f287` → `928c658`), 3 files, +89/−51: - `src/composables/useVirtualScrolling.js` — `getShift` rewrite with anchor-miss compensation - `src/components/conversation/conversation.js` — `scrollOffset` rework to measured DOM offsets, height clamping - `changelog.d/scrollfixes.skip` — empty skip file ### What I verified - **Chat stick-to-bottom** (`invertDirection`, sticking): anchor-miss path now scrolls by the exact added-bottom height. The old code scrolled by the full body height here, which matches the reported glitching. - **Timeline stick-to-top** (non-inverted, sticking): anchor-miss path now returns `0` via the `isSticking && boundary === 'top'` guard, so new posts no longer push a top-anchored view down. - **Scrolled-away cases still compensate**: non-sticking anchor-miss returns the added height at the correct end (`beItem` → `bNearestItem` span), equivalent to the old first/last-item fallback. - **No crash paths**: `getShift`'s `a[getExtreme(a)]` / `b[getExtreme(b)]` indexing is only reachable when both lists are non-empty (explosion/implosion return earlier), and `b[-1]`/`b[-2]` misses safely yield `undefined` → `return 0`. - **`-embedded` check is real**: `timeline.js` adds the `-embedded` root class for embedded timelines, so `className.includes('-embedded')` matches as intended. - **No new compat burden**: `findLastIndex` is the same ES2023 generation as the `findLast` it replaces. - **Minor leftovers, intentionally not raised**: the removed `top` prop is still passed by `timeline.vue` (falls through as a harmless HTML attribute) and `expandOffset = 0` is dead — both nits, no behavior impact. ### Validation run - Full unit suite at the claimed head: **49 files, 514 passed, 2 skipped, 0 failed** (browser-mode vitest; needed `build/update-emoji.js` + Playwright deps first). - `biome check` on both changed source files: clean. - Worktree left byte-for-byte at the claimed head; no commits, pushes, or branches created.
hj merged commit 94420874ef into develop 2026-11-03 15:30:53 +00:00
hj deleted branch fix-scroll-bugs 2026-11-03 15:30:53 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pleroma/pleroma-fe!3599
No description provided.