Repository navigation
Refactor: add a typed machine runtime and convert remaining viewer state - #67
Merged
marcelduin merged 20 commits intoNov 9, 2026
Merged
Conversation
Queued transitions, phase entry signals, transition signals, bounded history and disposal; covered by core unit tests.
One phase per playback state; public events and end reporting derive from phase edges for native, HLS and iframe backends.
Phase, runId and step own the story; the opening phase signal cancels superseded image loads and transport events derive from phase edges.
Replace the running/view/zoom booleans with one phase and channel; pause and resume stay explicit.
One phase and run id for the cascade; waiters resolve by run and the frame loop owns settling.
Named tile phases and a pure reducer replace the 0..3 load-state numbers; failed stays terminal until eviction.
Slot phase replaces direction plus dragging booleans; a programmatic flip now leaves the drag state instead of stalling.
Restore start()'s contract: only the under-zoom guard may refuse it; a no-motion click is stopped by the frame loop.
One phase, segment and clock replace the paused/playing/wasPaused/timestamp fields; replay and paused seeks stay deterministic.
One phase covers live/destroying, minimized, advance latch and tour-control placement.
Transition phase, set id and z tiers are one state; cancel preserves the generation and destroy invalidates it.
One print phase and generation replace the printed flag and generation counter.
Switch phase and shown edge own _switching; loading remains the engine's tile progress.
A shared drag phase replaces the strip active flag; the reducer can express pending, dragging and cancellation.
Grid mode tracks overview/hidden/focus/non-clickable and the serial transport as one reducer state.
One locked/probing/blocked/unlocked phase replaces the interacted store; controllers subscribe to the phase.
html, gl and gl+overlay are one discriminated presentation instead of four booleans.
Selection phase and popup/popover flags live in State.Main; marker events drive its transitions.
The public switching store's exact notification timing is part of the waypoint contract; the machine changed it.
The scrubber's drag flag is now the same explicit phase as the swipe strip.
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.
This branch adds an internal reducer/machine runtime and uses it to replace the remaining multi-field state across the viewer.
Runtime
AbortSignalcancellation, bounded history, disposal.Converted state
gotocascade.Ani, page-flip slots and tile phases.html | gl | gl+overlay).The old boolean/latch fields behind these behaviours are removed in the migrated components.
Also included
55f1a69restoresKinetic.start()’s contract for a no-motion click.d5e9752); its_switchingtiming is part of the waypoint arrival contract and is not changed here.Verification
pnpm test— 139 files / 1995 tests passedpnpm typecheckandpnpm lintcleandev.htmlis not included