Repository navigation
feat(appearance): follow dashboard theme branding in the Companion - #2219
paulcam206 wants to merge 5 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: ready, awaiting a maintainer decision. What this changesAdds optional Gateway themes and makes Companion brand marks and chat working indicators follow the selected theme’s branding. Example: Select CRT and start a chat reply.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⏳ Ready, awaiting maintainer decision Keep this PR open: it adds distinct behavior absent from main, and the previous accessibility finding is fixed. No new actionable code defect was identified; the draft stack still needs an owner decision on the appearance direction. Priority: P3 Decision needed
Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe existing authenticated operator connection supplies theme descriptors and definitions; Companion settings retain the selection, and WinUI resource and branding owners apply it to native surfaces. flowchart LR
Gateway[Gateway theme catalog] --> Catalog[Companion catalog]
Catalog --> Settings[Appearance settings]
Settings --> Applicator[Theme applicator]
Applicator --> Resources[WinUI resources]
Applicator --> Branding[Branding state]
Branding --> Views[Brand marks and chat progress]
Technical reviewBest possible solution: Resolve the opt-in appearance direction, then land the branding extension through the existing theme applicator, BrandMark control, and chat progress renderer after its foundation. Do we have a high-confidence way to reproduce the issue? This is a feature proposal: current-main source confirms fixed branding, and contributor screenshots demonstrate the proposed themed states. Is this the best way to solve the issue? The branding layer extends existing presentation owners and preserves status text when no glyph is requested; its value depends on accepting the underlying theme feature. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7648d0b42a7e. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 14, 2026, 6:49 AM ET / 11:49 UTC (Revision 2). |
697f3c6 to
d1cf57e
Compare
General settings can apply one of the Gateway's dashboard themes: the
built-in themes, plus plugin and imported themes read from the connected
Gateway through themes.list and themes.get. A separate "Mica backdrop"
setting chooses tinted Mica or the theme's opaque canvas, and "Follow
Gateway theme" (off by default) shows the theme selected in the
dashboard instead of the Companion's own choice.
- OpenClaw.Shared models themes, expands palettes and persists the
appearance choice; BuiltinGatewayThemes is generated from the upstream
dashboard table, and the OFL fonts the themes name are bundled.
- AppThemeApplicator recolors the bound Fluent, App and chat brushes in
the Default and Light dictionaries and swaps the UI, chat and code
fonts. App brushes and gradients bound to a Windows accent shade (the
Hub navigation indicator, usage, systems, automations and voice
visuals) take the theme's matching accent shade and return to the
Windows accent with the Windows look. High Contrast dictionaries are
never changed.
- GatewayThemeFollower records the Gateway's selected theme from
themes.list (re-read on users.prefs.changed) while following. A theme
the Companion can't render keeps the last followed theme, then the
manual choice. The Companion never calls themes.set or writes prefs.
- Theme fonts reach all text: TypographyResources.xaml re-declares the
Fluent type ramp (WinUI's styles hard-code XamlAutoFontFamily) and
anchors pages, flyouts, menus and dialogs, ThemeHelper anchors window
roots, and the chat user bubble follows the chat font.
- BackdropPolicy tints Mica or paints the opaque canvas in Mica windows
and dialogs. A window keeps its themed backdrop once adopted and resets
the tint for the Windows look, because swapping backdrops across the
theme refresh made WinUI raise ArgumentException("target").
- The gateway-themes fixture scenario serves a synthetic catalog for
proof and UI tests, and its select command changes the reported
selection.
A LayoutCycleException reaches the unhandled-exception handler with no managed stack, which left a model-picker hang on a themed install with nothing to trace. Log the active theme, the focused element and the open popups alongside the crash entry, and have Dev builds keep WinUI's layout-cycle trace (native debugger output and stowed exceptions).
Themes that drop the claw mascot (Phosphor and CRT among the built-ins) now look that way in the Companion too: the chat working indicator and the Companion's own brand spots follow the applied theme's branding. - ThemeBranding resolves the mascot, brand icon and working indicator with upstream resolveThemeBranding's defaults; unknown values count as missing. Built-in branding comes from the generated table (the generator now reads BUILTIN_THEMES' branding and fails on unknown values); plugin and imported themes take it from their descriptor, and snapshots keep it for offline restarts. - The working indicator shows the claw (Windows default), three pulsing dots in the theme accent, the brand mark, or no glyph with the run status words visible instead. - BrandMark shows the OpenClaw claw image or the dashboard's neutral mark in the theme's primary colors, in dialogs and the tray menu header, switching live. Plugin artwork brand icons fall back to the mark. Window, taskbar, tray and package icons stay the OpenClaw identity.
d1cf57e to
ee37371
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Main's chat run progress (openclaw#2120) now always shows the status label beside the details, so the branding layer no longer needs to swap the label in when a theme has no working indicator. Keep main's status line and swap animation, take the indicator glyph from the theme, and start the line at the edge when there is no glyph. The branding test now checks that the label stays visible without a glyph.
The Companion now follows a Gateway theme's branding, not just its colors and fonts. Themes that turn the mascot off (the built-in Phosphor and CRT, or a plugin or imported theme) show the theme's mark instead of the OpenClaw claw image in the Companion's own brand spots, and the chat's working indicator follows the theme's
workingIndicator: the snappy claw, three pulsing dots in the theme accent, the pulsing brand icon, or no animation with the status text kept visible. Windows default and the other built-ins look exactly as before.Branding is resolved the way the dashboard does it (upstream
resolveThemeBrandinginpackages/gateway-protocol/src/theme.ts): built-ins from the generated theme table, which now carries each theme's mascot, brand icon and working indicator; plugin and imported themes from their catalog descriptor, kept in the saved snapshot. Unknown or missing values fall back to upstream's defaults, and a theme switch updates open dialogs, the tray menu and a running indicator live.This PR is stacked on #2218 (Gateway themes) and is followed by the theme-table sync PR. It contains #2218's two commits plus one of its own; review scope is only
feat(appearance): follow dashboard theme branding in the Companion(ee37371f). Evidence below is from3c298fbb; since then this layer's own commit changed onlyGatewayThemeBrandingTests.cs(see Validation), and the themes layer underneath took #2218's restore, startup and accessibility fixes. Window, taskbar, Start, tray and package icons stay the OpenClaw identity: Windows renders those from the package, not from app resources. Custom theme artwork (pluginbrandIconartwork ids, hats, critters, backgrounds) is out of scope and falls back to the mark.What Problem This Solves
With a theme like CRT or Phosphor, the dashboard drops the lobster mascot and shows a terminal-style mark and dots, while the Companion kept the red claw everywhere. The two surfaces looked like different products.
User Impact
User impact: with a theme that turns the mascot off, the Companion's dialogs, tray menu and chat working indicator match the dashboard; nothing changes under Windows default or the built-in themes that keep the mascot.
Why This Change Was Made
ThemeBranding.Resolvemirrors upstream defaults: the mascot is on unless set tonone; the brand icon defaults toclawwith the mascot andmarkwithout it; the working indicator defaults toclawwith the mascot anddotswithout it. Values the Companion does not recognise count as missing, so a newer upstream option degrades to the default instead of failing.BrandMark, the control already used in the Companion's brand spots, shows the theme mark (drawn from theme brushes) when the theme has no claw. The tray menu header now uses it too.ReactorRunProgresspicks the working glyph fromThemeBrandingState. Dots and the brand icon pulse on the dashboard's 1.2 s cycle only while a run is active and Windows animations are on. Withnonethere is no animation; the run status text and elapsed time stay visible so busy state remains clear and announced.Implementation notes
scripts/Update-GatewayThemeTable.ps1reads each built-in's branding fields fromBUILTIN_THEMES, resolves defaults and fails on an unknown value; the regenerated table adds three fields per theme (only Phosphor and CRT differ from the defaults).GatewayThemeProtocolparsesmascot,brandIconandworkingIndicatorfrom descriptors;brandIconartwork ids are recognised and fall back to the mark.ThemeSelectionsnapshots carry branding so an offline plugin theme keeps it.brandName(stays OpenClaw),workingPhrases,lobsterdex,communityLinks. The desktop companion lobster is a separate, user-toggled feature and is unchanged.Evidence
Renderings saved by
GatewayThemeBrandingTestson the native guest at3c298fbb(OPENCLAW_UI_PROOF_DIRset; each frame shows the brand mark, then the chat working indicator for a running reply, on the applied theme's canvas):workingIndicator: noneThe
brandindicator (a plugin theme's brand icon, pulsing) is proven by the same test's assertions (the icon is present, decoded and pulsing while the run is active) rather than by a rendering:RenderTargetBitmapdoes not reliably capture an element during its running opacity animation.The same themes in the running Companion (fixture Gateway, App theme Dark, a reply in progress): CRT chat with the dots indicator, Phosphor chat, Windows default chat with the claw.
Change Type
Scope
winnodeRequired proof pools
windows-winui-interactive: the mark and working indicator are visible WinUI surfaces; proven with native UI tests and screenshots on a Windows guest.Validation
Local build and unit tests on
697f3c6c;ee37371fdiffers only in #2218'sGatewayThemeRestoreTests.cs:./build.ps1: all builds succeeded.dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 5937 passed, 0 failed, 29 skipped (existing opt-in integration skips)dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 6692 passed, 0 faileddotnet test tests/OpenClaw.Tray.UITests -c Debug -r win-x64 --filter "FullyQualifiedName~GatewayTheme|FullyQualifiedName~ChatToolInputSyntaxTests|FullyQualifiedName~ChatThemeProofScope|FullyQualifiedName~ReasoningPicker|FullyQualifiedName~SettingsPageInsetTests|FullyQualifiedName~ChatMarkdown"on the native guest at697f3c6c: 46 passed, 0 failed, includingGatewayThemeBrandingTests.WorkingIndicatorAndBrandMarkFollowTheThemeBranding(claw, dots, brand and no glyph switching live; the dots and brand pulse only during a run, stay fully opaque under the High Contrast probe and stop when replaced).ee37371f(run 43588169328): all 19 jobs passed, including the new-test soak (10 of 10 runs), the UI and accessibility tests, both fixture UI shards, the layout shard and the E2E jobs.3c298fbb:GatewayThemeBrandingTeststimed out at "dots dim again after High Contrast" on run 1. On the native guest it failed with Windows animations off (as on CI runners) and passed with them on. The dots' stored opacity reads back at single precision (0.44999998807907104), so the exactis 0.45match was fragile; it now compares with a tolerance and reports the observed values on failure. The pulse starts on the indicator'sLoadedevent, so its checks now wait for the pulse instead of asserting it immediately.AutomationProperties.LabeledBy, covered bySettingsPageInsetTests.AppearanceControlsTakeTheirAccessibleNamesFromTheirLocalizedHeaders.Appearancewhen a theme is picked: stable, first launch, Manuscript picked, after a restart. A snapshot saved by feat(appearance): apply OpenClaw dashboard themes to the Companion #2218 alone has no branding fields; they read back as missing and resolve to upstream's defaults (the all-missing row ofGatewayThemeTests.BrandingResolvesLikeTheDashboard), andBrandingReachesBuiltinPluginAndSnapshottedThemesround-trips a snapshot with branding through the settings file.697f3c6c(see feat(appearance): apply OpenClaw dashboard themes to the Companion #2218's Validation; passed all 10 runs onee37371f), andGatewayFixtureUiTests.MainSearch_MessageHitOpensItsNativeConversationWithoutSendingin fixture shard B, which also fails onmain(interleaved guest runs:maind1316cc01 of 18, this layer 4 of 30, same failure at the same step).GatewayThemeTests.BrandingResolvesLikeTheDashboardandBrandingReachesBuiltinPluginAndSnapshottedThemescover resolution against upstream defaults, unknown values and snapshots.scripts/Update-GatewayThemeTable.ps1 -UpstreamRef 220ca12e…regenerates the committed table byte for byte; a branding key that is not a string literal fails the run.ee37371f: proof 4/6 and patch quality 4/6, no findings, nothing listed before merge ("Ready, awaiting maintainer decision"), with every CI job green. Overall readiness stays at 3/6 because adopting theme branding needs a maintainer decision (the review's Decision needed).Real Behavior Proof
OpenClaw.GatewayFixtureHost --scenario gateway-themeslaunching the Companion Debug build with an isolated profile for the chat shots.3c298fbb(renderings and chat shots, with this layer's product code unchanged since);697f3c6cfor the guest UI run in Validation.dotnet test tests/OpenClaw.Tray.UITests -c Debug -r win-x64 --filter FullyQualifiedName~GatewayThemeBrandingTestswithOPENCLAW_UI_PROOF_DIRset; then a guest script that starts a reply through the fixture and selects each Gateway theme in Settings (UI Automation) before capturing chat.brandshows its decoded brand icon pulsing (asserted, not rendered);noneshows no glyph and keeps "Working" plus the elapsed time visible.Yes/No/N/A) YesbrandIconartwork is not rendered (out of scope; it shows the mark). The tray menu header and dialog title bars use the sameBrandMarkcontrol as the renderings but were not captured separately.Security Impact
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain the risk and mitigation: N/A. Branding comes from data the themes PR already reads; no URLs or artwork are fetched.Compatibility and Migration
Yes/No) YesYes/No) NoYes/No) NoReview Conversations