Skip to content

Standardize UI coordinate terminology: "app" → "screen" coordinates#660

Merged
zateutsch merged 1 commit into
mainfrom
nmetulev-verify-ui-inspect-coords
Jul 16, 2026
Merged

Standardize UI coordinate terminology: "app" → "screen" coordinates#660
zateutsch merged 1 commit into
mainfrom
nmetulev-verify-ui-inspect-coords

Conversation

@nmetulev

Copy link
Copy Markdown
Member

What & why

winapp ui drag / touch / pen (and the shared coordinate parser) all accept and report absolute screen coordinates — the exact same space winapp ui inspect reports — but the help text and docs described them inconsistently as "app coordinates", "app-relative", and "app x,y". That wording is ambiguous (it reads as window/client-relative) and was the source of real confusion about which coordinate space these verbs use.

This PR standardizes on the correct Win32 term "screen coordinates" everywhere. Wording/docs only — no behavioral change.

Changes

Source of truth (C#):

  • Commands/UiDragCommand.cs, UiTouchCommand.cs, UiPenCommand.cs — command descriptions + argument/option help
  • Helpers/CoordinateParser.cs, PointerGesturePlanner.cs — doc comments
  • WinApp.Cli.Tests/UiCommandTests.{Mouse,Touch}.cs — test comments

Hand-written docs:

  • docs/ui-automation.md, docs/usage.md, docs/fragments/skills/winapp-cli/ui-automation.md, .github/plugin/agents/winapp.agent.md

Regenerated artifacts (via scripts/generate-llm-docs.ps1 + npm generate-commands/generate-docs, sync-claude-plugin.ps1):

  • docs/cli-schema.json, plugin + .claude skills, src/winapp-npm/src/winapp-commands.ts, docs/npm-usage.md

Notes for reviewers

  • Schema version is unchanged (built with pinned AssemblyVersion to avoid churn); the only cli-schema.json changes are the wording lines.
  • The npm-usage.md regeneration also picks up a pre-existing stale row — the send-keys --allow-system-keys option was already in winapp-commands.ts but had never been regenerated into npm-usage.md. Reverting it would fail generate-docs:check, so it's included as an incidental doc sync.
  • Debug CLI + test project both build clean; npm generate-commands:check and generate-docs:check both pass.

A separate follow-up issue tracks a related but distinct behavioral asymmetry (touch/pen reject out-of-window coordinates while click/drag/hover/scroll do not).

winapp ui drag/touch/pen and the shared coordinate parser accept and report absolute screen coordinates in the same space 'ui inspect' reports, but the help text and docs described them inconsistently as 'app coordinates' / 'app-relative' / 'app x,y'. Standardize on the correct Win32 term 'screen coordinates' across command descriptions, argument/option help, doc comments, and the hand-written UI-automation docs.

Regenerated downstream artifacts (docs/cli-schema.json, plugin + .claude skills, npm winapp-commands.ts and npm-usage.md). The npm-usage.md regen also syncs a pre-existing stale 'send-keys --allow-system-keys' row that had drifted from the schema.

Wording/docs only - no behavioral change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7e0e07ab-c48d-4355-aff4-20f7120adb21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Standardizes UI automation help and documentation to correctly describe absolute screen coordinates, with no behavioral changes.

Changes:

  • Updates drag, touch, pen, and shared parser terminology.
  • Regenerates CLI schema, npm references, and agent skills.
  • Includes the pre-existing allowSystemKeys npm documentation sync.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/winapp-npm/src/winapp-commands.ts Updates generated npm API descriptions.
src/winapp-CLI/WinApp.Cli/Helpers/PointerGesturePlanner.cs Corrects coordinate documentation.
src/winapp-CLI/WinApp.Cli/Helpers/CoordinateParser.cs Corrects parser documentation.
src/winapp-CLI/WinApp.Cli/Commands/UiTouchCommand.cs Updates touch help text.
src/winapp-CLI/WinApp.Cli/Commands/UiPenCommand.cs Updates pen help text.
src/winapp-CLI/WinApp.Cli/Commands/UiDragCommand.cs Updates drag help and comments.
src/winapp-CLI/WinApp.Cli.Tests/UiCommandTests.Touch.cs Corrects test terminology.
src/winapp-CLI/WinApp.Cli.Tests/UiCommandTests.Mouse.cs Corrects test terminology.
docs/usage.md Updates UI command summaries.
docs/ui-automation.md Updates coordinate guidance and examples.
docs/npm-usage.md Regenerates npm documentation.
docs/fragments/skills/winapp-cli/ui-automation.md Updates the source skill fragment.
docs/cli-schema.json Regenerates command descriptions.
.github/plugin/skills/winapp-cli/ui-automation/SKILL.md Regenerates the plugin skill.
.github/plugin/agents/winapp.agent.md Updates agent command guidance.
.claude/skills/winapp-ui-automation/SKILL.md Synchronizes the Claude skill mirror.
.claude/agents/winapp.md Synchronizes the Claude agent mirror.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown
Contributor

Build Metrics Report

Binary Sizes

Artifact Baseline Current Delta
CLI (ARM64) 36.77 MB 36.77 MB ✅ 0.0 KB (0.00%)
CLI (x64) 36.95 MB 36.95 MB ✅ 0.0 KB (0.00%)
MSIX (ARM64) 15.36 MB 15.36 MB 📈 +0.6 KB (+0.00%)
MSIX (x64) 16.30 MB 16.30 MB 📈 +0.3 KB (+0.00%)
NPM Package 32.06 MB 32.06 MB 📈 +1.7 KB (+0.01%)
NuGet Package 32.09 MB 32.09 MB 📈 +1.4 KB (+0.00%)

Test Results

3338 passed, 4 skipped out of 3342 tests in 620.9s (-116.7s vs. baseline)

Test Coverage

86.3% line coverage, 80% branch coverage · ✅ no change vs. baseline

CLI Startup Time

46ms median (x64, winapp --version) · ✅ no change vs. baseline


Updated 2026-07-16 19:29:30 UTC · commit 56ef9b4 · workflow run

@zateutsch
zateutsch merged commit 7ad76f0 into main Jul 16, 2026
23 checks passed
@zateutsch
zateutsch deleted the nmetulev-verify-ui-inspect-coords branch July 16, 2026 19:35
nmetulev added a commit that referenced this pull request Jul 16, 2026
Resolved the ui-automation agent-doc conflict by keeping #660's
"app" -> "screen" coordinate terminology on the ui drag line and the
send-keys windowless/post-message caveat from this branch. Regenerated
all auto-generated docs/skills (cli-schema.json, plugin + .claude skills,
npm-usage.md, winapp-commands.ts) from the merged CLI; restored
plugin.json version to match main.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

3 participants