Repository navigation
fix: synchronize localStorage clear events across tabs - #7652
Open
suryakant-source wants to merge 3 commits into
Open
suryakant-source wants to merge 3 commits into
suryakant-source wants to merge 3 commits into
Conversation
Contributor
[Medium impact] The PR appears safe to merge. SummaryFixes cross-tab synchronization when
Reviews (1) · Last reviewed commit: "Create +sync-local-storage-clear.bugfix...." · Reviewed by Greptile |
This branch has not been deployed
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.
Closes #7649.
localStorage.clear()sends a storage event withkey === nullto other tabs. That key never matches the configured storage-name map, so synchronized vars keep their old values in those tabs.Queue the existing local-storage synchronization event for each configured synced name when the event has no key. Individual-key events still use the existing lookup. Values are still read at send time, shared-name vars stay grouped, and sessionStorage events remain excluded.
Added three actual-module runtime regressions covering clear events with shared names and unsynced vars, sessionStorage clear events, and configurations with no synced vars. Added a reflex-base news fragment. The clear regression fails on the unchanged template (zero updates instead of two).
Validation:
test_automigrationfails when grouped with some other root tests, so I am not claiming a clean monolithic run.pyright reflex testscould not complete within local memory/time limits. No Python source is changed.Checked the open PRs and issue timeline for competing work before submission. Reviewed the patch for clear-event fanout, shared-name grouping, storage-area exclusion and no-op configurations.