feat(drive): control and visualize real mouse input - #83
Merged
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.
Why
Agents can click in OpenCode, but cannot reliably exercise hover/leave or drag gestures through Drive's public interface. Recorded videos also hide the pointer, making those interactions difficult to follow.
What Changes
Expose real
ui.mousemovement, buttons, modifiers, dragging, and scrolling. Add an opt-in pointer overlay to recordings, driven by actual coordinates and timestamps from the OpenCode recording clock.The cursor appears before input, glides along a subtle bounded arc using Motion's critically damped spring, and lingers across nearby interactions. Actual input timing is unchanged, clicks arrive at their recorded cell, and held drags do not gain decorative curvature. Existing click APIs and terminal-v1 recordings remain compatible.
Demo
release-comparison.mp4
Same real production TUI recording, exported with base
f6a3f55on the left and the approved pointer implementation961e75bon the right. Captured against the companion OpenCode implementation before its clean rebase (52974a6057). The fixture asserts native hover/leave, click-driven theme changes, and resizing. No model calls or accelerated playback. Subsequent dependency refreshes were verified with a fresh run of the same fixture against the rebased OpenCode change.Recording and Ownership
--recordoptions.Versions and Scope
Refresh native canvas/terminal replay dependencies and align development/CI with Bun 1.4.0. The exact V2 client pin selects matching protocol/schema packages; the OpenCode executable is separately selected from
PATH,--dev, or an explicit command. Effect remains on the current V4rc.112, not the V3latesttag.The V2 client, protocol, and schema are pinned together to
0.0.0-dev-19066, the published build containing #47194. This prepares the Changesets-generated 2.1.0 release. The larger CLI lifecycle rewrite, catalog painter consolidation, and subsequent rendering performance work remain separate. This does not alter real input pacing or add blur effects.Verification
recording/marks.ts.