fix(metadata): invalidate metadata store on SSE reconnect (#22504)#22562
Open
Akash5908 wants to merge 1 commit into
Open
fix(metadata): invalidate metadata store on SSE reconnect (#22504)#22562Akash5908 wants to merge 1 commit into
Akash5908 wants to merge 1 commit into
Conversation
|
👋 Thanks for contributing to Twenty! Your PR has been set to draft while you work on it. Once you're done, mark it as Ready for review and our automated checks will run. Looking forward to your contribution! |
🔍 Visual Regression Review —
|
| Story | Diff % |
|---|---|
| modules-settings-playground-settingsmcpsetup--default | 0% |
View run details · advisory mode
Member
|
Thanks! I'll let the review to someone else in our team as I don't know this part well enough, we used to have an incremental metadata version number, not sure if that's still the case. Maybe we could use this to avoid spamming the backend, I'm afraid of the impact/volume triggered by this change (how often will it try reconnect?). @charlesBochet @Weiko would know best |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
Fixes #22504
Description
This PR fixes a bug where metadata updates (like creating a new field or a page layout) were missed if an open tab was temporarily disconnected from the server (e.g., tab backgrounded or a network blip).
Because the frontend's metadata store relies on live SSE deltas for freshness, any gap in the connection meant the new metadata would never reach the client unless a full reload occurred. This often resulted in "No Data" states for newly created layouts or widgets.
Changes:
SSEClientEffect.tsxto callinvalidateMetadataStore()upon a successful SSE reconnection.Testing
createOneField/page-layoutmutations).