Skip to content

fix(tests): fixture UI checks fail on missing placement RPC and intermittent wide-window visibility #1899

Open

Description

@karkarl

Summary

Track follow-up fixes for three reproducible fixture-backed UI failures discovered while validating #1898 (chore: update Windows App SDK to 2.6.4). Reliable failure classification is important as automated UI coverage expands: unsupported fixture RPCs and accessibility/layout timing must not be mistaken for product crashes.

This issue is separate from the SDK dependency update. No application or test fix was made during the investigation.

Affected tests

All are in OpenClaw.Tray.UITests.GatewayFixtureUiTests:

Test Observed failure
ComposerNew_InitialConversationBackAndForward Final Assert.Empty(run.Gateway.UnexpectedRequests) fails on two projects.list requests returning METHOD_NOT_FOUND.
ComposerNew_DelayedCompletionRetainsNotifications Same final assertion fails on one unsupported projects.list request.
SidebarSwitchesRealHistoriesAndShowsMessage240AtBothWidths Times out waiting for message 240 to be visible after resizing to wide width and scrolling to the bottom.

Cause and assessment

Confirmed: fixture placement RPC coverage gap

The new-conversation flow calls GatewayChatPlacementClient.LoadAsync in src/OpenClaw.Shared/Sessions/ChatPlacement.cs. It starts projects.list and agents.list, then requests environments.list after those requests succeed.

The synthetic scenario in tests/OpenClaw.TestSupport/Gateway/GatewayScenario.cs does not implement projects.list. Unknown methods return METHOD_NOT_FOUND and are recorded as unexpected. Both composer tests complete their scenario-specific UI assertions, then fail the common final unexpected-request check in tests/OpenClaw.Tray.UITests/GatewayFixtureUiTests.cs.

Assessment: confirmed test-fixture contract gap, not an observed app crash and not introduced by SDK 2.6.4. The follow-up should model the supported placement read contract faithfully, including any subsequently reached methods such as environments.list, rather than merely ignoring projects.list errors or weakening UnexpectedRequests assertions. Placement-specific behavior still needs appropriate tests; completion of these composer assertions does not establish that the placement catalog loaded successfully.

Existing intermittent wide-window visibility assertion

The scrolling case passes its repeated session-switching/natural-tail checks and narrow-window check, then can time out at the wide-window visibility check.

ScrollToAsync issues ScrollPattern.SetScrollPercent and waits 100 ms. IsVisibleInTimeline then relies on the first matching text element, IsOffscreen, and UI Automation bounding rectangles to establish full vertical containment in the timeline.

Both the SDK 2.6.4 and SDK 2.5.1 failure screenshots visibly show FIXTURE LONG FINAL MESSAGE 240 above the composer. After restoring 2.6.4, another run with an external UIA geometry observer passed: the final message reported IsOffscreen=false and bounds inside the timeline.

Assessment: pre-existing/intermittent visibility-test failure, with evidence pointing toward resize/layout/accessibility timing or element selection. The exact mechanism is not established. Observation can change timing, so the instrumented pass does not erase the uninstrumented failures or prove a fix. Do not remove the natural-tail-before-explicit-scroll assertion, substitute scroll extent for rendered visibility, or increase arbitrary sleeps to hide the failure.

Comparison evidence

  • Source: 8e60c80577f83ce32e9f706e04ce49e16f88df9a, based on 48cb8a18fdb5820e731b82df616e6e5b3f954cf0; Reactor remains 0.1.0-preview.12.
  • Environment: native Windows ARM64, .NET SDK 10.0.403, Release application build.
  • Initial full fixture run: profile/app integration 32 passed, 0 failed; UI 28 passed, 3 failed.
  • Targeted SDK 2.6.4 rerun: 3 executed, 3 failed, 0 skipped, with the same errors (about 41 seconds).
  • Built the application using -p:MicrosoftWindowsAppSDKVersion=2.5.1, without editing tracked source, and reran the same three tests against that application: 3 failed with the same errors. Its restored graph resolved Microsoft.WindowsAppSDK/2.5.1 and Microsoft.WindowsAppSDK.WinUI/2.3.9. The existing Release UI test harness was reused; this was an application-dependency comparison, not a complete rollback of the test host/runtime environment.
  • Restored application build to SDK/WinUI 2.6.4. Scrolling-only run with external geometry observation: 1 passed, 0 failed, 0 skipped.
  • All inspected failure receipts reported the application still responding. No crash was reported by these failures. They do not prove the original ItemsView crash fixed, nor exclude other regressions.

