Repository navigation
refactor: share notification banner subscription and drop unused skip reasons - #4490
Merged
Merged
Conversation
… reasons The blocked-notification banner was wiring its own storage, permission, focus, and visibility listeners next to the existing notification store. Reuse that subscribe, persist dismiss in local state, and delete the unused skip-reason analytics surface. Co-authored-by: tyler <tyler@switchback.tech>
tyler-dane
marked this pull request as ready for review
October 16, 2026 01:37
tyler-dane
enabled auto-merge
October 16, 2026 01:37
Contributor
|
Boot bundle: 508.0 KB gzip (+0.0 KB vs main) |
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.
What and why
Nightly simplification of recent merges after #4474, focusing on #4479 (reminder inheritance and the blocked-notification banner) and leftover hour-gutter plumbing from the macOS week-grid rewrite.
The blocked-notification banner no longer duplicates the notification store's storage, permission, focus, and visibility listeners. It subscribes through
subscribeToNotificationState, keeps same-tab dismiss in local state (the Demo Events banner pattern), and drops a redundant windowstoragelistener. Permission analytics live next to the pref they describe. UnusedNotificationSkipReasonvariants and one-call analytics wrappers are gone. Series-master reminder inheritance is a??fallback. The macOS hour gutter no longer takes an unusedgridHeight.Left alone on purpose: dual
notifications_fired/notifications_shown(and skip/show_failed) PostHog events; web vs sync reminder inheritance (old occurrence rows still need the view-model fallback); TimeGrid three-pass hit testing (XCUITest frame workaround); AuthStore success paths; ContactsAPI; TimePicker shortcut harness; Welcome Enter / OverlayPanel.Verify
bun run verify --strictVERDICT: PASS
Checks:
test:sync:fast,test:web(including newNotificationPermissionBannerGatetests),type-check,lint,knip,test:a11y(65/65),test:e2e(247/247). macOS package/UI tests are CI-only (no Xcode on this machine).Note
Low Risk
Refactors subscription wiring and analytics placement with added tests; sync reminder fallback is behavior-preserving simplification.
Overview
Notification blocked banner now listens through shared
subscribeToNotificationStateinstead of re-registering storage, permission, focus, and visibility handlers (and drops a redundant windowstoragelistener). Same-tab dismiss uses local React state plus the existing persistent dismiss flag, matching other banner gates; new component tests cover opt-in, permission prompt, dismiss persistence, and show-failure messaging.Notification plumbing cleanup: permission analytics move into
notification.state; show-failure counts usesessionBrowserStore; thin PostHog wrappers and unused skip-reason types are removed in favor of directtrack()calls in the upcoming notifier.Sync: recurring instance assembly resolves
popupReminderMinuteswith a nullish coalesce from occurrence metadata to series master.macOS:
renderHourGutterno longer accepts an unusedgridHeightargument.Reviewed by Cursor Bugbot for commit da32dd4. Bugbot is set up for automated code reviews on this repo. Configure here.