Skip to content

fix(ui): report ambiguity on partial process name match#564

Merged
zateutsch merged 1 commit into
mainfrom
fix/partial-match-ambiguity-error
Jun 2, 2026
Merged

fix(ui): report ambiguity on partial process name match#564
zateutsch merged 1 commit into
mainfrom
fix/partial-match-ambiguity-error

Conversation

@nmetulev
Copy link
Copy Markdown
Member

@nmetulev nmetulev commented Jun 2, 2026

When multiple processes match a partial --app query (e.g. -a terminal matching two WindowsTerminal instances) and all have visible windows, the code silently fell through to title search which then failed with a misleading No running app found error.

Now it throws a clear error listing the matching PIDs, process names, and window titles — consistent with the exact-name-match path:

Multiple processes matching 'terminal' found:
  PID 6816 (WindowsTerminal): ...
  PID 10516 (WindowsTerminal): Administrator: Windows PowerShell
Use --app with a PID or a more specific window title.

When multiple processes match a partial --app query and all have
visible windows, the code silently fell through to title search
which then failed with a misleading 'No running app found' error.

Now it throws a clear error listing the matching PIDs and titles,
consistent with the exact-name-match path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 2, 2026 05:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a UX bug in TryResolveProcess where partial --app name matches that resolved to multiple processes (all with visible windows) silently fell through and produced a misleading "No running app found" error. Now an explicit InvalidOperationException is thrown listing PIDs, process names, and window titles, mirroring the existing exact-name-match disambiguation path.

Changes:

  • Added a multi-match branch in the partial-process-name lookup that throws a descriptive error listing all candidate windows.
  • Error message includes PID, process name, and window title to guide the user toward a more specific --app value.

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Build Metrics Report

Binary Sizes

Artifact Baseline Current Delta
CLI (ARM64) 31.45 MB 31.45 MB 📈 +2.0 KB (+0.01%)
CLI (x64) 31.79 MB 31.79 MB 📈 +1.5 KB (+0.00%)
MSIX (ARM64) 13.21 MB 13.22 MB 📈 +1.0 KB (+0.01%)
MSIX (x64) 14.05 MB 14.05 MB 📉 -0.4 KB (-0.00%)
NPM Package 27.50 MB 27.50 MB 📈 +0.6 KB (+0.00%)
NuGet Package 27.59 MB 27.59 MB 📈 +0.9 KB (+0.00%)
VS Code Extension 20.31 MB 20.32 MB 📈 +1.9 KB (+0.01%)

Test Results

1192 passed, 1 skipped out of 1193 tests in 415.9s (-10.7s vs. baseline)

Test Coverage

17.2% line coverage, 36.3% branch coverage · ✅ no change vs. baseline

CLI Startup Time

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


Updated 2026-06-02 06:16:38 UTC · commit 6bfb3a1 · workflow run

@zateutsch zateutsch merged commit 1c6e75e into main Jun 2, 2026
23 checks passed
@zateutsch zateutsch deleted the fix/partial-match-ambiguity-error branch June 2, 2026 17:34
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