summaryrefslogtreecommitdiff
path: root/web/test/enable-notifications.test.mjs
AgeCommit message (Collapse)Author
10 daysfix: unsubscribe stale push subscription before re-subscribingClaudomator Agent
When the VAPID key changes (e.g. after the key-swap fix), the browser's cached PushSubscription was created with the old key. Calling PushManager.subscribe() with a different applicationServerKey then throws "The provided applicationServerKey is not valid". Fix by calling getSubscription()/unsubscribe() before subscribe() so any stale subscription is cleared. Adds web test covering both the stale and fresh subscription paths. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>