Skip to content

fix(fuselage-hooks): handle storage clear events - #2264

Open
YashAnand69 wants to merge 1 commit into
RocketChat:mainfrom
YashAnand69:fix/storage-clear-event
Open

YashAnand69 wants to merge 1 commit into
RocketChat:mainfrom
YashAnand69:fix/storage-clear-event

Conversation

@YashAnand69

@YashAnand69 YashAnand69 commented Sep 27, 2026 •

Copy link
Copy Markdown

Proposed changes (including videos or screenshots)

Handle cross-document storage.clear() events in useStorage. These events have a null key; the hook previously filtered them out and left consumers with stale values. The existing fallback and notification path now runs after confirming the storage area.

Issue(s)

Closes #2263. Independent of #2242, which handles switching the hook's key or storage area.

Further comments

Three clear-event regressions fail before the fix; the unrelated-storage isolation case passes. After the change, all 51 fuselage-hooks suites / 143 tests pass, as do package lint, TypeScript, formatting and diff checks. Coverage includes local and session storage, other-area isolation and the latest fallback. Events are simulated; no multi-tab browser end-to-end test was run. No public API change. Includes a patch changeset. AI-assisted implementation and validation.

@changeset-bot

changeset-bot Bot commented Sep 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c58cdc4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@rocket.chat/fuselage-hooks Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

No deployments
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.

useStorage ignores cross-document storage.clear() events

1 participant