Chat no longer blank after Group info → Back #3

Merged
fmodf merged 1 commit from fix/room-info-back into master 2026-10-19 20:28:29 +00:00
Owner

Report: in a group, tap the header for Group info, tap Back, and the chat is empty; pulling the list up brings the history back.

Cause. Every return to the chat opens it afresh: the rows are cleared and the newest page is read again.

  • ScrollEngine.reloadAll reloaded the empty list and restored the old rows' position snapshot onto it. That left contentOffset at 895 over a content height of 0.
  • The collection view then reported isScrollAnimating with no animation that ever ends.
  • isBusy held, so the page arriving a moment later was parked in pendingParent. Only the end of a drag drained it.

Fix. An update that leaves no rows puts the offset at the top, without animating, and restores no snapshot. The next page lands through initialLoad at the bottom.

Tested in the iPhone 18 Pro simulator (iOS 27.0), with a test account on another.im in a group of its own:

  • Reproduced first. A log of the scroll engine's state showed off=895 content=0 isScrollAnimating=1 and the 16 rows parked.
  • After the fix: history shown at the bottom on two returns from Group info in a row.
  • gmake test: 359 tests, 0 failures.

Not tried: Contact info in a 1:1 chat, which goes the same way. No unit test: the coordinator is private to the representable and needs a laid-out collection view.

Touches ScrollEngine.swift, as does #4; the two merge cleanly.

🤖 Generated with Claude Code

Report: in a group, tap the header for Group info, tap Back, and the chat is empty; pulling the list up brings the history back. **Cause.** Every return to the chat opens it afresh: the rows are cleared and the newest page is read again. - `ScrollEngine.reloadAll` reloaded the empty list and restored the old rows' position snapshot onto it. That left `contentOffset` at 895 over a content height of 0. - The collection view then reported `isScrollAnimating` with no animation that ever ends. - `isBusy` held, so the page arriving a moment later was parked in `pendingParent`. Only the end of a drag drained it. **Fix.** An update that leaves no rows puts the offset at the top, without animating, and restores no snapshot. The next page lands through `initialLoad` at the bottom. **Tested** in the iPhone 18 Pro simulator (iOS 27.0), with a test account on another.im in a group of its own: - Reproduced first. A log of the scroll engine's state showed `off=895 content=0 isScrollAnimating=1` and the 16 rows parked. - After the fix: history shown at the bottom on two returns from Group info in a row. - `gmake test`: 359 tests, 0 failures. Not tried: Contact info in a 1:1 chat, which goes the same way. No unit test: the coordinator is private to the representable and needs a laid-out collection view. Touches `ScrollEngine.swift`, as does #4; the two merge cleanly. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fmodf force-pushed fix/room-info-back from 47b020051f to d1d5ec6c2a 2026-10-19 20:17:23 +00:00 Compare
fmodf merged commit 1ac2d54dfc into master 2026-10-19 20:28:29 +00:00
fmodf deleted branch fix/room-info-back 2026-10-19 20:28:29 +00:00
Sign in to join this conversation.
No reviewers
No labels
done
fixed
returned
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
another-im/anotherim-swift!3
No description provided.