Skip to content

fix: desktop lobster notification test races mascot rendering - #2178

Merged
karkarl merged 1 commit into
openclaw:mainfrom
karkarl:karkarl-desktop-mascot-test-race
Nov 13, 2026
Merged

karkarl merged 1 commit into
openclaw:mainfrom
karkarl:karkarl-desktop-mascot-test-race

Conversation

@karkarl

@karkarl karkarl commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Related: #1681 (feat: add an animated desktop lobster with notification bubbles)

What Problem This Solves

Fixes: the desktop lobster notification UI test intermittently fails when the bubble renders before the mascot mood.

User Impact

User impact: no user-visible change; CI no longer assumes the popup and mascot finish rendering together.

Why This Change Was Made

The popup and mascot reconcile on separate Reactor hosts. Wait for the expected mood, bubble visibility and literal text together on presentation and dismissal, rather than using bubble layout as a proxy for mascot readiness. Assert that the original mascot is retained. No sleeps, retries, timeout increases or production changes.

Evidence

Main CI run 43479032853, attempt 1 recorded Warning / Attentive failing at 151 ms with Actual: Idle. After the fix, all four severity cases passed on native Windows ARM64, including warning at 81 ms. Full build and required managed suites passed.

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

Required proof pools

  • none: test synchronization only in the hosted framework UI lane; no product behavior, native input, visual design, accessibility or platform contract changes.

Validation

  • .\build.ps1: passed, all five build targets.
  • dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-arm64 --filter 'FullyQualifiedName~DesktopCompanionWindowTests.Notification_UsesExistingMascot_ShowsLiteralText_AndDismissesLocally': passed, 4/4, no skips.
  • dotnet build .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --verbosity quiet: passed.
  • dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore --verbosity quiet: passed, 5,863 passed, 28 skipped, 0 failed.
  • dotnet build .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --verbosity quiet: passed.
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --verbosity quiet: passed, 6,482 passed, 0 skipped or failed.
  • .\scripts\validate-test-timing-patterns.ps1: passed; unrelated existing baseline-lowering warnings only.
  • git diff --check: passed.

Test commands used isolated profile roots and OPENCLAW_REPO_ROOT; inherited integration, E2E, GPU-proof and state-directory overrides were cleared. Console/TRX logging arguments were also supplied, and retained reports were checked for actual execution counts.

Real Behavior Proof

  • Environment tested: native Windows ARM64, Debug, .NET SDK 10.0.404, Windows App SDK 2.6; task-owned isolated WinUI test windows.
  • PR head or commit tested: fa123b0cef9b3eeb9efc78ab11aafda7041e2afa; tests ran on the unchanged uncommitted patch based on 90653249bd8a6729a423d308928c4728655ff08f, then that exact patch was committed without further code edits.
  • Exact steps or command run: focused UI command in Validation, covering Informational, Success, Warning and Error.
  • Evidence after fix: copied focused-run summary: Test Run Successful. Total tests: 4. Passed: 4. Warning/Attentive passed in 81 ms.
  • Observed result: each severity reached its expected mood and literal notification text; dismissal reached Idle, collapsed the bubble and cleared text, while retaining the same mascot.
  • Screenshot or artifact links verified? (Yes/No/N/A) N/A; no visual changes or public artifact links.
  • Not verified or blocked: post-fix x64 hosted CI remains pending. The pre-fix failure was verified in main CI logs, not reproduced locally. WinApp CLI was unavailable; the existing native WinUI harness ran successfully. No new visual, Gateway or packaging proof is claimed. This small test-only fix did not require independent rubber-duck review.

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
  • Data access scope changed? (Yes/No) No
  • 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
  • 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.

Wait for notification and dismissal state across both Reactor hosts instead of treating bubble layout as mascot readiness. Preserve severity, literal-text, dismissal, and retained-mascot assertions without sleeps or retries.

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

clawsweeper Bot commented Nov 13, 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 clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 13, 2026
@clawsweeper

clawsweeper Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

This PR waits for notification text, bubble visibility, and mascot mood together during presentation and dismissal.

Example: A Warning notification displays “<b>Literal text</b> & a lobster”.

  • Before: The test can assert Attentive while the independently rendered mascot is still Idle.
  • After: The test waits for Attentive and the visible literal message, then verifies dismissal and the retained mascot.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct test repair supported by reported native execution and required managed validation; hosted checks are still running.
Proof confidence 🐚 platinum hermit (4/6) No shipped behavior changes require separate runtime proof; the reported current-patch native ARM64 harness run exercised all four severity cases successfully, and the inspected screenshots belong to the earlier feature.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Contributors encounter an intermittent CI failure when bubble rendering finishes before the mascot mood updates.
Reason: The feature owner proposes a narrow correction to the test's readiness assumption without changing the product contract.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR fixes a concrete test synchronization race still present on main, without weakening coverage or changing production behavior.

Priority: P3
Reviewed head: fa123b0cef9b3eeb9efc78ab11aafda7041e2afa

Before merge

None.

Findings

None.

Agent review details

How this fits together

DesktopCompanionWindow sends presentation state to separate Reactor hosts for the mascot and notification bubble; the native UI test observes both rendered results.

flowchart TD
  A[Native UI test] --> B[DesktopCompanionWindow]
  B --> C[Presentation state]
  C --> D[Mascot Reactor host]
  C --> E[Bubble Reactor host]
  D --> F[Combined readiness assertion]
  E --> F
Loading

Technical review

Best possible solution:

Use the existing bounded render wait to observe both hosts while preserving severity, literal-text, dismissal and mascot-identity contracts.

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

Source establishes independent rendering and premature assertions; the PR cites a Warning/Attentive failure with Actual Idle, but this review could not independently inspect the redirected failure log or execute the test.

Is this the best way to solve the issue?

The patch addresses the incorrect readiness condition directly using the existing helper, preserves every behavioral assertion, and introduces no additional machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Desktop companion notification test readiness keeps the original intent (fbc0287: The original feature deliberately retained the animated mascot while hosting the notification bubble in a separate acrylic popup.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Karen: Raw commit fbc0287 adds tests/OpenClaw.Tray.UITests/DesktopCompanionWindowTests.cs:239 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: fbc02870795c; files: tests/OpenClaw.Tray.UITests/DesktopCompanionWindowTests.cs)

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.

Labels

Label changes:

  • add P3: This focused test reliability repair has no production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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:

  • P3: This focused test reliability repair has no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 13, 2026, 2:04 PM ET / 19:04 UTC.

@karkarl
karkarl merged commit ff53001 into openclaw:main Nov 13, 2026
34 checks passed
bkudiess added a commit that referenced this pull request Nov 13, 2026
… mood before it renders (#2181)

The mascot and the notification bubble reconcile on separate Reactor hosts,
so bubble layout or message text does not mean the mascot has rendered the
arrival mood. MascotScale captured its original mood too early and could
then count the arrival as a scaling change; the Reactor reconcile test read
the first-arrival mood and the second arrival's two mood changes once.
Wait for the combined bubble and mascot condition with diagnostics, as
#2178 does for the notification test. Test-only.

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

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. 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