Skip to content

fix: open the Hub when private desktop shell services are unavailable - #1783

Merged
shanselman merged 3 commits into
openclaw:mainfrom
paulcam206:draft/hub-startup
Oct 23, 2026
Merged

shanselman merged 3 commits into
openclaw:mainfrom
paulcam206:draft/hub-startup

Conversation

@paulcam206

@paulcam206 paulcam206 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: the Hub never opens when optional shell services are unavailable on a private desktop.

User Impact

User impact: the requested Hub can open even when its optional tray icon is unavailable. The expected unsupported-desktop exception is a warning rather than a fatal-crash marker. Current-head hosted review passed the readiness gate.

Why This Change Was Made

Keep the never-activated lifetime anchor independent of shell-switcher registration. Handle only the unsupported optional tray-construction case; other failures remain visible. Failed fixture construction cleans up its own child and temporary profile. The rebased tests exercise WindowManager lifecycle rather than matching implementation text.

Evidence

Current independent head: e16d2f9f4070f91aa1da4958c712c0c0ab80436b, based on public main 2b7cfce17bb496ec5d8f0c563fb71ebb46e015fa. Published Microsoft.Mxc.Sdk 1.0.0 references are unchanged. No unpublished native changes or pin updates.

Current-head CI: 9 successful checks, no failed or pending checks at the 2026-10-21 refresh. The real UI job passed. This does not turn configured skips into proof.

Real-process isolated proof exercised Hub startup, failed-construction cleanup, the hidden runtime anchor and a Gateway-fixture conversation. The actual recovered optional TrayIcon exception previously reached LogCrash, making the unchanged final no-crash guard fail. Current source logs WARN; the same real-app fixture path and original guard passed. No assertion, screenshot threshold or timeout was relaxed.

Local source review of the warning refinement found no blocking source finding; it is not a hosted verdict. Historical installed Hub402 at combined 63a8130977fa091647226b553857f418d9d7007d completed normal onboarding, live operator/paired-node connections, authenticated MCP and coordinator chat. That combined observation is not standalone private-desktop shell-failure proof. Private installed screenshots are not published here.

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

  • windows-winui-interactive: five selected real owned-process startup, runtime-anchor and fixture cases passed on an isolated desktop. This is functional UIA/process proof, not pixel/compositor proof or qualification of the entire pool.

Validation

Final independent source was frozen before commit and verified byte-identical afterward. Tray/native tests ran on task-owned private desktops with isolated roots and verified quiet/WER/native-completion receipts. No installed-state changes.

Command Exact final-source result
.\build.ps1 PASS
dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore 4,635 passed, 0 failed, 25 configured skips
dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore 4,443 passed, 0 failed, 0 skipped; owned private desktop
dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj --no-build --no-restore -r win-x64 --filter "FullyQualifiedName~AccessibilityFixtureStartupTests|FullyQualifiedName~WindowManagerRuntimeAnchorTests|FullyQualifiedName~GatewayFixtureUiTests.HistoricalFractionalVoiceConversationRendersWithoutLoadingPlaceholder" 5 passed, 0 failed, 0 skipped; owned private desktop

UI project built with -r win-x64 -p:Platform=x64 -p:DevBuild=false. The table escapes filter pipes for Markdown; pass ordinary | characters to dotnet.

An earlier proof-controller run produced no managed result and remains a failure. Subsequent runs retained the desktop-creating launcher until native exit and verified native and managed completion. Historical combined63a build/Shared4,685+25skips/privateTray4,469 results remain combined only.

Real Behavior Proof

  • Environment tested: actual source-built Hub on a task-owned non-input private desktop; synthetic loopback Gateway/conversation data. No live provider or installed profile.
  • PR head or commit tested: exact final source committed as e16d2f9f4070f91aa1da4958c712c0c0ab80436b.
  • Exact steps or command run: focused command above, including real startup, cleanup and historical-conversation rendering through the fixture.
  • Evidence after fix: copied actual runner result, not an illustrative schema:
{"Total":5,"Executed":5,"Passed":5,"Failed":0,"Unexecuted":0,"ExitCode":0,"DesktopCreatorRetainedUntilNativeExit":true,"NativeExitReceiptVerified":true}
  • Observed result: the Hub and owned cleanup completed without optional private-desktop tray support. The unchanged final no-crash-marker assertion passed.
  • Screenshot or artifact links verified? N/A for local private evidence. The current-head hosted UI log above is public; local TRX, app logs and native ownership receipts are retained, not represented as publicly fetchable.
  • Not verified or blocked: native pixels/compositor/input and whole interactive-pool qualification. The actual application and UIA/protocol path ran, but synthetic Gateway data is not live-provider/pairing evidence.

Inspectable runtime log and app readback, 2026-10-21

This is new actual runtime evidence, rebuilt and executed at exact current
head e16d2f9f4070f91aa1da4958c712c0c0ab80436b, not a restatement of test counts.
The normal source-built executable ran on an owned private desktop with an
isolated profile and synthetic loopback Gateway. No installed app or Gateway
was used. These excerpts omit profile paths, endpoint addresses and all auth
fields.

Copied from the running application's openclaw-tray.log (local UTC-07):

[2026-10-21 13:49:56.312] [WARN] Tray icon is unavailable on this desktop: Not implemented
[2026-10-21 13:49:56.388] [INFO] Gateway fixture mode: skipping Windows auto-start reconciliation.
[2026-10-21 13:49:56.393] [INFO] [WslKeepAlive] Gateway fixture mode: skipping keepalive start and stale cleanup.
[2026-10-21 13:49:56.507] [INFO] Starting Windows Node in MCP-only mode (no gateway)
[2026-10-21 13:49:59.959] [WARN] Windows declined the Workspace foreground activation request.
[2026-10-21 13:49:59.967] [WARN] Windows declined the Workspace foreground activation request.

The first line is the actual unsupported shell condition, not an injected
exception. Foreground activation was declined on the non-input desktop and is
not concealed. The Hub remained responsive; the app's authenticated local
navigation went to Chat, the native UIA scenario selected the historical
fixture conversation, and the live app response after navigation was:

{
  "appProcessId": 41016,
  "appProcessStartUtc": "2026-10-21T20:49:54.8265783Z",
  "appResponding": true,
  "appStatus": {
    "connectionStatus": "Connected",
    "overallState": "Ready",
    "operatorState": "Connected",
    "nodeState": "Disabled",
    "gatewayVersion": "fixture-1",
    "sessionCount": 6
  },
  "chatSnapshot": {
    "requestedThreadId": "agent:main:fixture-voice",
    "selectedTimeline": {"historyLoaded": true}
  },
  "outcome": "passed",
  "recordedAt": "2026-10-21T13:50:08.428554-07:00"
}

The JSON above is a field-selected transcription of genuine run.json and
fractional-voice-snapshot.json from this one app process. It is not an example
schema or mounted in-process page. The native UIA callback also verified the
final history sentinel and absence of Loading messages...; its unchanged
no-crash-marker guard passed. This is navigation/UIA/readback proof, not pixels,
foreground activation or real-provider proof.

Binary provenance from that same run:

appVersion=2026.10.5-draft-hub-startup.1+103.Branch.draft-hub-startup.Sha.e16d2f9f4070f91aa1da4958c712c0c0ab80436b.e16d2f9f4070f91aa1da4958c712c0c0ab80436b
appSha256=F1F5E0F5A57C59BD5641319508F99DC5BB3FB240B4ED83504E305ECD92E6B448
appAssemblySha256=5CB8980F76766F650803F5646BED0D0D9F318822370BDC9D0200DF6E91459E26

The controller verified clean exact source and unchanged executable hashes,
one executed/passed native app scenario, zero skips, quiet startup/WER and
original native-handle completion. The original app process was absent after
the run. No screenshot is claimed, and the synthetic Gateway's Ready status
does not imply real node pairing or containment.

Security Impact

  • New permissions or capabilities? No
  • Secrets or tokens handling changed? No
  • New or changed network calls? No
  • Command or tool execution surface changed? No
  • Data access scope changed? No
  • If any answer is Yes, explain the risk and mitigation: N/A. Optional shell support does not weaken execution or approval policy.

Compatibility and Migration

  • Backward compatible? Yes
  • Config or environment changes? No
  • Migration needed? No
  • If yes, list the exact upgrade steps: N/A. Existing published SDK 1.0.0 references and authoritative owners are preserved.

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-head hosted review passed: Overall platinum hermit (4/6), Proof platinum hermit (4/6), Patch diamond lobster (5/6). No merge is authorized.

@clawsweeper

clawsweeper Bot commented Oct 20, 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-repro Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

This PR allows Hub startup without unsupported desktop shell services and cleans up accessibility fixtures when window discovery fails.

