Repository navigation
fix(tests): Usage scroll proof fails when the page title briefly leaves UI Automation after a resize - #2175
Conversation
…es UI Automation after a resize UsageHero_ViewportRemainsAnchoredWhileTheCardScrollsAway threw from its scroll poll when the UsagePageMarker lookup missed once. Read the scroll host and the at-top hero layout from settled samples after the resize, treat a missing title during the scroll poll as not ready, and use the captured title afterwards. Extract the two-sample settle from the real-shell hero test so both tests share it. Co-authored-by: Copilot App <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR makes the Usage scroll test tolerate a transient missing title and share the existing layout-settling helper. Example: After resizing Usage to 1400 DIP, the first title lookup during scrolling returns no element.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR repairs a failure path still present on main while preserving the scroll assertions. No actionable introduced defect was found; checks remain in progress. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe native Usage fixture tests drive the real Windows app through UI Automation against synthetic Gateway data and produce layout assertions and diagnostic artifacts. flowchart LR
A[Fixture Gateway] --> B[Native Usage page]
C[Fixture UI test] --> D[UI Automation]
D --> B
D --> E[Settled layout samples]
E --> F[Scroll assertions and artifacts]
Technical reviewBest possible solution: Retain the existing UI test owner, reuse its settled-layout sampling, and retry missing title observations without relaxing the scroll contract. Do we have a high-confidence way to reproduce the issue? Source confirms that one missing title lookup escapes the poll as InvalidOperationException; supplied injected RED/GREEN results exercise that path, while the underlying resize transient remains inferred. Is this the best way to solve the issue? The change fits the existing owner and preserves independent scroll assertions; sharing the established settling implementation avoids a competing readiness path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 90653249bd8a. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 13, 2026, 1:38 PM ET / 18:38 UTC. |
Resolves conflicts with openclaw#2173 (session dashboard tab beside chat), openclaw#2176, openclaw#2175, openclaw#2116 and openclaw#2172: - ReactorBoardView: embedded board keeps main's compact 12/0 padding, standalone pages keep the shared PageResponsiveLayout PaddingTop/PaddingBottom. - Resources.resw (all 6 locales): keep this PR's PageAction_Refresh keys and main's Chat_Panel_Dashboard. - TestTimingPatternBaseline.json: main's counts, then lowered for this branch. Co-authored-by: Copilot App <[email protected]>
What Problem This Solves
Fixes: the Usage scroll-proof fixture check (
UsageHero_ViewportRemainsAnchoredWhileTheCardScrollsAway) fails intermittently with "Missing Usage title during scroll proof." when the page title briefly leaves UI Automation after the test resizes the window.User Impact
No user-visible change. Mock Gateway fixture shard B stops failing on this test.
Why This Change Was Made
The test resizes the window to 1400 DIP and waits only for the window width. Its scroll poll then threw on the first
UsagePageMarkerlookup that came back empty, becauseWaitUiAsyncswallows onlyElementNotAvailableException. The Usage page is a plain, non-virtualizedPageScroll, so the title stays in the UI Automation tree when it scrolls away. A missing title is therefore a transient: most likely the page re-rendering after the resize. That cause is inferred, not reproduced. The test now records the scroll host's and the live page root's runtime IDs, so a future failure shows whether the page was replaced.Changes:
WaitForSettledUsageHeroLayoutAsync. That test now uses the helper, with no behavior change.Evidence
System.InvalidOperationException : Missing Usage title during scroll proof.Change Type
Scope
winnodeRequired proof pools
none: test-only change to a mock Gateway fixture UI test. CI runs it natively in fixture shard B.Validation
Local, head df04485 on main e9ed3ba, isolated
OPENCLAW_TRAY_*profile. Native runs held the exclusive native-desktop lock, and the real%APPDATA%and%LOCALAPPDATA%\OpenClawTraymetadata manifests were unchanged.Missing Usage title during scroll proof.(expected)UsageHero_RealShellCapturesCardAndRangeInLightAndDark(shared helper)scripts\validate-test-timing-patterns.ps1./build.ps1dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csprojdotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csprojgit diff --checkHanselman dual review (Claude Opus 5.5 and GPT-6 Astra, high effort), with a delta re-review of the final head: no blocking issues.
Real Behavior Proof
dotnet test tests\OpenClaw.Tray.UITests -c Debug -r win-x64 -p:DevBuild=false --filter "FullyQualifiedName~UsageHero_ViewportRemainsAnchoredWhileTheCardScrollsAway", with the fixture environment thatscripts\test-gateway-fixture.ps1sets.Security Impact
Yes, explain the risk and mitigation: N/ACompatibility and Migration
Review Conversations