Mirror connection status dot onto lobster tray and desktop icons#945
Mirror connection status dot onto lobster tray and desktop icons#945karkarl wants to merge 2 commits into
Conversation
Compose the lobster mascot with a coloured status dot in its bottom-right corner (green=connected, amber=connecting/attention, red=error, gray= disconnected), mirroring the companion-app HubWindow status pill onto both the tray icon and the desktop/taskbar window icon. - Add StatusBadgeIconFactory: builds cached multi-resolution .ico files per status accent by badging the unplated lobster PNG; thread-safe, falls back to the plain app icon on failure without pinning the fallback in cache. - Add ConnectionStatusPresenter.Accent() so tray and window derive the same accent used by the visible status pill. - Wire TrayIconCoordinator and HubWindow (both UpdateTitleBarStatus overloads and initial setup) to apply the badged icon; initialise the tray icon with the badged neutral lobster from first paint. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The dot diameter now interpolates from 44%% of the icon on tiny tray icons (<=32px, for legibility) down to 26%% on large taskbar / alt-tab icons (>=256px, a subtler corner dot), instead of a fixed 44%%. The white ring is tied to the dot so it shrinks proportionally. Adds DotFraction(size) with a unit test covering the scaling curve. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Codex review: needs maintainer review before merge. Reviewed July 8, 2026, 4:06 PM ET / 20:06 UTC. Summary Reproducibility: not applicable. this is a new tray/HubWindow visual feature, not a broken existing behavior report. Source inspection confirms current main lacks the badged-icon behavior this PR adds. 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:
Next step before merge
Security Review detailsBest possible solution: Land the focused icon-mirroring change after ordinary maintainer review and completed CI, keeping the existing transient-window static icon boundary. Do we have a high-confidence way to reproduce the issue? Not applicable; this is a new tray/HubWindow visual feature, not a broken existing behavior report. Source inspection confirms current main lacks the badged-icon behavior this PR adds. Is this the best way to solve the issue? Yes; the PR uses the existing ConnectionStatusPresenter accent model and keeps the change scoped to tray and HubWindow icons with focused tests. The screenshot now gives enough real visual proof for the neutral status path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 87634727b65b. 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
Review history (1 earlier review cycle)
|
Summary
Mirrors the companion app's connection-status dot onto both the lobster tray icon and the desktop/taskbar (HubWindow) icon. The tray/desktop lobster now shows a coloured status dot in its bottom-right corner, matching the HubWindow status pill:
How it works
StatusBadgeIconFactorycomposes the unplated lobster PNG with a coloured corner dot into cached, multi-resolution.icofiles (16–256px) — one per status accent — written to%TEMP%\OpenClawTray\StatusIcons. BothTrayIcon.SetIcon(path)andWindow.SetIcon(path)consume them.ConnectionStatusPresenter.Accent(overall, status)centralises the accent selection so the tray and desktop icons always agree with the visible HubWindow pill (it delegates to the samePill(state).Accent).TrayIconCoordinator.UpdateTrayIconandHubWindow(bothUpdateTitleBarStatusoverloads + initial setup) apply the badged icon; the tray icon is initialised with the badged neutral lobster from first paint. The existing_isAlive()guard beforeSetIconis preserved.Other transient windows (dialogs, ChatWindow, CanvasWindow, ConnectionStatusWindow) intentionally keep the static
openclaw.ico— only the tray and the companion HubWindow mirror status.Validation
All required AGENTS.md closeout checks pass on this branch head:
./build.ps1— ✅ all projects built (Shared, Cli, WinNodeCli, SetupEngine, WinUI)dotnet test ./tests/OpenClaw.Shared.Tests— ✅ 2697 passed, 31 skippeddotnet test ./tests/OpenClaw.Tray.Tests— ✅ 1602 passedNew/updated tests:
StatusBadgeIconFactoryTests— dot colour mapping, bottom-right dot placement, per-accent colour distinction, valid multi-size ICO container, size-scaling curve (DotFraction), tray/taskbar size coverage.ConnectionStatusPresenterTests—Accent()prefers overall state and falls back to legacy status.AppRefactorContractTests— tray coordinator uses the status-badged lobster; HubWindow desktop icon mirrors the status accent; existing liveness-guard-before-SetIcon contract preserved.A rubber-duck review was run on the change; both findings were fixed:
Real behavior proof
The four badged states were rendered directly from the shipping
StatusBadgeIconFactory.Compose/DotColorcode on the real lobster asset, at both 256px (taskbar/alt-tab) and 32px (tray) sizes. Result: the lobster with a green/amber/red/gray dot in the bottom-right corner; the dot is a subtle corner badge at 256px and a clearly legible dot at 32px.Screenshot:

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com