Example: Launch Companion on a private Windows desktop where tray construction throws NotImplementedException.

  • Before: Startup stops before the requested Hub becomes available.
  • After: Companion logs a warning and continues to a responsive Hub.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with adequate exact-head application evidence, meaningful lifecycle coverage, and no actionable finding; draft status does not reduce the rating.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (logs): New evidence at e16d2f9 connects TrayController's actual unsupported-shell warning to a responsive source-built Hub, authenticated navigation, loaded history, and native UIA observations on an isolated private desktop. The earlier proof request is satisfied; the historical Permissions screenshot is not credited to this change, and no foreground, compositor, live-provider, or pairing claim is inferred.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A requested Hub does not open when a private desktop lacks optional shell services.
Reason: Opening an explicitly requested application window should not depend on optional tray support, and the repair preserves the established surface owners without adding configuration or parallel behavior.

Merge readiness

✅ Ready for maintainer review

This PR fixes a startup failure still present on current main; the new runtime evidence resolves the previous proof request, and no introduced correctness or security defect was found.

Priority: P2
Reviewed head: e16d2f9f4070f91aa1da4958c712c0c0ab80436b

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: A failing run of the new regression tests on the pinned base is not supplied; exact-head real-executable startup, navigation, and lifecycle results are documented.
Agent review details

How this fits together

App initializes WindowManager's hidden runtime anchor and TrayController before opening the requested Hub; the accessibility fixture launches an isolated executable and navigates it through the existing activation path.

flowchart TD
  A[Application launch] --> B[Hidden runtime anchor]
  B --> C[Optional tray construction]
  C --> D[Unsupported shell warning]
  C --> E[Requested Hub]
  D --> E
  E --> F[Navigation and UI Automation]
Loading

Technical review

Best possible solution:

Retain the narrow fixes in WindowManager and TrayController, with the existing native lifecycle and fixture-cleanup coverage.

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

Current main performs both shell-dependent operations before opening the requested Hub, and the contributor's exact-head runtime log demonstrates the unsupported tray condition; this review did not execute current main.

Is this the best way to solve the issue?

The patch removes an unnecessary shell operation and handles the specific optional-tray failure at its existing owner while preserving other startup failures and shutdown ownership.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Hidden runtime anchor keeps the original intent (3a097bc: The ownership extraction carried the anchor into WindowManager; earlier runtime work retained it as a persistent XamlRoot host. Earlier introduction of the switcher assignment remains unknown because historical blobs were unavailable.)
  • Tray construction and lifetime keeps the original intent (3a097bc: The merged ownership extraction centralized tray creation, callbacks, and disposal in TrayController.)
  • Real-process accessibility fixture keeps the original intent (e0a2301: The fixture launches the actual executable and verifies acknowledged navigation instead of scanning synthetic in-process pages.)
  • Runtime-anchor source assertions keeps the original intent (c1d8953: The standalone-chat removal protected Workspace ownership and background startup; this PR replaces anchor implementation assertions with native lifecycle tests while retaining the separate retired-popup guards.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Barbara Kudiess: Raw commit 3a097bc adds src/OpenClaw.Tray.WinUI/Services/WindowManager.cs:93 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3a097bc85f7b; files: src/OpenClaw.Tray.WinUI/Services/WindowManager.cs)
  • Karen: Raw commit e0a2301 adds tests/OpenClaw.Tray.UITests/AccessibilityAppFixture.cs:120 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e0a2301ce2e8; files: tests/OpenClaw.Tray.UITests/AccessibilityAppFixture.cs)
  • Scott Hanselman: Raw commit 588df90 adds tests/OpenClaw.Tray.UITests/AccessibilityAppFixture.cs:92 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 588df9071f0f; files: tests/OpenClaw.Tray.UITests/AccessibilityAppFixture.cs)

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: The fix restores Hub startup on unsupported private desktops, a concrete failure with a limited validation and advanced-user blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-20T18:23:58.514Z sha 8c37263 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-21T20:29:39.148Z sha e16d2f9 :: needs real behavior proof before merge. :: none

Reviewed October 21, 2026, 5:33 PM ET / 21:33 UTC (Revision 3).

Extract the independently reviewed reliability seam without the held native timeout consumer. No change to executor releases, package pins or sandbox enforcement.
@paulcam206

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

🦞👀
Exact review queued.

Re-review progress:

@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. 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 Oct 21, 2026
@paulcam206

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. 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 rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 21, 2026
@paulcam206
paulcam206 marked this pull request as ready for review October 21, 2026 21:40
@shanselman shanselman added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 23, 2026
@shanselman
shanselman merged commit f5f1033 into openclaw:main Oct 23, 2026
41 checks passed
@shanselman shanselman removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 23, 2026
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. proof: sufficient Contributor real behavior proof is sufficient. 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.

2 participants