Add exact window modes to App#331
Open
zengfanfan wants to merge 1 commit into
Open
Conversation
zengfanfan
marked this pull request as ready for review
July 13, 2026 12:06
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
zengfanfan
force-pushed
the
feature/exact-window-control
branch
from
July 18, 2026 13:21
866f2aa to
7358578
Compare
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.
Description
Add deterministic native window operations as explicit modes of the existing
Apptool:find_windowfilters by exact HWND, PID, process basename, and exact or contains title matching. It returns native identity plus outer and client geometry.activate_windowrequires an HWND, accepts optional identity assertions, and verifies the foreground HWND after activation.set_window_boundsrequires an HWND and exactly one outer or client rectangle. Client bounds are corrected against the actual Win32 readback to account for non-client frame differences.launch,launch_executable,resize, andswitchbehavior is unchanged. Parameters for exact modes and convenience modes are explicitly isolated so invalid combinations fail before desktop access.The Win32 implementation lives in an internal
ExactWindowController; no additional public MCP tool is registered. Documentation and manifest text now describe the consolidatedAppinterface.Motivation
The existing name-based modes are useful for convenient interactive automation, but fuzzy selection is unsuitable when callers already have stable native identity. Explicit modes keep both workflows in one application/window tool while making exact operations deterministic and verifiable.
Testing
ruff checkon all changed Python files and related testsruff format --checkon all changed Python files and related tests64 passed431 passed, 3 deselected431 passed, 3 failed; the three failures are local environment limitations in unchanged upstream areas (worktree temp-directory permissions, scheduled-task privileges, and an occupied system clipboard)No installed application or persistent user data was modified by the smoke test.