Fix tray menu toggle flicker#545
Conversation
Add a tray-menu-specific ToggleSwitch style that preserves the WinUI control shape while removing the default switch reposition animation that flickers on menu open. Wire the tray connection and permissions toggles through the shared helper so their state updates remain centralized. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Codex review: needs real behavior proof before merge. Reviewed May 26, 2026, 4:55 PM ET / 20:55 UTC. Summary Reproducibility: no. high-confidence runtime reproduction was established in this read-only review. Source inspection supports the reported path because current main creates fresh tray-menu toggles on menu build, but the visible flicker itself needs a Windows tray UI capture. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance: Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Merge after a short redacted recording of the real Windows tray menu shows connection and permissions toggles opening in the correct state with no visible flicker, with validation kept current. Do we have a high-confidence way to reproduce the issue? No high-confidence runtime reproduction was established in this read-only review. Source inspection supports the reported path because current main creates fresh tray-menu toggles on menu build, but the visible flicker itself needs a Windows tray UI capture. Is this the best way to solve the issue? Unclear. The implementation is narrow and tray-scoped, but the submitted proof does not yet confirm that it fixes flicker without template regressions in the real tray UI. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 9de9b5ba0f8a. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
Use the tray menu window instance to resolve the local ToggleSwitch style after scoping it to TrayMenuWindow resources. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
The tray menu rebuilt fresh WinUI toggles on each open, which exposed the default switch reposition animation as a visible off-to-on flicker. This change keeps the standard WinUI switch visuals while making the tray menu switch state apply instantly.
ToggleSwitchtemplate that preserves the WinUI switch dimensions, radii, and theme resources.RepositionThemeAnimationpath only for tray menu toggles, so the connection and permissions toggles do not flicker when menus open.TrayMenuWindowinstance so the popup can open reliably after scoping the style locally.XAML review notes
ToggleSwitch*theme resources for Light/Dark/High Contrast behavior.TrayMenuWindowto avoid broad app-wide control template changes.ToggleSwitchshape, brushes, or sizing.Validation
./build.ps1dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restoredotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore