Skip to content

refactor: share notification banner subscription and drop unused skip reasons - #4490

Merged
tyler-dane merged 1 commit into
mainfrom
cursor/code-simplification-2594
Oct 16, 2026
Merged

tyler-dane merged 1 commit into
mainfrom
cursor/code-simplification-2594

Conversation

@cursor

@cursor cursor Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

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 window storage listener. Permission analytics live next to the pref they describe. Unused NotificationSkipReason variants and one-call analytics wrappers are gone. Series-master reminder inheritance is a ?? fallback. The macOS hour gutter no longer takes an unused gridHeight.

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 --strict

VERDICT: PASS

Checks: test:sync:fast, test:web (including new NotificationPermissionBannerGate tests), type-check, lint, knip, test:a11y (65/65), test:e2e (247/247). macOS package/UI tests are CI-only (no Xcode on this machine).

Open in Web View Automation 

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 subscribeToNotificationState instead of re-registering storage, permission, focus, and visibility handlers (and drops a redundant window storage listener). 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 use sessionBrowserStore; thin PostHog wrappers and unused skip-reason types are removed in favor of direct track() calls in the upcoming notifier.

Sync: recurring instance assembly resolves popupReminderMinutes with a nullish coalesce from occurrence metadata to series master.

macOS: renderHourGutter no longer accepts an unused gridHeight argument.

Reviewed by Cursor Bugbot for commit da32dd4. Bugbot is set up for automated code reviews on this repo. Configure here.

… 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 tyler-dane added the agent-automerge Agent-loop finished; merge-guard may squash-merge label Oct 16, 2026 — with Cursor
@tyler-dane
tyler-dane marked this pull request as ready for review October 16, 2026 01:37
@tyler-dane
tyler-dane enabled auto-merge October 16, 2026 01:37
@github-actions

Copy link
Copy Markdown
Contributor

Boot bundle: 508.0 KB gzip (+0.0 KB vs main)

@tyler-dane
tyler-dane added this pull request to the merge queue Oct 16, 2026
Merged via the queue into main with commit d8a0e84 Oct 16, 2026
31 checks passed
@tyler-dane
tyler-dane deleted the cursor/code-simplification-2594 branch October 16, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-automerge Agent-loop finished; merge-guard may squash-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants