feat(ui): add strict foreground action registry#5553
Draft
MADPANDA3D wants to merge 2 commits 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 strict browser-owned registry for three fixed foreground actions: open Calendar, close Document, and minimize Document. The v1 envelope is versioned, capped at 1 KiB, requires an empty payload, and rejects unknown fields, targets, selectors, URLs, markup, and executable text.
This PR adds only the host seam and existing-module handlers. It does not add a server emitter, Voice Orb UI, client-state reporting, or a plugin compatibility promise. Existing legacy UI-control behavior remains unchanged.
Target branch
Linked Issue
Part of #5549. Related to #4118 and discussion #4439.
Type of Change
Checklist
How to Test
Local validation covered 22 targeted tests plus Ruff, formatting, Node syntax, Python compilation, and diff checks. Live FastAPI + Playwright passes exercised all three actions, verified the service-worker cache contained the module, rejected an unknown selector-bearing action with unknown_action, and observed zero browser console errors. The minimized-document close path also cleared its persisted restore marker and remained closed after reload.
Visual / UI changes
No new visible component or styling is introduced. The actions operate existing Calendar and Document surfaces.