fix: synchronize localStorage clear events across tabs

SU
2d ago
+72-7

Closes #7649.

localStorage.clear() sends a storage event with key === null to 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:

  • Node VM runtime suite: 35 passed.
  • Compiler suite: 331 passed.
  • Package/compiler suites: 1,448 passed, 12 skipped.
  • Other unit suites were run in smaller groups: 800 CLI; 2,819 package tests; 480 release tests; 310 state tests; 7,505 remaining tests passed. The 3 SQLAlchemy tests pass in isolation, but test_automigration fails when grouped with some other root tests, so I am not claiming a clean monolithic run.
  • Initial full run: 13,117 passed, 78 skipped, 248 CLI failures caused by a shallow checkout reporting Reflex as 0.0.1. Fetching full history and reinstalling reports 0.10.1.dev92; all 800 CLI tests then pass.
  • Pre-commit hooks pass on all changed files, including Biome, codespell and ty. Ruff check and format checks pass repo-wide.
  • Full pyright reflex tests could 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.