Skip to content

fix(cli): accept positional APP and --app on every window command - #596

Open
princejain756 wants to merge 2 commits into
vercel-labs:mainfrom
princejain756:fix/window-command-app-arg-forms
Open

princejain756 wants to merge 2 commits into
vercel-labs:mainfrom
princejain756:fix/window-command-app-arg-forms

Conversation

@princejain756

Copy link
Copy Markdown

Window-lifecycle commands disagreed on how to name the target app: launch and close-app only took a positional argument, while minimize, maximize and restore only took --app. Mixing the shapes returned INVALID_ARGS naming the rejected token but not the accepted form.

Every window command now accepts both spellings, with the two forms conflicting so there is no ambiguous double target. Batch JSON keeps parsing the documented app key unchanged.

Verified: cargo test --bin agent-desktop (231 passed, new arg-form tests included), cargo clippy --all-targets -D warnings clean, cargo fmt --check clean.

Fixes #487

@vercel

vercel Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

@princejain756 is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Comment thread src/cli_args/system.rs Resolved
princejain756 and others added 2 commits November 28, 2026 10:14
Window-lifecycle commands disagreed on how to name the target app:
launch and close-app only took a positional, minimize, maximize and
restore only took --app. An agent that pattern-matched one command's
shape onto a sibling got INVALID_ARGS naming the rejected token, with
no hint about the accepted form.

Give each command both spellings. Positional and --app conflict with
each other so there is never an ambiguous double target, and batch
JSON keeps parsing the documented "app" key because the CLI-only flag
fields are skipped by serde.

Fixes vercel-labs#487
@princejain756
princejain756 force-pushed the fix/window-command-app-arg-forms branch from c1fb38c to 1fe8a43 Compare November 28, 2026 04:44

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Window commands disagree on how to target an app — close-app takes a positional argument, restore takes --app

1 participant