Bug: Push settings says "ON" even when current user is not actually subscribed #2591
Unanswered
hobodave
asked this question in
Ideas and Issue Triage
Replies: 1 comment
-
|
Would it help if I provided a failing test case? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
There is a mismatch between what the Notifications Settings UI says and what the server can actually deliver.
Right now, Settings can show push as enabled based on local browser/PWA subscription state alone. But push delivery is server-side and tied to
Current.user.push_subscriptions.So in account-switch / identity-switch flows, users can see “ON” and still not receive pushes for the current user.
Why this matters
This creates false confidence and makes debugging brutal:
Repro (realistic)
getSubscription().Root cause
Client-side settings state is local-subscription driven.
Server-side delivery is user-row driven.
No status check currently confirms local endpoint is linked to current user.
Proposed fix
GET /users/:id/push_subscription_statushas_server_subscriptionlocal_matches_server(when client sends local endpoint)Notification.permission === "granted"):ONonly whenlocal_matches_server == trueSYNC NEEDEDwhen local exists but server does not matchOFF/BLOCKEDas appropriateScope
Acceptance criteria
The Human Speaks
Yes, Codex wrote most of the above. I am very grateful for Fizzy being open source. I'm using an identical Identity/Account/User multi-tenancy model, and used your notifications implementation as well. This bug took me the better part of a day (even with Codex) to track down. I have a fix in place for my (private) repo. I'm happy to do the work, the solution I (we?) came up with is loosely outlined above. Let me know if I need to fire Codex. 😄
Beta Was this translation helpful? Give feedback.
All reactions