Skip to content

fix(tests): Systems UI checks fail during native transitions - #2124

Merged
bkudiess merged 2 commits into
openclaw:mainfrom
bkudiess:bkudiess-main-systems-ci-repair
Nov 12, 2026
Merged

bkudiess merged 2 commits into
openclaw:mainfrom
bkudiess:bkudiess-main-systems-ci-repair

Conversation

@bkudiess

@bkudiess bkudiess commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Required host validation and targeted CI proof passed; overall CI is still awaiting the ordinary UI rerun. Head 1c6cd266fa79331311987f876f6d0a6ad8e68a2d, tree a8849401c05fa52641d7e9732d8e8ef05f06ee8e, base 2a23706991584d5bcb813f40deda4cd2883667bc. No merge-readiness or main-green claim.

What Problem This Solves

Fixes: Systems native checks can lose controls during transitions, and Usage hero proof can look for the main session outside the ten-row preview.

User Impact

User impact: no shipped product behavior changes. This five-file test/validation update preserves the native journeys, ownership, geometry, visibility and content assertions.

Why This Change Was Made

Systems retains the window-scoped observations admitted by its existing waits, keeps native actions one-shot, and binds capture metadata to the retained viewport. Pure readiness predicates are simplified without changing their conditions. Usage reveals the remaining loaded sessions through the existing Show more action before locating the main row; its exact 13-line hunk is reused from 4122e0f759355429a30a3f3e14a7c650b385db08.

Individual wait limits remain 20 seconds, but capture adds bounded viewport admission, so aggregate potential waiting is not unchanged. The original transient UIA-provider omission cause remains unknown.

Evidence

On exact 1c6cd266/a8849401, the full build and both unfiltered host suites passed once: Shared 5,847 passed / 29 policy skips / 0 failed and Tray 6,301 passed / 0 skipped / 0 failed. Both wrapper exits were 0; the checkout stayed clean and normal-profile metadata delta was 0.

Run 43180925681, attempt 1: current-tree mock Gateway CI proof passed 55/55 profile/application cases and 124/124 fixture UI cases, zero skipped. Systems Daily passed in 25.603s and Usage Hero in 40.364s. All three native ownership cases also passed in the ordinary UI lane. Release correlation 2/2, Release reader 2/2, and stable-profile compatibility 1/1 passed.

The exact-head Hanselman contexts completed both stages with no P0-P3 code findings. Host-reported model IDs were claude-opus-5.5 (high/default context) and gpt-6-astra (high/long context); model self-identification was not independently trusted. Their stale-body concern has been reconciled.

Remaining CI gate: the first ordinary UI attempt failed an unchanged initial-draft assertion before send. The three ownership cases passed several minutes later. The landing coordinator owns the UI rerun; attempt 2 is still in progress at this update. No claim that all CI is green.

Preserved failures and historical proof limits
  • The guest Shared attempt's two environment-sensitive failures (missing bash and Sandbox DNS name length 36 versus MachineName length 15) remain failures. The separately authorized host route passed once; it does not rewrite the guest result.
  • An earlier a8849401 host attempt failed real-profile metadata admission. The drift cause remains unknown; that attempt is not retroactively accepted.
  • Earlier df4f2d21 proof is historical, not current acceptance. Its Tray wrapper exited 1 on discovery 6,265 versus execution 6,301; source-backed reconciliation admitted the unchanged original TRX/native exit 0 without rerunning tests or changing assertions. Earlier targeted Debug/unsigned Release frames were not a full interactive-pool proof.
  • The controlled legacy observer negative is not the historical CI binary, and the controlled Usage preview proof is not the full fixture run. Current fixture coverage is the separate CI result above.
  • Earlier same-model narrative reviews were not the current Hanselman pair. The Codex attempt failed authentication (401) and produced no assessment.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs
Exact five-file scope
  • tests/OpenClaw.GatewayFixtureHost/OpenClaw.GatewayFixtureHost.csproj
  • tests/OpenClaw.Tray.UITests/GatewayFixtureSystemsUiTests.cs
  • tests/OpenClaw.Tray.UITests/GatewayFixtureUiTests.UsageResponsive.cs
  • tests/OpenClaw.Tray.UITests/NativeUiOwnershipTests.cs
  • tests/OpenClaw.Tray.UITests/OwnedWindowCapture.cs

No composer/product changes or diagnostic twelve-row fixture are included.

Required proof pools

  • windows-winui-interactive: targeted current-tree Systems/Usage and native ownership CI evidence passed. The full interactive/accessibility pool is not claimed complete.

Validation

These host commands ran on 1c6cd266 once each. Only private result-directory paths are abbreviated; there was no filter or expected-count override. The existing wrapper invokes dotnet test --no-build, which implies no restore.

# Passed, exit 0, 260.5 seconds.
pwsh -NoProfile -File .\build.ps1

# Passed, exit 0: total 5876; 5847 passed, 29 policy skips, 0 failed.
pwsh -NoProfile -File .\scripts\Invoke-CiTest.ps1 `
  -Project .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj `
  -Configuration Debug -ResultsDirectory $sharedResults `
  -TrxFileName Shared-Host.trx -HangTimeoutSeconds 300

# Passed, exit 0: 6301 passed, 0 skipped, 0 failed.
pwsh -NoProfile -File .\scripts\Invoke-CiTest.ps1 `
  -Project .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj `
  -Configuration Debug -ResultsDirectory $trayResults `
  -TrxFileName Tray-Host.trx -HangTimeoutSeconds 300

All three profile roots were isolated, OPENCLAW_STATE_DIR and the legacy local-data override were cleared, and TEMP/PATH changes were process-local. Shared skips were the verified opt-in categories; neither host suite was retried. Original TRX/invocation/profile records remain private, not public evidence links.

Additional current-tree evidence Result
CI mock Gateway profile/application + fixture UI 55/55 + 124/124 passed, zero skipped
CI SystemsDaily_InsetAndExpandedNativeFrames Passed, 25.603s
CI UsageHero_RealShellCapturesCardAndRangeInLightAndDark Passed, 40.364s
CI three NativeUiOwnershipTests cases All passed
CI Release correlation / Release reader / stable compatibility 2/2 / 2/2 / 1/1 passed
Hanselman Opus 5.5 plus Astra/high Both stages completed; no P0-P3 code findings
Overall CI / ordinary UI rerun Still in progress; not yet green
git diff --check Passed; source unchanged

Real Behavior Proof

  • Environment tested: authorized isolated-profile Windows host for managed closeout; hosted Windows CI and synthetic Gateway for current native fixture proof.
  • PR head or commit tested: host 1c6cd266fa79331311987f876f6d0a6ad8e68a2d; CI synthetic merge 5d48f99e805485ee2a4f9e6e387b00806d0fabc2, parents 2a237069 and 1c6cd266. Both have exact tree a8849401c05fa52641d7e9732d8e8ef05f06ee8e.
  • Exact steps or command run: host commands above; CI's existing mock Gateway application, Release correlation/reader and stable-profile steps, plus the ordinary UI ownership cases.
  • Evidence after fix: raw CI fixture TRX records 124 passed, including Systems and Usage; all three ownership cases passed. Host Shared/Tray results and source/profile checks were verified against their recorded invocations.
  • Observed result: targeted current-tree behavior and required host suites passed. Overall CI is still awaiting the coordinator-owned ordinary UI rerun.
  • Screenshot or artifact links verified? (Yes/No/N/A) Yes for linked CI run/job evidence. No new local screenshots or private artifacts uploaded.
  • Not verified or blocked: final overall CI acceptance. No claim of a new local native batch, full interactive/accessibility-pool completion, signed distribution, native ARM64, or real Gateway/provider proof.

Security Impact

  • New permissions or capabilities? (Yes/No) No.
  • Secrets or tokens handling changed? (Yes/No) No.
  • New or changed network calls? (Yes/No) No.
  • Command or tool execution surface changed? (Yes/No) No product surface change; friend access is between test assemblies.
  • Data access scope changed? (Yes/No) No product change; test observations are scoped to the owned window.
  • If any answer is Yes, explain the risk and mitigation: N/A.

Compatibility and Migration

  • Backward compatible? (Yes/No) Yes.
  • Config or environment changes? (Yes/No) No product configuration changes.
  • Migration needed? (Yes/No) No.
  • If yes, list the exact upgrade steps: N/A.

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

Current validation/review conversations remain for the landing coordinator to reconcile; this update does not claim they are resolved.

Retain admitted controls from the owned window across the Systems proof journey.
Keep native actions one-shot and bind capture metadata to the retained viewport.
Cover delayed and missing target viewports with real same-process window tests.

Co-authored-by: Copilot App <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Nov 12, 2026
@clawsweeper

clawsweeper Bot commented Nov 12, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

The PR retains window-scoped UI controls across Systems test transitions and verifies viewport identity and geometry around captures.

Example: The Systems test expands navigation at a 1000 DIP window width while UI Automation temporarily omits SystemsPageScroll.

  • Before: A fresh lookup after readiness can return null and fail the journey.
  • After: The test waits for an owned viewport, retains admitted controls, and checks capture geometry without weakening content assertions.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, coherent test repair with no definite correctness finding; public evidence is mainly reported native harness execution rather than inspectable transition artifacts.
Proof confidence 🦐 gold shrimp (3/6) The ordinary contributor proof gate does not apply to this collaborator-authored test-only PR; the body reports source-matched native Debug/Release execution and includes an aggregate Release terminal result, while detailed captures and original reports remain private.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Developers receive false Systems UI failures while native controls are transitioning.
Reason: The maintainer-authored repair preserves meaningful native proof rather than skipping the journey or weakening its geometry, ownership, content, and failure checks.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR addresses concrete test-readiness races absent from main, with no definite introduced defect found.

Priority: P2
Reviewed head: 9a615f8eff099473807a927879cad9c14e60ccf9

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The reported negative baseline exercises a controlled legacy algorithm rather than replaying the historical failing binary.
Agent review details

How this fits together

The native UI test harness drives Companion against a synthetic Gateway, observes its owned window through UI Automation, and produces assertions, screenshots, and metadata.

flowchart LR
  A[Synthetic Gateway] --> B[Companion Systems page]
  C[Systems test journey] --> B
  B --> D[Owned window observations]
  D --> E[Retained controls and viewport]
  E --> F[Assertions and capture artifacts]
Loading

Technical review

Best possible solution:

Retain the admitted controls and bounded viewport checks in the existing test owners while preserving the complete Systems journey.

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

Main contains separate readiness/action lookups and direct leaf-PID assertions that explain the reported failure paths; the historical failing binary and exact CI trace were not reproduced during this read-only review.

Is this the best way to solve the issue?

The repair uses existing wait, ancestry, and capture owners, preserves one-shot actions and independent assertions, and adds no competing production path; the transient UIA-provider omission itself remains unexplained.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Systems Daily journey and capture assertions keeps the original intent (f059221: feat: Systems shows Gateway machines, live resource readings and related sessions #1888 introduced native Systems inventory and resource proof; its follow-up readiness correction explicitly preserved timeouts and geometry/capture assertions.)
  • Collapsed viewport stability and ownership admission keeps the original intent (e59374c: The merged change waits for visible, measured, top-scrolled, stable geometry before expansion; this PR retains those requirements while applying the native-ancestry ownership contract from fix: setup choices disappear and UI checks fail before controls are ready #2115.)
  • Owned-window capture keeps the original intent (4895ed5: The existing capture owner restricts screenshots to the owned HWND and rejects cropped controls or blank native content; the added viewport snapshot preserves those checks and binds metadata to retained geometry.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned PR scope: The introduced diff changes only four test/support files; no shipping source changes. The committed tree is df4f2d213c941fb681de9af6c2b671d380756194, matching the tested source tree recorded in the full PR body. (9a615f8eff09)
  • Existing ownership contract preserved: Main's collapsed-viewport readiness check directly compares leaf PIDs; the PR uses the existing native-ancestry owner, which admits windowless XAML peers only after verifying their native window and process. (tests/OpenClaw.Tray.UITests/GatewayFixtureSystemsUiTests.cs:524, 9a615f8eff09)
  • Capture observations remain strict: Viewport admission requires owned ancestry, visibility, finite positive geometry, and containment; post-capture checks retain runtime identities and exact window/viewport bounds. (tests/OpenClaw.Tray.UITests/OwnedWindowCapture.cs:86, 9a615f8eff09)
  • Distinct native regression cases: The added cases with two real same-process windows distinguish delayed target admission, missing-target timeout, rejection of a decoy viewport, and changed snapshot geometry. (tests/OpenClaw.Tray.UITests/NativeUiOwnershipTests.cs:61, 9a615f8eff09)
  • Discussion and supplied validation: The full body reports Debug and unsigned Release native runs, retained geometry/content checks, and a controlled legacy-algorithm negative baseline; it explicitly distinguishes that baseline from the historical failing binary and provides only an aggregate Release terminal result publicly. (9a615f8eff09)
  • Main failure and current checks: The cited main run failed its mock-Gateway scenario step; current-head checks inspected had no reported failures but included running jobs. Historical job-log access redirected to a blocked Azure host, so the exact failure trace was not independently read. (2a2370699158)

Likely related people:

  • Scott Hanselman: Raw commit 3e74082 adds tests/OpenClaw.GatewayFixtureHost/OpenClaw.GatewayFixtureHost.csproj:6 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 3e740827aeb1; files: tests/OpenClaw.GatewayFixtureHost/OpenClaw.GatewayFixtureHost.csproj)

Preflight source

Source 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

Metric Value Why it matters
Test/support scope +605 / -150 lines; shipping source +0 / -0 Growth comes from retaining successful observations throughout the existing journey, strict viewport snapshots, and two distinct native regression cases.

Labels

Label changes:

  • add P2: False failures affect native Systems validation, with no demonstrated shipped-product regression or urgent user outage.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: False failures affect native Systems validation, with no demonstrated shipped-product regression or urgent user outage.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 12, 2026, 12:06 AM ET / 05:06 UTC.

Simplify pure Systems readiness predicates without changing native actions,
assertions, retained-window ownership, or wait limits.

Reuse the exact 13-line Usage preview-expansion hunk authored in
4122e0f, before locating the main session.
Keep the existing fixture data, geometry assertions, and test timeouts.

Co-authored-by: Copilot App <[email protected]>
@bkudiess
bkudiess merged commit b57f121 into openclaw:main Nov 12, 2026
53 of 55 checks passed
bkudiess added a commit to bkudiess/openclaw-windows-node that referenced this pull request Nov 12, 2026
Use semantic theme-aware picker text, reject tail overshoot, and preserve native test readiness and capture identity. Usage pagination is already supplied by main through openclaw#2124.

Co-authored-by: Copilot App <[email protected]>
bkudiess added a commit to bkudiess/openclaw-windows-node that referenced this pull request Nov 12, 2026
Use semantic theme-aware picker text, reject tail overshoot, and preserve native test readiness and capture identity. Usage pagination is already supplied by main through openclaw#2124.

Co-authored-by: Copilot App <[email protected]>
bkudiess added a commit that referenced this pull request Nov 12, 2026
* feat(chat): open tool details beside native chat

Co-authored-by: Copilot App <[email protected]>

* fix(tests): preserve chat assertions through details wrapper

Locate the mounted conversation by its stable automation ID instead of assuming the former root shape. Preserve queued-message and composer color checks and assert the conversation wrapper remains transparent.

Co-authored-by: Copilot App <[email protected]>

* fix(chat): retire unverified details on profile changes

Distinguish explicit identity events from bootstrap refreshes. Retire Details until reconnect when identity changes before the first verified baseline. Cover delayed and failed initial reads, bootstrap recovery and same-profile revalidation; document the fail-closed tradeoff.

Co-authored-by: Copilot App <[email protected]>

* fix(chat): refine tool details layout and keyboard access

Keep the open-details action inside tool cards and match the Copy glyph size.
Align pane backgrounds with a full-height separator and theme-aware output.
Preserve reader state through availability changes, avoid empty details, and
include compact navigation and localized resize instructions.

Co-authored-by: Copilot App <[email protected]>

* test(chat): recognize in-card tool detail layout

Keep reading-column, scrolling, divider, and nested-tool assertions while discovering sections through the action layout. Assert the reserved command-input inset independently.

Co-authored-by: Copilot App <[email protected]>

* fix(chat): stabilize native popup and tail validation

Use semantic theme-aware picker text, reject tail overshoot, and preserve native test readiness and capture identity. Usage pagination is already supplied by main through #2124.

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: Copilot App <[email protected]>
bkudiess added a commit that referenced this pull request Nov 13, 2026
…t, and Systems and Automations fixture checks fail during re-renders (#2146)

* fix(automations): remove confirmation can open with focus on body text, and Systems and Automations fixture checks fail during re-renders

The Automations remove confirmation queued its Cancel focus from Opened, which
raced WinUI's own initial-focus step and sometimes left focus on the selectable
body text. DialogInitialFocus redirects the first focus entering the dialog to
Cancel inside WinUI's focus step, retries after layout while Cancel is not yet
realized or focusable (a dialog opened right after another closed), and stops
on real user input.

#2124's ownership checks ran as one-shot asserts inside polling waits. While
Systems and Automations re-render, a just-found element can be torn down before
ownership is proven. NativeUiOwnership.Classify now returns Owned, Unproven or
Foreign: polls keep polling on Unproven and still fail immediately on Foreign.
IsOwnedDescendant remains Owned-only. Systems captures re-find their controls
inside the wait.

Co-authored-by: Copilot App <[email protected]>

* fix(tests): dialog focus test no longer assumes Cancel exists when Opened fires

CI showed ContentDialog.Opened firing before the Cancel template part is
realized even on the first open. Every confirmation now uses the
timing-independent check: the first focus inside the dialog once Cancel exists
is Cancel, Cancel keeps it, and no other element takes focus afterwards. The
"later focus is never stolen" proof focuses the body after Cancel holds focus
and requires it to stay.

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: Copilot App <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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