fix(computer-use): drop the window border overlay, gate the cursor on foreground - #319
Merged
Conversation
… custom window
Claude models now default the Context Window option to their native window
(200k for Sonnet 4.6 / Opus 4.6, 1M for Fable 5/5.1, Opus 5, Sonnet 5,
Opus 4.7/4.8; the latter two gain the option). Selecting the default emits no
launch flags; a smaller window is passed as `--settings {"autoCompactWindow":N}`
and `[1m]` is only appended to expand a native-200k model.
The picker gains a Custom row with an inline input (500k / 500000 / 500,
100k–1M). Changing the window while the provider is live restarts it before
the next turn and records a `ContextWindowChanged` timeline divider under the
user message. The composer's context meter is clamped to the selected window.… foreground The agent overlay drew a four-layer glowing gradient border around the target window on every action and never hid it (`clear()` only ran when the setting was switched off), so borders lingered on screen indefinitely. Remove the border entirely. The cursor panel keeps tracking every action (input is delivered in the background), but is only ordered on screen while the target app is frontmost. A 200 ms main-queue poll re-evaluates the foreground app so the cursor hides the moment the user switches away and reappears in place when they switch back; the poll disarms when the target exits or the overlay is disabled. The first show lands the panel directly on the action point instead of sliding in from off-screen. overlay/: 1265 → 925 lines.
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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
show_agent_cursorsetting was toggled off, so it lingered on screen indefinitely.dispatch_after_f) re-checks the frontmost pid so the cursor hides as soon as the user switches away and reappears in place when they switch back. The poll disarms when the target process exits or the overlay is disabled.overlay/shrinks from 1265 to 925 lines;#![allow(dead_code)]removed.Verification
cargo fmt --all --check,cargo clippy -p computer-use-mcp --all-targets -- -D warnings,cargo test -p computer-use-mcp(42 passed),cargo buildpass locally.[NSApp run]; screenshots show the cursor at the click point while TextEdit is frontmost, gone after activating Finder, and back in place after re-activating TextEdit.