Skip to content

fix: clear service worker update interval on unmount#5

Merged
jonathan-beebe merged 1 commit into
mainfrom
fix/003-update-toast-interval-never-cleared
Mar 29, 2026
Merged

fix: clear service worker update interval on unmount#5
jonathan-beebe merged 1 commit into
mainfrom
fix/003-update-toast-interval-never-cleared

Conversation

@jonathan-beebe
Copy link
Copy Markdown
Owner

Summary

  • Store the setInterval ID in a ref and clear it via useEffect cleanup on unmount
  • Prevents interval accumulation when UpdateToast unmounts and remounts
  • Resolves BUG-003

Test plan

  • New test: verifies interval is cleared on unmount (no extra registration.update() calls after unmount)
  • New test: verifies no leaked intervals across multiple mount/unmount cycles
  • Full test suite passes (212 tests)

🤖 Generated with Claude Code

Store the setInterval ID in a ref and clear it in a useEffect cleanup,
preventing interval accumulation across mount/unmount cycles.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 29, 2026

Deploy Preview for golden-scone-6bfeb1 ready!

Name Link
🔨 Latest commit ccadd1e
🔍 Latest deploy log https://app.netlify.com/projects/golden-scone-6bfeb1/deploys/69c93bc20ba0fd00086261ac
😎 Deploy Preview https://deploy-preview-5--golden-scone-6bfeb1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jonathan-beebe jonathan-beebe merged commit b8c3e5b into main Mar 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant