Contain window-reveal play failures and stop over-promising owner - #464
Merged
Conversation
`Element.animate()` throws on an easing it cannot parse, and it did so at play time — after the opaque armed surface was already covering the window, and before any finish handler was attached. The window stayed covered on every subsequent load, and the throw escaped into the WINDOW_CONTENT_LOADED action, cutting off the loading-overlay teardown and the remaining subscribers. Three layers of containment: - Registration rejects an easing the browser cannot parse — a throwaway KeyframeEffect runs the same parser animate() uses, so the string dies with a stack frame at registration instead. - playWindowReveal survives a throwing animate() (a def injected via the `desktop-mode.window-reveals` filter never went through registration) by dropping that layer, and clears the `--revealing` pin when every layer bailed. - The play-time def lookup survives a throwing filter callback by degrading to "no reveal": layers removed, content uncovered. Also aligns the docs with what ships. `owner` on a reveal def was documented as live-unregister-on-deactivate, but nothing sweeps reveals by owner yet — there is no PHP script-registration companion (same known gap as palettes) — so the docs now call it a grouping tag that starts working the moment the sweep lands. And the default-flip commit missed docblocks still claiming `'sweep'` as the shipped default and "five" built-ins: the default is `'none'` and there are twelve.
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.
Follow-up to #459, fixing review findings that surfaced after it merged.
Play failures could strand a window under the armed surface
Element.animate()throws on an easing it cannot parse — at play time, after the opaque armed surface is already covering the window and before any finish/cancel handler is attached. The exception escapedplayWindowRevealinto theWINDOW_CONTENT_LOADEDaction, so the window stayed covered on every load, the loading-overlay teardown never ran, and the remaining subscribers for that event were cut off. The custom-render path already guarded its third-party callback; the clip-path path now gets the same containment:easing. A throwawayKeyframeEffectruns the same parseranimate()uses, so the bad string dies with a stack frame at registration time. Environments without the Web Animations API accept everything — they never callanimate().playWindowRevealsurvives a throwinganimate()(a def injected through thedesktop-mode.window-revealsfilter never went through registration) by dropping that layer, and it now clears the--revealingpin when every layer bailed.ownerwas documented as something it does not doThe reveal def table, the example, and the
registerWindowRevealdocblock all saidownergets a reveal live-unregistered on plugin deactivation.unregisterWindowRevealsByOwner()exists, but nothing calls it on the deactivation path — reveals have no PHP script-registration companion yet, the same known gap as palettes that the reference already acknowledged a paragraph later. The docs now describeowneras a grouping tag that starts working the moment the sweep lands, rather than promising a sweep that does not exist. Wiring the actual sweep (payload key +src/reveals/server-sync.ts, per the established pattern) is left as a follow-up since it adds PHP API surface.Stale docblocks from the default flip
The commit that defaulted reveals to off missed two docblocks still claiming
'sweep'as the shipped default (src/settings/registry.ts,src/settings/types.ts— the file the JS reference names as the authoritative snapshot shape) and two more claiming "five built-ins" (there are twelve).Tests
KeyframeEffect), and still accepts valid ones.animate()uncovers the window and clears the--revealingpin instead of propagating.All suites green: eslint, tsc, vitest (2748), PHPUnit (1700).