Skip to content

fix: recover timeline after TimelineReset#478

Merged
7w1 merged 1 commit intodevfrom
fix/timeline-reset-recovery
Mar 23, 2026
Merged

fix: recover timeline after TimelineReset#478
7w1 merged 1 commit intodevfrom
fix/timeline-reset-recovery

Conversation

@hazre
Copy link
Copy Markdown
Member

@hazre hazre commented Mar 22, 2026

Description

This PR fixes the reconnect / limited-sync recovery path in the room timeline. Managed to track it down, thanks to this sentry report SABLE-1V

After TimelineReset, the hook now re-anchors live event detection to the current live timeline, allows bottom-pinned recovery to bypass the transient liveTimelineLinked lag, and avoids snapping non-bottom users to latest.

It also adds a regression test covering the reset behavior so the scroll recovery and non-bottom path stay locked down.

Fixes #360

Repro (It's a tricky one):

  • Use a broken build on Android Chrome if possible. Desktop Chrome works too, but mobile/backgrounding is closer to the original report.
  • Open a busy room and stay pinned to the bottom.
  • In another client/account, send several messages to that room while the first client is disconnected.
  • Force a real sync gap:
    • Mobile: background the app/tab, lock the phone, or toggle Wi‑Fi/mobile data off for 30-60s.
    • Desktop: open DevTools and set network to Offline for 30-60s.
  • Reconnect and return to the room.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

AI disclosure:

  • Partially AI assisted (clarify which code was AI assisted and briefly explain what it does).
  • Fully AI generated (explain what all the generated code does in moderate detail).

@hazre hazre requested a review from 7w1 as a code owner March 22, 2026 18:30
@hazre hazre marked this pull request as draft March 22, 2026 18:32
@hazre hazre force-pushed the fix/timeline-reset-recovery branch from 1855de4 to 9999dc2 Compare March 22, 2026 18:33
@hazre hazre force-pushed the fix/timeline-reset-recovery branch from 9999dc2 to 4cd7160 Compare March 22, 2026 18:35
@github-actions
Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

Status Preview URL Commit Alias Updated (UTC)
✅ Deployment successful! https://pr-478-sable.raspy-dream-bb1d.workers.dev 4cd7160 pr-478 Sun, 22 Mar 2026 18:37:30 GMT

@hazre hazre marked this pull request as ready for review March 22, 2026 18:41
@7w1 7w1 added this pull request to the merge queue Mar 23, 2026
Merged via the queue into dev with commit 487221d Mar 23, 2026
9 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Mar 24, 2026
> [!IMPORTANT]
> Merging this PR will create a new release.

## Features

* `Ctrl + K` search menu is now context aware and lists the current
space's rooms at the top.
([#499](#499) by @7w1)
* Add knocking support when attempting to join a room from the
directory, an address, a room mention, or space hierarchy, as well as
text command support for knocking. Also improves rendering for knock
notifications in rooms.
([#470](#470) by @polyjitter)
* Add Android/iOS PWA-specific icon variants.
([#473](#473) by @Septicity)
* Add support for youtube embeds.
([#497](#497) by
@thundertheidiot)
* Add sidebar three dot menu for quick access to related settings
([#474](#474) by @wolterkam)
* Replies that mention the OP are now indicated by the OP username being
prefixed with @ ([#465](#465)
by @mini-bomba)
* Made pin events show a tally of the messages that are pinned.
([#462](#462) by @nushea)

### Improve multiline composer and voice recording
([#476](#476) by @hazre)

- Add a multiline composer layout for longer drafts.
- Keep the voice recorder between composer actions in multiline mode.
- Show the recorder inside the composer on mobile while recording.
- Prevent the composer from expanding when recording starts.
- Make the recorder footer and waveform fit better across screen sizes.
- Let interrupted mobile recording gestures still stop correctly.
- Stabilize wrap detection around edge cases like narrow widths and
trailing spaces.

## Fixes

* Added error messages provided by homeserver to unknown login errors.
([#496](#496) by @7w1)
* Ensure new updates always reload the page properly.
([#502](#502) by @7w1)
* Removed the blocked users moved notice from notifications setting
page. ([#490](#490) by @7w1)
* Fix recieved encrypted message per-message profiles not triggering
rerenders. ([#464](#464) by
@7w1)
* Add `.m4a` files as a recognized audio type.
([#472](#472) by @henk717)
* Fix messages disappearing from rooms after reconnects and timeline
resets. ([#478](#478) by
@hazre)
* Fix Camera being enabled by default even when the client has it off
pre joining in browsers that permit the video (Electron/Tauri as
examples). ([#485](#485) by
@Rawrington)
* Fix cinny-dark-theme link colors being too dark
([#469](#469) by @Elec3137)
* Fix "Default" menu item height in room notification switcher.
([#466](#466) by @polyjitter)
* fix the issue of empty displaynames of a persona, causing an empty
fallback message, it will now ommit the fallback, if the name is empty
or only consists of whitespace
([#495](#495) by @dozro)
* Fixed an Android issue where recording a voice message with headphones
could leave audio stuck in low-quality mode until the app was restarted.
([#476](#476) by @hazre)
* Fixed voice message scrubbing/seeking on Firefox by switching the
recorder from WebM (no seek index) to Ogg/Opus.
([#476](#476) by @hazre)
* fixes touchpad zooming behaviour
([#481](#481) by
@integralfunction)
* Fixes width mismatch for the call chat view.
([#460](#460) by @polyjitter)
* Fix messages sent from sable showing wrong on other client(s)
([#468](#468) by @nushea)

## Documentation

* Updated PR template and CONTRIBUTING.md to add AI disclosure
requirement. ([#456](#456) by
@Rosy-iso)
@hazre hazre deleted the fix/timeline-reset-recovery branch March 31, 2026 12:15
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.

Messages in room randomly disappearing

2 participants