0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 13:08:40 +08:00
discourse/app/views
Kris 0d45f20935
FIX: improve the reliability of chat sounds (#41373)
Currently chat notification sounds can fail to play when every Discourse
tab was hidden, replayed for the same message when switching to another
tab of the same site (each tab decided independently when the backlog
reached it), and piled up in never-interacted tabs and played on the
first click.

This change answers the requesting tab as primary when no tab is focused
or visible, dedupes alerts across tabs with a short-lived localStorage
containing `chat_message_id`, and drops a sound instead of queuing it
when the audio context is suspended.

It also allows `isPrimaryTab()` to ignore unrelated service worker
messages and fails open after 1s instead of hanging forever.

New tests are included to avoid regressions.
2026-07-02 18:52:41 -04:00
..
about FEATURE: Localizable /about page fields via its settings page (#41123) 2026-06-26 20:41:08 +08:00
admin/backups
application FIX: Respect forced color mode for logo on server-rendered pages (#37032) 2026-01-09 11:33:06 +01:00
badges
categories
common UX: Prevent incomplete crawler localization settings (#41297) 2026-07-01 12:13:22 +08:00
default DEV: Replace JS build system with Rolldown (#35963) 2026-05-29 11:11:55 +01:00
dev_mode DEV: Add /dev-mode endpoint for MiniProfiler auth cookie (#37027) 2026-01-12 10:01:20 +08:00
email UX: add preview to email templates (#36657) 2026-01-08 11:33:53 +04:00
embed DEV: Extract embed post date title into i18n-aware helper (#38594) 2026-03-17 09:12:21 -05:00
exceptions DEV: Replace JS build system with Rolldown (#35963) 2026-05-29 11:11:55 +01:00
finish_installation DEV: escape emails in finish installation (#37665) 2026-02-10 11:53:18 +01:00
groups
home_page DEV: Show login-required splash in root route (take 2) (#32629) 2025-05-14 11:25:43 -04:00
invites
layouts DEV: Drop dead leftovers from the Rolldown migration (#41298) 2026-07-02 12:57:19 +01:00
list FIX: Prevent double-escaping of HTML entities in titles and meta descriptions (#41261) 2026-07-02 20:26:35 +02:00
metadata
offline
posts
published_pages DEV: properly import color-scheme-stylesheets (#36325) 2025-11-28 13:57:22 -06:00
qunit DEV: Fix ember-inspector loading (#41027) 2026-06-18 15:56:11 +01:00
robots_txt
safe_mode
search
session
sitemap
static FIX: improve the reliability of chat sounds (#41373) 2026-07-02 18:52:41 -04:00
tags
topics FIX: Prevent double-escaping of HTML entities in titles and meta descriptions (#41261) 2026-07-02 20:26:35 +02:00
user_notifications DEV: Strip unsubscribe links when sending digest previews to arbitrary addresses (#38298) 2026-03-05 13:58:51 -06:00
users UX: Redesign OmniAuth confirmation page with branded styling (#39290) 2026-04-15 14:46:31 -07:00