Repository navigation
fix(tray): restore icon after Explorer restart - #1179
Conversation
Bump WinUIEx to the release that re-registers TrayIcon on TaskbarCreated. Keep CS0618 visible but non-fatal because WinUI's generated XamlTypeInfo still references WinUIEx.Icon.FromFile. Co-authored-by: Copilot App <[email protected]> Copilot-Session: ea6ca262-e24c-4a46-99c1-1a7b59b24943
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper automerge |
|
🦞🧹
Draft PRs stay fix-only until GitHub marks them ready for review. Pause with Automerge progress:
Re-review progress:
|
|
Codex review: passed. Reviewed August 19, 2026, 3:42 PM ET / 19:42 UTC. ClawSweeper reviewWhat this changesUpdates the WinUI tray project from WinUIEx 2.9.0 to 2.9.3 and makes CS0618 non-fatal because generated XAML still calls the library’s legacy icon API. Regression provenancePossible regression — probable (reproduction; reviewed change; known regression link). No predecessor PR is attributed. Merge readinessKeep open. This active collaborator PR is the focused candidate fix for the linked Explorer-restart tray failure; current main still uses WinUIEx 2.9.0, while the PR raises it to 2.9.3 with direct native Windows after-fix proof. Priority: P1 Review scores
Verification
How this fits togetherThe WinUI tray app owns one notification icon through TrayController and WinUIEx. When Explorer recreates the taskbar, the library must restore that icon so the still-running OpenClaw process remains reachable. flowchart LR
A[OpenClaw tray process] --> B[Tray controller]
B --> C[WinUIEx notification icon]
D[Explorer restart] --> E[Taskbar recreated event]
E --> C
C --> F[Visible OpenClaw tray controls]
Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Adopt the upstream taskbar-recovery behavior through the existing TrayController boundary once exact-head CI completes successfully. Do we have a high-confidence way to reproduce the issue? Yes. The PR provides a current-head native Windows path that restarts Explorer, preserves the app PID, and observes the tray icon again in the replacement taskbar. Is this the best way to solve the issue? Yes. The direct dependency signal in the tray project and existing TrayController ownership make the upstream recovery update narrower than adding a parallel local shell handler. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b37307cbd51f. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Fixes #1176.
Summary
TaskbarCreatedrecovery so the existing tray icon is re-registered afterexplorer.exerestartsWinUIEx.Icon.FromFileobsolete warning visible but non-fatal until the XAML generator stops emitting that legacy typeThis preserves the existing
TrayControllerownership boundary and does not add a parallel shell-recovery implementation.Validation
Validated on exact commit
f960a908on Windows x64:./build.ps1passed: Shared, CLI, WinNodeCli, SetupEngine, and WinUIdotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restorepassed: 3,698 passed, 32 skipped, 0 faileddotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restorepassed: 2,619 passed, 0 skipped, 0 failedgit diff --checkpassedReal behavior proof
Current-head native Windows proof exercised the real taskbar shell:
OpenClaw.Tray.WinUI.exeObserved proof:
Local proof artifacts include before/after taskbar Live Visual Tree dumps and screenshots from the exact fixed build.
Risk
Low. The behavior change is isolated to a patch-level dependency update whose release notes specifically identify the Explorer restart tray-icon fix. The only additional project setting downgrades CS0618 from error to warning because WinUI-generated
XamlTypeInfo.g.csreferences WinUIEx's now-obsoleteIcon.FromFileAPI.