Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle recoil url sync initialization in Firefox #10597

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mdrazak2001
Copy link
Contributor

@mdrazak2001 mdrazak2001 commented Mar 1, 2025

fixes #10596

firefox_fix.mp4
  • Add SafeRecoilURLSync wrapper component to handle Firefox-specific timing issues
  • Implement error handling for "Snapshot has already been released" errors
  • Add 300ms delay for Firefox Recoil state initialization
  • Provide fallback rendering without URL sync when needed

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR adds a Firefox-specific fix for Recoil URL synchronization issues by implementing a custom error handling wrapper component.

  • Added new packages/twenty-front/src/modules/error-handler/components/SafeRecoilURLSync.tsx component that catches and handles "Snapshot has already been released" errors
  • Implemented Firefox detection with a 300ms initialization delay to prevent timing issues
  • Modified App.tsx to use the new SafeRecoilURLSync wrapper instead of direct RecoilURLSyncJSON usage
  • Added fallback rendering that bypasses URL sync when errors are detected, ensuring the application remains usable
  • Properly handles cleanup of event listeners and timeouts to prevent memory leaks

2 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

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.

Twenty is unusable on Firefox
1 participant