Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

fix: notification delivery, account switching, and unread count toggle#127

Merged
7w1 merged 3 commits into7w1:devfrom
CloudHub-Social:fix/notification-delivery
Mar 5, 2026
Merged

fix: notification delivery, account switching, and unread count toggle#127
7w1 merged 3 commits into7w1:devfrom
CloudHub-Social:fix/notification-delivery

Conversation

@Just-Insane
Copy link
Copy Markdown
Collaborator

@Just-Insane Just-Insane commented Mar 5, 2026

Fixes several notification issues, primarily on iOS, and adds a new appearance setting.

Notification fixes

  • Deep link events no longer repeatedly pull the user back on every incoming message
  • Tapping a notification for a backgrounded account now correctly switches accounts and deep links to the event
  • iOS Safari's event.source = null behaviour no longer silently drops SW postMessages
    • Note that on iOS, it is not possible to get notifications for backgrounded accounts, and clicking on a notification surfacing from a backgrounded account does not currently work.
  • Notification click routing uses postMessage for open clients and openWindow only when the app is closed

New setting

  • Appearance → Visual Tweaks: "Show Unread Counts" toggle — hides numeric counts on room/sidebar badges while keeping the dot indicator (default on)

@Just-Insane Just-Insane marked this pull request as draft March 5, 2026 00:33
@Just-Insane Just-Insane marked this pull request as draft March 5, 2026 00:33
@Just-Insane Just-Insane marked this pull request as ready for review March 5, 2026 03:04
@Just-Insane Just-Insane force-pushed the fix/notification-delivery branch 2 times, most recently from 1ae7328 to 1bb85f2 Compare March 5, 2026 03:21
Evie Gauthier added 3 commits March 4, 2026 22:24
…witching

- HandleNotificationClick moved outside ClientRoot loading gate so SW postMessages
  are never dropped during account-switch reloads
- iOS Safari event.source=null guard removed; type-check used instead
- ToRoomEvent simplified: writes pendingNotificationAtom + sets active session,
  delegates navigation to NotificationJumper
- NotificationJumper: jumpingRef prevents repeated navigation; stable performJumpRef
  avoids re-registering listeners on every atom change during account switch
- BackgroundNotifications: uses SW showNotification for reliable tap routing on iOS;
  dedupeId is now userId+eventId scoped; visibility guard prevents backgrounded
  in-app popups; ref pattern avoids stale closure on settings
- SW: persist/restore notification settings across iOS SW restarts via Cache API;
  group notifications by room (tag + renotify); prefer navigate() over postMessage
  when available; prefer visible tab on notificationclick
- pushNotification: resolveSilent respects tweaks.sound; recipientId in title;
  fallbackNotification removed (redundant)
- RoomTimeline: use ref for handleOpenEvent to stop re-pulling on every new message
…highlight badges

- getUnreadInfo: guard stale-count clamp with roomHaveUnread; exclude own messages
  from clamp trigger; walk live timeline to compute real fallback counts using
  PushProcessor instead of hard-coding dot badge
- roomToUnreadAtom: remove mDirectAtom dependency for DM parent filtering;
  add ClientEvent.Room handler to seed badge state when rooms join
- sessionsHighlightAtom added to track highlight counts per inactive session
- AccountSwitcherTab: show UnreadBadge on inactive session rows and sidebar icon
Hides numeric counts on room and sidebar badges while keeping the dot
indicator active. Defaults to on. Exposed in both Appearance and
Cosmetics settings panels.
@Just-Insane Just-Insane force-pushed the fix/notification-delivery branch from 1bb85f2 to 3a4961e Compare March 5, 2026 03:24
@7w1 7w1 merged commit f5fc86b into 7w1:dev Mar 5, 2026
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants