Repository navigation
Conversation
Wait for loaded, enabled, click-enabled cards on the page XamlRoot before invoking onboarding AI actions. Report readiness flags on timeout and cover delayed readiness and blocked invocation. 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. Reviewed September 30, 2026, 6:59 PM ET / 22:59 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch makes framework UI tests wait for onboarding AI cards to become ready, adds delayed-readiness and timeout cases, and documents the test behavior. Merge readiness✅ Ready for maintainer review Current main still invokes onboarding test cards without waiting for readiness. This PR addresses that distinct test gap, and the merged setup-icon PR does not include the fix. No blocking defect was found in the introduced patch. Priority: P3 Review scores
Verification
How this fits togetherFramework UI tests mount the onboarding page in a WinUI test window and invoke its AI choice cards through their XAML handlers. Card state determines whether the test invokes an action or reports a readiness timeout. flowchart LR
A[Mounted onboarding page] --> B[AI choice card]
B --> C{Card ready?}
C -->|Yes| D[XAML action assertion]
C -->|Timeout| E[State diagnostics]
D --> F[Framework test result]
E --> F
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep the readiness guard and deterministic timeout coverage in the framework tests while retaining native input proof in its separate suite. Do we have a high-confidence way to reproduce the issue? No high-confidence recreation of the original intermittent CI failure is available; five reported baseline runs did not fail. Current-main source and deliberately blocked card states establish the narrower invocation-before-readiness gap. Is this the best way to solve the issue? Yes. Reusing the existing render-condition wait before the XAML handler assertion is a focused repair, and the new cases check both eventual invocation and timeout behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e00ce903eda5. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Adapt the framework readiness seam from closed unmerged PR #1559, original commit 8912d67. Wait for the exact AI action card without changing native input or product behavior, retain strict XAML handler checks, and add delayed-state and timeout regressions. Co-authored-by: [email protected] <[email protected]> Co-authored-by: Copilot App <[email protected]>
What Problem This Solves
Fixes a synchronization gap that lets onboarding framework UI tests invoke an AI choice card before that card is ready.
Related: #1558 (fix(setup): show icon in window preview), whose rebased CI failed before the Local AI error scenario was exercised. The test/helper originated in #1531 (feat: guide Windows onboarding from setup to native AI tasks).
User Impact
No product or user-visible behavior changes. CI tests wait for the actual card instead of assuming panel visibility means its controls are ready.
Why This Change Was Made
The card-invocation helper now waits up to 10 seconds for
IsLoaded,IsEnabled,IsClickEnabled, and attachment to the page's non-nullXamlRoot. It retains the strict invocation assertion and XAML handler validation. Timeout diagnostics report each readiness property. Native input proof remains unchanged.The original intermittent failure did not reproduce in five local baseline runs (56 tests each), so the exact property that was false in CI remains unknown. This fixes the identified synchronization gap without claiming the original race was conclusively reproduced.
Evidence
Four new regression cases verify that invocation waits for each readiness flag and that a permanently click-disabled card times out with diagnostic state without invoking its action. All 60 focused onboarding tests and the hosted-framework-equivalent Tray UI suite pass locally.
Automated review is blocked, not clean:
python .agents\skills\autoreview\scripts\autoreview --mode commit --commit 8912d67fb87ad7bc5b49f4e41c96bbbcd5fa7cebreached the default Codex engine but failed with HTTP 401 Unauthorized. A retry using the same engine also failed authentication. No review findings were produced. This PR remains draft pending review and CI.Change Type
Scope
winnodeRequired proof pools
none: only framework test synchronization, diagnostics, regression tests, and test documentation change. No product UI, native-input path, gateway behavior, or custom host capability changes.Validation
All commands used
OPENCLAW_REPO_ROOTand session-isolatedOPENCLAW_TRAY_DATA_DIR,OPENCLAW_TRAY_APPDATA_DIR, andOPENCLAW_TRAY_LOCALAPPDATA_DIR. Fresh Shared/Tray test projects were built first so the required--no-restoreruns executed real tests..\build.ps1dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restoredotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restoredotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-x64 --filter "FullyQualifiedName~OnboardingAiPageTests&Category!=NativeOnboardingProof"dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-x64 --no-build --filter "Category!=Accessibility&Category!=NativeOnboardingProof"Real Behavior Proof
8912d67fb87ad7bc5b49f4e41c96bbbcd5fa7ceb. Validation ran immediately before committing; all three changed files retained identical SHA256 hashes through publication.LocalAi_InvocationWaitsForCardReadinesspasses forIsLoaded,IsEnabled, andIsClickEnabled. Each case blocks readiness, verifies no invocation/completion, restores readiness, and verifies exactly one action and completion.LocalAi_ReadinessTimeoutReportsCardStateWithoutInvokingpasses with state-specific timeout diagnostics and zero actions/completions. The originally failingLocalAi_ConfirmedFailureShowsRepairAndProviderChoicespasses.Security Impact
Compatibility and Migration
Review Conversations