The subscribe/disable flow awaited several browser APIs that on certain devices — most reliably iOS Safari in a non-installed PWA — return a Promise that never resolves or rejects (requestPermission, serviceWorker .ready, pushManager.subscribe). When any of them hung, the try/finally never ran, so `busy` stayed true forever: the dashboard nudge button stuck at "..." and the settings toggle refused to flip. Every awaited step is now wrapped in withTimeout(15s). Failures surface as toasts instead of silent hangs (subscribe success, permission denied, generic error). iOS Safari without the site installed to home screen — where Web Push physically cannot work — short-circuits with an add-to-home-screen instruction before we ever try, so we don't burn a timeout waiting for a doomed subscribe(). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| use-prefetch.ts | ||
| use-root-data.ts | ||
| use-toast.ts | ||
| useBadgeCounts.ts | ||
| useCarousel.ts | ||
| useDebounce.ts | ||
| usePushNotifications.ts | ||
| useStoreOwnership.ts | ||
| useWebSocket.ts | ||