Repository navigation
feat: support browser notifications for remotes - #996
Merged
paulinevos merged 3 commits intoOct 23, 2026
Merged
Conversation
paulinevos
commented
Oct 22, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Alert coordination can produce unwanted cross-tab notifications and miss unread org messages when membership events follow them.
3 open issues
What changed in this PR
Adds browser notifications and sound to Remotes, with per-browser preferences and account-wide conversation mutes integrated into the existing chat system.
Changes:
- Adds background alert polling, permission controls, cooldown handling, and notification navigation.
- Adds timed and permanent mutes through web/API endpoints, chat menus, and account exports.
- Expands tests and documentation, and clears stale attachment errors in the composer.
| File | Description |
|---|---|
| tests/Unit/RemoteNotifications.test.tsx | Tests alert filtering, cooldowns, permissions, and polling. |
| tests/Unit/ImageAttachments.test.tsx | Tests clearing attachment errors without removing images. |
| tests/Unit/Actions/DeleteUserTest.php | Verifies mute cleanup on account deletion. |
| tests/tsconfig.json | Includes notification tests in type checking. |
| tests/Feature/Controllers/ExportControllerTest.php | Tests account-scoped mute exports. |
| tests/Feature/Controllers/ConversationMuteControllerTest.php | Tests web mute behavior and authorization. |
| tests/Feature/Controllers/Api/ConversationMuteControllerTest.php | Tests API mute behavior and authorization. |
| tests/draft-images.config.ts | Registers notification tests. |
| routes/web.php | Adds web mute routes. |
| routes/api.php | Adds API mute routes. |
| resources/js/types/conversation.ts | Adds mute timestamps to chat types. |
| resources/js/lib/remote-notifications.ts | Implements notification preferences, filtering, sound, and cooldowns. |
| resources/js/lib/chat.ts | Integrates alerts, focus-aware reads, and mute updates. |
| resources/js/layouts/app-layout.tsx | Starts alerts for eligible signed-in users. |
| resources/js/hooks/use-image-attachments.ts | Exposes attachment-error clearing. |
| resources/js/hooks/use-chat.ts | Adds alert preference and lifecycle hooks. |
| resources/js/components/remotes-setting.tsx | Adds notification preference and permission controls. |
| resources/js/components/chat/conversation-thread.tsx | Handles focus-aware reads and clears composer errors. |
| resources/js/components/chat/conversation-actions.tsx | Adds mute and unmute controls. |
| public/sw.js | Handles service-worker notification clicks. |
| PRODUCT.md | Updates the notification feature summary. |
| KNOWLEDGE_BASE.md | Documents alert behavior and conversation mutes. |
| database/migrations/2026_10_22_120000_add_muted_until_at_to_conversation_participants_table.php | Stores participant-specific mute expiry. |
| app/Queries/ConversationThreadQuery.php | Returns active mute timestamps in threads. |
| app/Queries/ConversationsQuery.php | Includes active mute timestamps in inbox summaries. |
| app/Models/ConversationParticipant.php | Casts and documents participant mute timestamps. |
| app/Models/Conversation.php | Casts and documents selected mute timestamps. |
| app/Http/Resources/OrgThreadResource.php | Updates the documented org-thread shape. |
| app/Http/Resources/ConversationThreadResource.php | Updates the documented direct-thread shape. |
| app/Http/Resources/ConversationResource.php | Documents mute data in inbox summaries. |
| app/Http/Requests/UpdateOrgMuteRequest.php | Authorizes and validates web org mutes. |
| app/Http/Requests/UpdateConversationMuteRequest.php | Authorizes and validates web direct mutes. |
| app/Http/Requests/UpdateApiOrgMuteRequest.php | Authorizes and validates API org mutes. |
| app/Http/Requests/UpdateApiConversationMuteRequest.php | Authorizes and validates API direct mutes. |
| app/Http/Controllers/OrgMuteController.php | Handles web org mute updates. |
| app/Http/Controllers/ConversationMuteController.php | Handles web direct mute updates. |
| app/Http/Controllers/Api/OrgMuteController.php | Handles API org mute updates. |
| app/Http/Controllers/Api/ConversationMuteController.php | Handles API direct mute updates. |
| app/Enums/ConversationMuteDuration.php | Defines mute durations and expiry calculation. |
| app/Actions/UpdateConversationMute.php | Persists the current participant’s mute. |
| app/Actions/CreateExport.php | Exports mute preferences and shares recipient formatting. |
Review effort: Balanced
Clear text and attachment errors when editing or sending, without discarding valid attachments. Amp-Thread-ID: https://ampcode.com/threads/T-01a164f2-f78a-744d-9919-ba1ca2383eed Co-authored-by: Pauline Vos <pvos88@gmail.com>
paulinevos
force-pushed
the
remotes-notifications
branch
from
October 22, 2026 21:01
e0781b7 to
4caa831
Compare
xHeaven
reviewed
Oct 22, 2026
Member
|
paulinevos
force-pushed
the
remotes-notifications
branch
3 times, most recently
from
October 23, 2026 08:34
8eac917 to
80d65a8
Compare
paulinevos
force-pushed
the
remotes-notifications
branch
from
October 23, 2026 10:09
80d65a8 to
f5eb8a1
Compare
paulinevos
force-pushed
the
remotes-notifications
branch
from
October 23, 2026 10:41
f5eb8a1 to
827043f
Compare
paulinevos
force-pushed
the
remotes-notifications
branch
from
October 23, 2026 11:16
827043f to
4bad0d0
Compare
Support one-hour, eight-hour, week-long, permanent, and cleared mutes for direct conversations and orgs through web and signed API endpoints. Expose only the current participant’s preference, preserve unread counts, and include mutes in export and account deletion coverage. Amp-Thread-ID: https://ampcode.com/threads/T-01a164f2-f78a-744d-9919-ba1ca2383eed Co-authored-by: Pauline Vos <pvos88@gmail.com>
Enable alerts by default in account profile settings, subject to browser permission. Play the supplied sound, keep notification text private, and share focused reading state and a ten-second cooldown across tabs without replaying suppressed arrivals. Track incoming messages independently of org events. Add timed mute and unmute controls, and avoid marking messages read in hidden or unfocused windows. Co-authored-by: Pauline Vos <pvos88@gmail.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a164f2-f78a-744d-9919-ba1ca2383eed
paulinevos
force-pushed
the
remotes-notifications
branch
from
October 23, 2026 11:47
4bad0d0 to
d2b3bcf
Compare
| (item) => | ||
| (item.last_incoming_message_id ?? 0) > | ||
| (previous[item.id] ?? 0) && | ||
| item.ahead > 0 && |
This was referenced Oct 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Turning off notification sounds in account settings:
Muting a specific remote:
