Skip to content

Fix Tray UI test window hiding for release - #897

Merged
shanselman merged 1 commit into
mainfrom
fix-release-ui-test-window
Jun 30, 2026
Merged

Fix Tray UI test window hiding for release#897
shanselman merged 1 commit into
mainfrom
fix-release-ui-test-window

Conversation

@shanselman

Copy link
Copy Markdown
Collaborator

Summary

The v0.6.12 tag release failed in the test job because OpenClaw.Tray.UITests.SmokeTests.Container_AcceptsTextBlockAndLaysOut saw a null XamlRoot after the UI fixture hid its test window with SW_HIDE.

This changes the UI test fixture to keep the WinUI window live in the compositor and move it off-screen instead of hiding it. That matches the existing comment's intent and keeps XamlRoot attached while CI remains visually quiet.

Validation

  • ./build.ps1 - passed
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore - passed: 2686 passed, 31 skipped
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore - passed: 1449 passed
  • dotnet test ./tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -c Debug -r win-x64 --no-restore - passed: 76 passed
  • dotnet test ./tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -c Debug -r win-x64 --no-restore --filter FullyQualifiedName~Container_AcceptsTextBlockAndLaysOut - passed: 1 passed

Real behavior proof

The previously failing release smoke test now passes locally on the same win-x64 UI test path used by CI. The fixture no longer calls ShowWindow(..., SW_HIDE); it uses AppWindow.MoveAndResize after activation, preserving the WinUI visual tree bridge while moving the window off-screen.

Rubber-duck review: no blocking issues.

Release follow-up

After this lands, move/recreate tag v0.6.12 on the new main tip to rerun the release workflow.

Move the WinUI UI-test fixture window off-screen instead of hiding it with SW_HIDE so XamlRoot remains attached for layout smoke tests in CI.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@clawsweeper

clawsweeper Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed June 30, 2026, 2:52 PM ET / 18:52 UTC.

Summary
The branch changes the Tray UI test fixture so non-slow tests move the WinUI window off-screen with AppWindow.MoveAndResize instead of hiding it with user32.ShowWindow.

Reproducibility: yes. at source level, but not independently executed here: current main hides the activated WinUI test window with ShowWindow(..., 0), and the smoke test asserts XamlRoot remains attached after mounting content.

Review metrics: 1 noteworthy metric.

  • Changed surface: 1 file changed, +8/-15. The patch is limited to the Tray UI test fixture that owns the reported release test failure.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Wait for the required GitHub checks that were still in progress during review.

Risk before merge

  • [P1] This Linux read-only review could not run the Windows-only UI tests; it relies on direct source inspection, the PR body's reported command output, and GitHub check metadata.
  • [P1] Several GitHub checks were still in progress at inspection time, so merge should wait for the required CI gates to finish.

Maintainer options:

  1. Decide the mitigation before merge
    Land the narrow fixture fix after required checks complete, then rerun or recreate the v0.6.12 release tag as the PR body describes.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] No repair lane is needed because the patch has no concrete reviewer finding; maintainers should wait for required checks and review or merge the PR.

Security
Cleared: The diff removes a test-only user32 P/Invoke and adds no dependencies, workflows, secrets handling, permissions, or package-publishing changes.

Review details

Best possible solution:

Land the narrow fixture fix after required checks complete, then rerun or recreate the v0.6.12 release tag as the PR body describes.

Do we have a high-confidence way to reproduce the issue?

Yes at source level, but not independently executed here: current main hides the activated WinUI test window with ShowWindow(..., 0), and the smoke test asserts XamlRoot remains attached after mounting content.

Is this the best way to solve the issue?

Yes: moving the already-activated test window off-screen preserves a live WinUI compositor path without adding dependencies or changing product code.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 1823f195c8fb.

Label changes

Label changes:

  • add P1: The item addresses an active release-test regression blocking the reported v0.6.12 tag release path.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes after-fix command output for the affected Windows UI test path, including the full UI test project and the focused failing smoke test.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes after-fix command output for the affected Windows UI test path, including the full UI test project and the focused failing smoke test.

Label justifications:

  • P1: The item addresses an active release-test regression blocking the reported v0.6.12 tag release path.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes after-fix command output for the affected Windows UI test path, including the full UI test project and the focused failing smoke test.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes after-fix command output for the affected Windows UI test path, including the full UI test project and the focused failing smoke test.
Evidence reviewed

What I checked:

Likely related people:

  • bkudiess: Git blame and the merged PR metadata show Barbara Kudiess authored the current UI test fixture and smoke tests that this PR adjusts. (role: introduced behavior; confidence: high; commits: a3c5e0bf6fce; files: tests/OpenClaw.Tray.UITests/UIThreadFixture.cs, tests/OpenClaw.Tray.UITests/SmokeTests.cs)
  • shanselman: GitHub metadata shows Scott Hanselman merged the PR that introduced the fixture, and current main also includes his coauthored GitVersion build preflight change adjacent to the failed release workflow. (role: recent merger and release-adjacent contributor; confidence: medium; commits: a3c5e0bf6fce, 1823f195c8fb; files: tests/OpenClaw.Tray.UITests/UIThreadFixture.cs, build.ps1)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P1 Urgent regression or broken agent/channel workflow affecting real users now. labels Jun 30, 2026
@shanselman
shanselman merged commit 4166e0f into main Jun 30, 2026
21 checks passed
@shanselman
shanselman deleted the fix-release-ui-test-window branch June 30, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P1 Urgent regression or broken agent/channel workflow affecting real users now. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant