Skip to content

feat(desktop): notification sound + sender names in titles#501

Merged
wesbillman merged 3 commits into
mainfrom
desktop-notification-sound
May 8, 2026
Merged

feat(desktop): notification sound + sender names in titles#501
wesbillman merged 3 commits into
mainfrom
desktop-notification-sound

Conversation

@wesbillman

Copy link
Copy Markdown
Collaborator

Summary

  • Play a custom notification sound (desktop-notification.mp3) when desktop notifications fire, controlled by a new Notification sound toggle in Settings > Notifications (defaults on, gated behind desktop alerts)
  • Suppress the OS notification sound via silent: true on the Notification constructor to prevent double-ding (matches Slack/Discord behavior)
  • Feed notification titles now include sender display names (e.g. "Kalvin mentioned you in #general" instead of "@Mention in #general")
  • DM notification titles show participant names instead of generic "Direct message"
  • Sender profiles are batch-fetched via useUsersBatchQuery and the notification effect defers dispatch until profiles load to ensure names are present

Test plan

  • Enable desktop notifications and verify sound plays when a notification fires
  • Toggle "Notification sound" off and verify notifications are silent
  • Verify sound toggle is disabled when desktop alerts are off
  • Send a DM and verify the notification title shows participant names
  • Trigger a mention notification and verify it shows sender name + channel
  • Verify no double sound (OS + app) — only our custom mp3 plays
  • Verify existing users get sound enabled by default on upgrade

🤖 Generated with Claude Code

wesbillman and others added 3 commits May 7, 2026 16:35
…titles

Play a custom sound (desktop-notification.mp3) when desktop notifications
fire, with an in-app toggle in Settings > Notifications. OS notification
sound is suppressed via silent:true to avoid double-ding. Feed notification
titles now include sender display names (e.g. "Kalvin mentioned you in
#general") and DM titles show participant names instead of generic
"Direct message". Sender profiles are batch-fetched and the notification
effect defers dispatch until profiles load to ensure names are present.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ormat

Tests expected the old "@Mention in #channel" title format but our PR
now includes sender names, e.g. "alice mentioned you in #general".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When the profile batch query cannot resolve a display name for the
sender (e.g. no kind:0 event on the relay), resolveUserLabel falls
back to a truncated pubkey like "953d3363…001f". This produced
notification titles like "953d3363…001f mentioned you in #channel".

Now we detect the truncated-pubkey fallback and pass undefined as
senderName, so notificationTitle uses the generic format instead
("@Mention in #channel"). Real display names still appear when
profiles are available.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wesbillman wesbillman merged commit 5fff923 into main May 8, 2026
15 checks passed
@wesbillman wesbillman deleted the desktop-notification-sound branch May 8, 2026 00:25
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.

1 participant