GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(gui-plugins): drive the artifact viewer, image pan, video overlay and select preview through state machines by Hona · Pull Request #61993 · anomalyco/opencode Conversation
Member
Moves four implicit lifecycles onto explicit state machines and fixes the bugs each one hid: the Bugs fixed
State machines// packages/ui/src/forms/select/machine.ts type SelectHighlightState = | { status: "closed" } | { status: "idle" } | { status: "previewing"; key: string } | { status: "committed" } | { status: "disposed" } // packages/gui-plugins/src/file/artifact-view-machine.ts type ArtifactViewerState = | { status: "preview" | "source"; content: FileContent; info: ArtifactInfo } | { status: "undecodable"; content: FileContent; mode: ArtifactMode; reason?: string } type ImageStageGestureState = | { status: "idle" } | { status: "panning"; pointerId: number; moved: boolean } | { status: "suppress-click" } | { status: "disposed" } type VideoOverlayState = | { status: "loading"; paused: boolean; issued: number } | { status: "paused" | "playing-active" | "playing-idle"; issued: number } | { status: "expanded"; issued: number; paused: boolean } | { status: "disposed" } stateDiagram-v2
direction LR
state "Select" as S {
closed --> idle: open
idle --> previewing: highlight / apply
previewing --> previewing: other key / revert, apply
previewing --> committed: select same key
previewing --> committed: select other / revert
previewing --> closed: close / revert
committed --> closed: close
}
stateDiagram-v2
direction LR
state "Image pan" as P {
idle --> panning: primary down, zoomed / capture
panning --> panning: first move past 3px
panning --> suppress_click: up after move
panning --> idle: up, cancel, buttons up, zoom to fit / release
suppress_click --> idle: click (swallowed) or next press
}
state "Video overlay" as V {
loading --> paused: loadeddata
paused --> playing_active: play / schedule(n)
playing_active --> playing_idle: idle(n) or leave
playing_idle --> playing_active: move / schedule(n+1)
paused --> expanded: expand / open(n)
playing_active --> expanded: expand / open(n)
expanded --> paused: returned(n)
expanded --> playing_idle: returned(n)
}
Deleted
Product calls and deviations from the design
ScreenshotsMalformed text SVG:
Visual<svg xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72" fill="none" stroke="currentColor"> <style> .pan{animation:pan 3s ease-in-out infinite} .src{animation:src 3s step-end infinite} @keyframes pan{0%,100%{transform:translateX(0)}50%{transform:translateX(18px)}} @keyframes src{0%,49%{opacity:.35}50%,100%{opacity:1}} @media (prefers-reduced-motion:reduce){.pan,.src{animation:none}} </style> <rect x="8" y="8" width="104" height="56" rx="4" opacity=".35"/> <g class="pan"><rect x="30" y="20" width="44" height="32" rx="2" fill="currentColor" fill-opacity=".15"/><path d="M36 44l10-12 8 8 6-6 8 10"/></g> <rect x="128" y="8" width="104" height="56" rx="4" opacity=".35"/> <path d="M140 22h28M140 32h40M140 42h22" opacity=".5"/> <g class="src"><rect x="186" y="16" width="38" height="14" rx="3"/><path d="M194 23h22" stroke-width="2"/></g> </svg>
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…lay, and the select preview through state machines … cover broken SVG source and lost pan release
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level. An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No blocking problems in this change. The new unit tests pass in both packages (17 in gui-plugins, 8 in ui), and In the code, the select's controlled close, a typeahead selection made while the menu is closed, the pointer-capture and click-suppression handling after a pan, and the expanded video preview's return and cleanup all look right. Public API is unchanged; the change is limited to internal GUI components.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new commit only changes how
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page.
1 task
This was referenced
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reviewers
Copilot code review
Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Uh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |