feat(client-state): add bounded host snapshot#5554
Draft
MADPANDA3D wants to merge 1 commit into
Draft
Conversation
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.
Summary
Adds a bounded, versioned client-state snapshot for in-tree consumers. Core-owned providers expose only logical Calendar and Document state: visible/minimized status, Calendar view/date, active document ID, and the foreground view.
The host owns fixed schemas, validates exact types/enums, caps snapshots at 1 KiB, drops unknown provider fields without invoking their getters, and fails unavailable providers closed. It does not serialize DOM, event content, document content, selectors, URLs, or arbitrary module state. No endpoint, Voice Orb UI, or external plugin compatibility promise is added.
Foreground resolution is global before request scoping, so omitting the real foreground never promotes a background view. Existing Calendar Agenda and minimized-state semantics are covered.
Target branch
Linked Issue
Part of #5549. Related to #4118 and discussion #4439.
Type of Change
Checklist
How to Test
Local validation passed 4 focused tests, 12 neighboring Calendar/document tests, and the full JavaScript lane at 333 passed with 4,294 deselected. Node syntax and diff checks passed. Real-browser E2E verified omitted-foreground scoping, actual Agenda, minimized Calendar/document state with an opaque document ID, and zero console errors.
Visual / UI changes
No visible component or styling is added. Existing Calendar and Document modules only register logical state providers and foreground markers.