You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 40a00b7
Browse filesBrowse the repository at this point in the historyBrowse files
Expose Solo region state before a component mounts (#3296)
## Why
A plugin can change a saved Solo region filter before its component
mounts. It needs the same state that the host gives the component.
## What
`SoloRegionHandle.state(binding)` exposes `get()`, `set(value)`, and
`subscribe(listener)`. Component props use the same state path.
## How
The API reuses the existing device record and its 16 KiB limit. Bindings
include scope, viewer, and incarnation. Binding abort and source
disposal remove subscriptions. The last write wins. No relay reads or
writes are added.
Closes#3295.
## Risk
The region state path serves plugins in the sidebar. Reads throw for an
ended binding or unreadable state without an accepted memory value.
Existing saved keys and UI controls stay the same.
## Testing
The shipping review finds one cache-order defect. The fix preserves a
newer write from a subscriber and restores the prior cache when a write
fails. The regression fails before the fix and passes after it. The
human author explicitly waives the manual test for this API-only change.
One new browser case checks real storage events between windows and
restore after reload. Vitest covers the other state and lifetime cases.
No browser cases are removed.
## Bigger picture
Consumers must require a host release with this API before they depend
on it.
buzz-review-completed
Generated with Codex
---------
Signed-off-by: Daniel Rouleau <[email protected]>
Co-authored-by: Codex <[email protected]>
0 commit comments