Local invocation-specific TRX, screenshots, synthetic Gateway request logs, and run receipts are retained under TestResults\Sdk264Fixture\Release, TestResults\Sdk264Fixture\Release-Rerun\8d6e6eed6abf439ebbddef5f3f62ce61, and TestResults\Sdk264Analysis in the originating worktree. These are local evidence locations, not publicly uploaded artifacts.

Reproduction

Use PowerShell 7 on an interactive Windows desktop. The fixture runner relies on ProcessStartInfo.ArgumentList, which Windows PowerShell 5.1 does not provide.

$env:OPENCLAW_REPO_ROOT = (Get-Location).Path
.\build.ps1 -Project WinUI -Configuration Release
$app = '.\src\OpenClaw.Tray.WinUI\bin\Release\net10.0-windows10.0.22621.0\win-arm64\OpenClaw.Tray.WinUI.exe'
.\scripts\test-gateway-fixture.ps1 -AppPath $app -Configuration Release -ArtifactsDirectory '.\TestResults\FixtureFollowup' -Screenshots

For the targeted rerun:

$env:OPENCLAW_RUN_GATEWAY_FIXTURE_UI = '1'
$env:OPENCLAW_GATEWAY_FIXTURE_APP = (Resolve-Path $app).Path
$env:OPENCLAW_GATEWAY_FIXTURE_ARTIFACTS = Join-Path (Get-Location) 'TestResults\FixtureFollowupTargeted'
$env:OPENCLAW_GATEWAY_FIXTURE_SCREENSHOTS = '1'
$filter = 'FullyQualifiedName=OpenClaw.Tray.UITests.GatewayFixtureUiTests.ComposerNew_InitialConversationBackAndForward|FullyQualifiedName=OpenClaw.Tray.UITests.GatewayFixtureUiTests.ComposerNew_DelayedCompletionRetainsNotifications|FullyQualifiedName=OpenClaw.Tray.UITests.GatewayFixtureUiTests.SidebarSwitchesRealHistoriesAndShowsMessage240AtBothWidths'
dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -c Release -r win-arm64 -p:Platform=ARM64 -p:DevBuild=false --filter $filter --results-directory .\TestResults\FixtureFollowupTargeted --logger 'trx;LogFileName=fixture-three.trx'

Use win-x64 and Platform=x64 on x64. Keep the explicit application build/configuration aligned with the test run. The fixture uses synthetic Gateway data and disposable app profiles, not a real Gateway or AI provider.

Follow-up acceptance criteria

  • Add faithful fixture coverage for the placement reads reached by new-conversation UI, with focused protocol tests and explicit unsupported-method failure behavior preserved.
  • Confirm both composer scenarios execute and pass without unexpected requests, including their existing navigation, draft/transcript, and mutation assertions.
  • Capture timeline/message UIA identity, offscreen state, bounds, scroll state, window geometry, and an owned-window screenshot on a wide-window failure, to establish the actual predicate that fails.
  • Fix the identified synchronization/measurement defect, or the product defect if evidence establishes one, without weakening visible-content or initial-tail requirements.
  • Run repeated uninstrumented Debug and production-shaped Release scenarios on the supported interactive host; report executed counts, all failures, and zero selected skips. Include ARM64 and x64 coverage as capacity permits.
  • Keep fixture protocol failures, UI assertion failures, app exits/crashes, and unavailable desktop/runtime prerequisites distinguishable in automation output.

Severity

Not a critical crash incident and not an established SDK 2.6.4 regression. The confirmed fixture gap and intermittent visibility assertion undermine automated UI reliability and need a subsequent fix before these scenarios can serve as dependable unattended acceptance gates.

