35 Commits

Author SHA1 Message Date
Aditya Patil
dcd7ad6114
fix: refetch the open channel after background when its window is deep or was jumped to (#2281)
* fix: refetch the open channel after background when its window is deep or was jumped to

* fix: catch up a claimed window instead of replacing it

* fix: bound the deep-window catch-up to what the window can hold

The catch-up merge trims the oldest rows past the window cap, and in a
deep window those are the rows being read — losing them yanked the
scroll. The request is now capped to the window's headroom, and a full
window skips the catch-up; when more arrived than fits, the page
detaches the window and "jump to present" takes over. Adds loader tests
for the replace, catch-up, headroom and full-window cases, and updates
the performance notes.

* fix: refresh the open channel's whole window after a connection break
A window deeper than 70 messages, or one reached by a jump, got no
refresh on resume: new messages, reactions, edits and deletes from the
gap were all missed until the channel was reopened. Tapping a
notification for the open channel did not reopen it, so that could be
a long wait.
The quiet refresh now refetches the window's own span, from its oldest
message up and capped at the window limit, through a new
include_from_message flag on get_newer_messages. The messages being
read are always in the response, so nothing is dropped and the scroll
never moves, at any depth; every loaded message comes back in its
current state, so changes to existing messages land too, and a message
that does not come back is removed. Unchanged messages keep their
objects. This replaces the depth guard and the newer-only catch-up.

* fix: harden the window refresh against reactions, deletes and mid-flight changes

---------

Co-authored-by: Nikhil Kothari <nik.kothari22@live.com>
2026-10-12 15:50:33 +05:30
Nikhil Kothari
526a53e97e fix: try notification bug fix using new start_url 2026-08-17 16:14:37 +05:30
Nikhil Kothari
0bf8ad16ae fix(push): reliable delivery, click routing and toggle state
- always show a notification for pushes on Apple platforms: silent pushes
  (including the app-visible skip) burned WebKit's ~3-strike budget and got
  subscriptions revoked — most-active users lost notifications first
- handle pushsubscriptionchange: open pages re-mint + resync the token
  immediately instead of waiting for the next launch
- store the notification-click URL in the Cache API so it survives the
  worker being killed mid-thaw, and take a second look when the first
  pull comes back empty (page can wake before the worker stores it)
- sweep read notifications when the worker shows one and on every return
  to foreground — push lands seconds after the socket, so the read often
  predates the notification
- delete the push token only on an explicit "denied": iOS misreports
  permission as "default" in notification-opened windows, which silently
  flipped the push toggle off
2026-08-17 12:22:46 +05:30
Nikhil Kothari
94d05b2223 fix(ios): do not block push notifications 2026-08-17 12:17:51 +05:30
Nikhil Kothari
58811fd1c8 fix: clear notifications and redirect to channel reliably 2026-08-17 12:17:29 +05:30
Nikhil Kothari
5394f1ae5e fix: better image previews 2026-08-15 15:12:48 +05:30
Nikhil Kothari
94611a9a1d fix(PWA): close drawers before navigation 2026-08-13 14:46:35 +05:30
Nikhil Kothari
f267dd5b6f fix: fetch image sizes for link previews 2026-08-13 13:35:15 +05:30
Nikhil Kothari
c5b2dd2728 feat(link): seed preview data on message load to avoid layout shift 2026-08-13 13:09:02 +05:30
Nikhil Kothari
5cf8a3ecbd feat: better link search 2026-08-10 12:33:29 +05:30
Nikhil Kothari
7b6fef5326 feat: link previews 2026-08-09 18:39:30 +05:30
Nikhil Kothari
318e59972a chore: update deps 2026-08-09 15:04:46 +05:30
Nikhil Kothari
475e63970f fix: toast font family 2026-08-04 22:10:49 +05:30
Nikhil Kothari
c46b0da8c2 fix: toast loading state 2026-08-04 22:04:24 +05:30
Nikhil Kothari
272e2acdd7 fix: broken thread navigation 2026-08-02 04:39:24 +05:30
Nikhil Kothari
fcc214080c fix: attachment preview modal on mobile 2026-08-02 04:20:45 +05:30
Nikhil Kothari
d335991cd7 feat: inline custom emojis on mobile and fuzzy search in emojis 2026-08-01 15:51:45 +05:30
Nikhil Kothari
918c9f5948 feat: native app like feel on attachment previews 2026-08-01 15:19:40 +05:30
Nikhil Kothari
2ad6a5d5df fix(PWA): back-swipe gesture on Android should close the attachment preview 2026-08-01 14:56:50 +05:30
Nikhil Kothari
fed678e1f1 fix: update unread count immediately locally and handle not visible tabs for unread count posting 2026-07-31 01:35:39 +05:30
Nikhil Kothari
bd32544f2b fix: handle deletion of messages for mentions and threads 2026-07-31 01:16:58 +05:30
Nikhil Kothari
267cf081d9 fix: syncing of unread counts on removing a reaction and on refocus/reconnect 2026-07-31 00:56:46 +05:30
Nikhil Kothari
b91cc4dfa4 fix: flicker on file dropzone in Safari 2026-07-31 00:29:25 +05:30
Nikhil Kothari
21a02b8955 fix: mention warning banner styling 2026-07-31 00:19:12 +05:30
Nikhil Kothari
c1a0c45b6e feat: hover over user name to open hover card 2026-07-29 11:10:11 +05:30
Nikhil Kothari
d5c91c4368 fix: channel creation backswipe bug 2026-07-29 10:33:31 +05:30
Nikhil Kothari
2fe95d503c chore: add PWA ideas 2026-07-28 21:13:28 +05:30
Nikhil Kothari
3b426b9e34 fix: separate photo and video camera action for Android 2026-07-26 04:31:19 +05:30
Nikhil Kothari
313ac1a8fa feat: pull to refresh, swipe to mark as read, error retry for threads and notifications 2026-07-24 19:22:11 +05:30
Nikhil Kothari
90c319be10 fix: wait for drawer to close before navigating 2026-07-24 15:43:16 +05:30
Nikhil Kothari
9ac4beb9f2 fix: do not show line for first date separator in a stream 2026-07-23 17:49:05 +05:30
Nikhil Kothari
3c6f6a80df fix(PWA): do not trigger context menu on long pressing reaction 2026-07-23 16:43:44 +05:30
Nikhil Kothari
cde30bc083 chore: add PWA enhancements doc 2026-07-23 16:17:08 +05:30
Nikhil Kothari
0f657f9aef chore: update docs 2026-07-17 14:10:41 +05:30
Nikhil Kothari
1673b845ac fix: remove not found illustration 2026-07-15 18:23:14 +05:30