fix(cli): resolve query window by a numeric window server id - #442
Open
YuriNachos wants to merge 1 commit into
Open
fix(cli): resolve query window by a numeric window server id#442YuriNachos wants to merge 1 commit into
YuriNachos wants to merge 1 commit into
Conversation
The CLI window query only accepted the structured WindowId JSON. Add first-class numeric window-server-id resolution: decimal/hex args route to a new GetWindowInfoByServerId request (reactor lookup via tracked_window_id), while the JSON form keeps working unchanged for back-compat. Includes 3 CLI dispatch tests.
YuriNachos
force-pushed
the
YuriNachos/r3-rift
branch
from
August 13, 2026 18:20
9f70dd3 to
aff2bef
Compare
Contributor
Author
|
Rebased onto the new IPC model from 3a52122 — the |
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.
Summary
The CLI
windowquery only accepted the structuredWindowId({"pid":N,"idx":M}JSON). Resolving a window by its raw numeric window-server id (theu32the macOS WindowServer assigns, e.g. as shown byrift query windowsor system tools) required manually constructing that JSON. This adds first-class numeric-id resolution.How it works
RiftRequest::GetWindowInfoByServerId { window_server_id: u32 }.query_window_info_by_server_idresolves the server id toRuntimeWindowData.Windowsubcommand now auto-detects the argument form:6923) or hex (0x1b1b) →GetWindowInfoByServerId,WindowIdform →GetWindowInfo(back-compat preserved).Existing JSON-form callers are unaffected: a non-numeric string still routes through the original
parse_window_idpath.Test plan
cargo test— 498 passed, including 3 newrift-clitests:query_window_numeric_id_builds_by_server_id_request(decimal → ByServerId),query_window_json_form_still_uses_window_id(JSON → WindowId back-compat),query_window_hex_and_invalid(hex parse + invalid error).rift query window <numeric-id>resolves the expected window on a live session.Note on pre-existing test failures (not caused by this PR)
cargo testreports 12 failures inactor::reactor::tests::*(space/display topology resolution). These are pre-existing host-environment failures: an identicalcargo teston a clean checkout ofmain(no changes) produces the same 12 failures with the same test names (498 passed / 12 failed). They assert multi-displaySpaceIdcross-display behavior that depends on the host display configuration, and are unrelated to the window-server-id query added here (which touches onlyquery.rs/transport.rs/ipc.rs, not the reactor's space/display state machine).