Activity

  1. added
    clawsweeper:intake:bug
    P2
    clawsweeper:source-repro
    impact:other
    issue-rating: 🦞 diamond lobster
    and removed
    clawsweeper:intake:bug
    on Oct 27, 2026
  2. clawsweeper commented on Oct 27, 2026

    @clawsweeper

    Codex review: this still needs some work.

    Summary
    Keep open: placement discovery is covered on main, but later UIA and scrolling fixes do not establish that the reported wide-window timeout is resolved; this collaborator-authored issue also requires explicit maintainer judgment before closure.

    Reproducibility: Historical Windows ARM64 failures are documented, but current-main reproduction is unverified; the confirmed missing-RPC path is now covered, and source alone cannot prove the intermittent resize failure persists.

    Maintainer decision needed

    • Question: What current-main evidence is sufficient to retire the remaining wide-window investigation after the UIA and initial-tail repairs?
    • Recommendation: Retain for targeted diagnosis: Repeat the unchanged scenario in Debug and Release and capture every failure with correlated UIA and window evidence before choosing a repair.
    • Why: Existing fixes address plausible neighboring causes, but neither the original failing predicate nor a matching before-and-after reproduction is established.

    Next step
    Capture a current-main wide-window failure with UIA identity, bounds, offscreen and scroll state plus an owned-window screenshot before selecting a repair.

    Review details

    Best possible solution:

    Establish whether the wide-window failure survives current main, then repair its demonstrated owner while preserving rendered visibility and natural-tail assertions.

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

    Historical Windows ARM64 failures are documented, but current-main reproduction is unverified; the confirmed missing-RPC path is now covered, and source alone cannot prove the intermittent resize failure persists.

    Is this the best way to solve the issue?

    Recheck the original scenario against the newer snapshot and landing implementations before changing waits or scroll policy; a fixed delay is a diagnostic lead, not proof of root cause.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The original resize timeout has not been reproduced on current main after the UIA snapshot and initial-tail repairs.
    • Without a failure capture correlating UIA identity, geometry, scroll state and owned-window pixels, a test measurement race cannot be distinguished from a product scrolling defect.

    Codex review notes: model internal, reasoning medium; reviewed against b762c8dc12a8.

    Label changes

    Label changes:

    No label changes.

    Label justifications:

    • P2: Intermittent fixture failures weaken automated acceptance coverage, with no established urgent shipping-product regression.
    • impact:other: The demonstrated impact is unreliable developer CI and additional failure investigation.
    Evidence reviewed

    What I checked:

    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; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed November 29, 2026, 10:41 PM ET / November 30, 2026, 03:41 UTC.

  3. karkarl commented on Oct 28, 2026

    @karkarl
    CollaboratorAuthor

    Follow-up: #1905 (chore(ci): run mock Gateway UI scenarios in pull requests) repairs the missing placement-catalog RPC and adds strict default mock-Gateway UI execution on windows-latest. Its local SDK 2.5.1 run passed 32 profile/app checks and 30 native UI checks, zero failures or skips, including both ComposerNew cases and the unchanged wide-resize case. This does not establish that the intermittent wide-resize mechanism is fixed; this issue remains open for that investigation. Separately, #1898 repairs the Shared PowerShell test isolation/deadline and ARM64 prerequisite fixture, with full build, Shared (4650 passed, 24 skipped), and Tray (4570 passed) green locally. No production execution policy or host privileges were changed.

  4. github-actions commented on Nov 12, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale due to inactivity.
    Please add updated OpenClaw Windows details or it will be closed.

  5. added
    clawsweeper:intake:bug
    issue-rating: 🦪 silver shellfish
    and removed
    issue-rating: 🦞 diamond lobster
    clawsweeper:source-repro
    clawsweeper:intake:bug
    on Nov 14, 2026
  6. added
    clawsweeper:intake:bug
    and removed
    clawsweeper:intake:bug
    on Nov 15, 2026
  7. github-actions commented on Nov 30, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale due to inactivity.
    Please add updated OpenClaw Windows details or it will be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2impact:otherissue-rating: 🦪 silver shellfishstale

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions