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(visual-editing): execute fetches after node connect event #2308

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

rdunk
Copy link
Member

@rdunk rdunk commented Dec 10, 2024

This is an attempted fix for this potential race condition we're seeing where sometimes features that rely on the optimistic actor aren't working as expected.

Instead of nodes fetching (via comlink) the data we need to initialise optimistic features once on app load, we instead perform these fetches each time the node status changes to connected. The hope is that if some disconnect happens, we fetch this data when we have recovered, rather than assuming these fetches will always succeed.

N.b. I haven't had time to test this one as thoroughly as I'd have liked.

@rdunk rdunk requested a review from a team as a code owner December 10, 2024 18:09
Copy link

vercel bot commented Dec 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
live-visual-editing-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 9:32pm
visual-editing-astro ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 9:32pm
visual-editing-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 9:32pm
visual-editing-next-with-i18n ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 9:32pm
visual-editing-nuxt ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 9:32pm
visual-editing-page-builder-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 9:32pm
visual-editing-remix ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 9:32pm
visual-editing-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 9:32pm
visual-editing-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 9:32pm
visual-editing-svelte ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 9:32pm

Copy link
Member

@stipsan stipsan left a comment

Choose a reason for hiding this comment

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

Thank you! We'll give it a thorough try 🙇 💖

@stipsan stipsan merged commit c29a4b3 into main Dec 16, 2024
20 checks passed
@stipsan stipsan deleted the fix/comlink-status branch December 16, 2024 10:50
@ecospark ecospark bot mentioned this pull request Dec 16, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants