[Bug]: Composite `ui screenshot` success output ignores `--quiet`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
Research direction
Start in src/winapp-CLI/WinApp.Cli/Commands/UiScreenshotCommand.cs, reviewing the composite output around lines 372–441 and 506–510 alongside the single-window logging check. Reproduce a composite capture with winapp --quiet ui screenshot, then verify informational success output is suppressed while warnings, errors, and --json output remain unaffected.
Written by the indexing model from the issue text.
Description
Describe the bug
When winapp ui screenshot falls back to composite (multi-window) capture, its human-readable success output is emitted unconditionally (gated only on !json), so it is printed even under --quiet. The single-window path is correctly gated on Information-level logging, so this is an asymmetry: quiet mode silences a single-window capture but not a composite one.
This is a pre-existing issue (the composite AnsiConsole.MarkupLine calls are not new), surfaced during review of #884. That PR gated the single-window success line on logger.IsEnabled(LogLevel.Information) but intentionally scoped itself to host-path reporting and left the composite branch as-is, which makes the gap more visible.
To Reproduce
- Have an app with an owned dialog/second window open (so capture goes composite).
- Run:
winapp --quiet ui screenshot -a <app-with-owned-dialog> -o shot.png - Observe stdout still contains success chatter, e.g.
⚠ N windows detected. Compositing into single image.,✓ HWND …, and✓ Saved composite: ….
Expected behavior
Under --quiet (Warning-level logging), a successful composite capture should produce no informational success output on stdout — matching the single-window behavior. Warnings/errors and --json output should be unaffected.
Screenshots
N/A — textual output.
OS Version and details
N/A — behavior is platform-independent.
Suggested fix: Gate the composite informational lines (⚠ … windows detected, ✓ HWND …, ✓ Saved composite: …) on logger.IsEnabled(LogLevel.Information), consistent with the single-window path. See src/winapp-CLI/WinApp.Cli/Commands/UiScreenshotCommand.cs (composite output around L372–441 and L506–510).
- Dominant language
- C#
- Stars
- 1.3k
- Forks
- 80
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 65
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/winappCli
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug ui-automation
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
All issues in microsoft/winappCli
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
OrchardCMS/OrchardCore#19919 · 2 comments ·