Skip to content

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

@FelixMalfait
Copy link
Member

Hey @mdrazak2001 Thanks a lot for this! I tried to re-use your PR and re-work it in different ways but I could never be satisified by the outcome, it always felt dirty. Your attempt was probably the best we could do but I am not comfortable with it.

Instead, I think today I will just re-recreate the basic functionalities of recoil-sync and remove the recoil-sync depedency entirely.

Thanks again!

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

2 participants