feat(ui): notifications page polish + dashboard health row#354
Merged
Conversation
Follow-ups on top of the v1.21 Web Push feature, all in System → Notifications. Denied state expands into a banner with the page origin, per-browser unblock instructions picked from navigator.userAgent (Chromium, Firefox, Safari, generic), and a recheck button so users who fix the permission in browser settings don't have to hard-reload to see the page transition out of denied. Forget had a silent re-subscribe loop: ensurePushSubscription on the next page mount re-posted the same endpoint because the live PushSubscription was never revoked. The forget flow now calls sub.unsubscribe() when the row matches the current browser and sets a lerd:notify:auto-subscribe localStorage flag so initNotify skips the silent re-register. A new amber "This browser isn't subscribed" banner appears in granted-plus-forgotten state, and enableNotifications clears the flag whenever the user opts back in. The panel follows the DetailPanel and DetailHeader shape used by DNS, Nginx, Watcher, and Dump-bridge. The master Toggle row is gone, replaced by a single Enable/Disable button in the header trailing slot next to a StatusPill. Category-toggle rows stretch to the full panel width. The sidebar dot, the System Health widget row on the dashboard, and the header pill share one notifyEffectiveOn derivation: permission granted, not autoSubscribeDisabled, master on. The label across the UI is now just "Notifications", plus the docs pages that reference the navigation path. Vitest covers detectBrowserFamily for Chrome, Edge, Opera, Firefox, Safari, and unknown UAs, plus the forget-and-resubscribe loop fix: unsubscribe and flag set on matching endpoint, no-op on a foreign endpoint, initNotify skipping ensurePushSubscription when the flag is set, and enableNotifications clearing it.
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.
Follow-ups on top of the v1.21 Web Push feature, all in System → Notifications.
Denied state expands into a banner with the page origin, per-browser unblock instructions picked from navigator.userAgent (Chromium, Firefox, Safari, generic), and a recheck button so users who fix the permission in browser settings don't have to hard-reload to see the page transition out of denied.
Forget had a silent re-subscribe loop: ensurePushSubscription on the next page mount re-posted the same endpoint because the live PushSubscription was never revoked. The forget flow now calls sub.unsubscribe() when the row matches the current browser and sets a lerd:notify:auto-subscribe localStorage flag so initNotify skips the silent re-register. A new amber "This browser isn't subscribed" banner appears in granted-plus-forgotten state, and enableNotifications clears the flag whenever the user opts back in.
The panel follows the DetailPanel and DetailHeader shape used by DNS, Nginx, Watcher, and Dump-bridge. The master Toggle row is gone, replaced by a single Enable/Disable button in the header trailing slot next to a StatusPill. Category-toggle rows stretch to the full panel width.
The sidebar dot, the System Health widget row on the dashboard, and the header pill share one notifyEffectiveOn derivation: permission granted, not autoSubscribeDisabled, master on. The label across the UI is now just "Notifications", plus the docs pages that reference the navigation path.
Vitest covers detectBrowserFamily for Chrome, Edge, Opera, Firefox, Safari, and unknown UAs, plus the forget-and-resubscribe loop fix: unsubscribe and flag set on matching endpoint, no-op on a foreign endpoint, initNotify skipping ensurePushSubscription when the flag is set, and enableNotifications clearing it.