Skip to content

ci(windows): capture UI state per step — screenshot plus element tree - #1053

Open
emooreatx wants to merge 1 commit into
mainfrom
ci/windows-ui-captures
Open

ci(windows): capture UI state per step — screenshot plus element tree#1053
emooreatx wants to merge 1 commit into
mainfrom
ci/windows-ui-captures

Conversation

@emooreatx

Copy link
Copy Markdown
Contributor

The Windows failures ahead are UI-state problems, and a log line won't explain them.

The desktop test server already exposed GET /screenshot — the Python helper never used it.

capture_step() takes both a PNG and the element tree, because they fail in opposite conditions:

  • the PNG comes from AWT Robot.createScreenCapture, which grabs the screen rather than rendering the window. It needs a real display, so on a runner with no interactive desktop session it will throw or return a black frame. Excellent locally, possibly worthless in CI.
  • the tree is plain text, needs no display, and is greppable and diffable. For "which step did the UI stop matching what we expected", diffing a passing run against a failing one beats a picture.

It never raises. A troubleshooting aid that can fail the test it was meant to explain is worse than none — the first Windows run died inside the harness, and a capture helper with its own failure mode would have buried the cause.

The workflow collects ui_captures/ and lists what it got, so a missing PNG shows up as an expected gap rather than a silent one.

The Windows failures ahead are UI-state problems, and a log line will not
explain them. The desktop test server already exposed GET /screenshot; the
Python helper never used it.

capture_step() takes BOTH a PNG and the element tree, because they fail in
opposite conditions. The PNG comes from AWT Robot.createScreenCapture, which
grabs the SCREEN rather than rendering the window, so it needs a real display —
on a runner with no interactive desktop session it will throw or return a black
frame. The tree is plain text, needs no display, and is greppable and diffable:
for 'which step did the UI stop matching what we expected', diffing a passing
run against a failing one beats a picture.

It NEVER raises. A troubleshooting aid that can fail the test it was meant to
explain is worse than none — the first Windows run died inside the harness, and
a capture helper with its own failure mode would have buried the cause.

The workflow collects ui_captures/ and lists what it got, so a missing PNG is
visible as an expected gap rather than a silent one.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant