Repository navigation
feat(themes): follow the theme's branding in the Companion - #2299
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: needs maintainer review before merge. What this changesMakes Companion brand marks and chat working indicators follow the selected Gateway theme. Example: Select CRT and send a chat message.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR adds useful theme consistency that main does not yet provide. No actionable defects were found, and the latest CI run for the reviewed head passes. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe shared theme model resolves branding from built-in descriptors or saved Gateway theme snapshots; the existing theme applicator publishes it to WinUI brand marks and the Reactor chat progress row. flowchart TD
A[Built in theme table] --> C[Theme branding resolver]
B[Gateway theme snapshot] --> C
C --> D[App theme applicator]
D --> E[Applied branding state]
E --> F[Dialog and tray brand marks]
E --> G[Chat working indicator]
Technical reviewBest possible solution: Land this focused branding layer in stack order while preserving the Windows default appearance and package identity. Do we have a high-confidence way to reproduce the issue? This is a feature addition; source inspection confirms the unconditional branding it replaces, and supplied native captures show the resulting theme-specific states. Is this the best way to solve the issue? The implementation is appropriately scoped: it extends the existing descriptor, snapshot, applicator, BrandMark, and progress owners, with shared pulse mechanics for two distinct native indicators. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c38dbcc53e7d. 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. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label 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 (3 earlier review cycles)Reviewed November 18, 2026, 6:45 PM ET / 23:45 UTC (Revision 4). |
ead0115 to
4d406a1
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
4d406a1 to
36e3473
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
The Hub follows the applied theme's working indicator and brand icon, resolved like upstream resolveThemeBranding: the snappy claw, a dots indicator in the theme accent, a pulsing brand mark, or no glyph (the run status words stay visible). In-app brand spots (dialog headers, the tray menu header) show the claw or the theme's mark; plugin artwork brand icons fall back to the mark. The generator carries the built-in branding fields, failing on unknown values. Windows default keeps the claw everywhere; window, taskbar, tray and package icons stay the OpenClaw identity. High Contrast only changes colors.
36e3473 to
1c05890
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Preserve catalog validation helpers alongside branding parsing, and retain current-clock and reduced-motion logic alongside the live branding subscription. Co-authored-by: Copilot App <[email protected]>
Default only malformed branding fields using the existing safe decoder. Keep dots and brand glyphs opaque when animation effects are off and cover both contracts with focused regressions. Co-authored-by: Copilot App <[email protected]>
…-branding Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
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 is part 9 of 11 in the Companion themes stack, opened as a native GitHub stack: each PR is based on the layer below it, so this diff is only this layer's commit,
1c058905 feat(themes): follow the theme's branding in the Companion. It depends on #2298 (the desktop lobster's bubble). Window, taskbar, Start, tray and package icons stay the OpenClaw identity: Windows renders those from the package, not from app resources. Custom theme artwork beyond backgrounds (pluginbrandIconartwork ids, hats, critters) is out of scope and falls back to the mark.This commit is
22cf2495rebased onto main1af25869, andgit range-diffshows the same patch, apart from hunk context beside the inline-code chip lines the apply layer added toAppThemeApplicator. Evidence and validation below name the heads they ran on; in this stack22cf2495is now36e3473a,783b9ed7is now3f14cc1fand2e98953ais now3c4cacae.Rebased again onto main
30cfe593, which includes #2307 and #2308: this commit is now1c058905(was36e3473a), andgit range-diffshows the same patch. Evidence below that names36e3473aor an earlier head ran on this same patch.Themes architecture
Layer 9 of 11 in the Companion themes stack. This layer resolves each theme's branding (mascot, brand icon and working indicator) and applies it to the Companion's brand marks and the chat working indicator. The nodes this pull request adds are highlighted below. For the full write-up, with code links, see OpenClaw Windows Companion: theme architecture.
flowchart TD subgraph src["Sources"] GW["Gateway"] UI["Settings page"] WIN["Windows settings"] SYNC["Daily table sync"] TBL["Built-in table"] FNT["Bundled fonts"] ARTA["Artwork images"] end subgraph proc["Processing"] CAT["Theme catalog"] FOL["Follower"] RES["Palette resolver"] PRB["WebView2 probe"] CCH["Palette cache"] MOD["Theme model"] SET["Appearance setting"] SEL["Theme selection"] ACC["Accent overlay"] end subgraph app["Application"] APL["Theme applicator"] PRJ["WinUI brushes"] RAD["Corner radii"] BKP["Mica backdrop"] ART["Chat artwork"] BUB["Lobster bubble"] BRD["Branding"] end GW -->|catalog and prefs| CAT GW -->|Control UI CSS| RES SYNC -->|regenerates| TBL TBL -->|fallback| RES RES --> PRB PRB --> CCH CCH -->|reuse| RES CAT -->|built-in names| RES CAT -->|plugin themes| MOD CAT -->|dashboard choice| FOL FOL -->|followed values| SET UI -->|manual choice| SET MOD --> SEL RES -->|built-in palettes| SEL SET --> SEL SEL --> ACC ACC --> APL WIN --> APL WIN --> BKP FNT --> PRJ APL --> PRJ APL --> RAD APL --> BKP APL --> BRD APL --> ART ARTA --> ART BKP --> BUB classDef layer fill:#ffd866,stroke:#7a5200,stroke-width:3px,color:#000000 class BRD layerWhat 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 (the whole value: a trailing newline is rejected) 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
GatewayThemeBrandingTestsat this PR's head (22cf2495) on a Windows 11 guest (Crabbox Hyper-V, build 29683) in light mode (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: brandworkingIndicator: noneEarlier 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
brandframe catches the brand icon mid-pulse; the test also asserts the icon is present, decoded and pulsing while the run is active, sinceRenderTargetBitmapdoesn't reliably capture an element at a particular point of its opacity animation.The same themes in the running Companion at this PR's head, same guest (
OpenClaw.GatewayFixtureHost --scenario chat-interactive, App theme Dark on light Windows). Each theme was picked in Settings through UI Automation, then a message was sent from the composer and chat captured while the reply was running:Earlier captures from
3c298fbb: CRT chat with the dots indicator, Phosphor chat, Windows default chat with the claw.Upgrade from the released Companion, run on a Windows 11 guest in light mode for the runtime-palette PR stacked on this one (#2301, at its earlier head
2e98953a, which contained this stack's previous top783b9ed7): the latest stable Companion, v2026.11.3 (portable zip, SHA-256 verified against the release digest, the artifact CI's released-profile check uses), was paired to a real Gateway 2026.11.4 on an isolated profile, then that build opened the same profile. Notification settings, App theme Dark, the gateway record, device id and device token were preserved, with no new pairing request. Manuscript, picked in Settings, stayed applied in dark mode after a restart (canvas#211E18), and the only settings.json change was the addedAppearanceblock. Capture after the upgrade and restart; the settings diff and full record are in #2301's description.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
30cfe593(fix: match inline code chips to the chat theme #2307), on the new stack top601932d6, which contains this commit:./build.ps1succeeded;dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 6016 passed, 0 failed, 29 skipped (existing opt-in integration skips);dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 6807 passed, 0 failed;dotnet test ./tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -r win-x64 --filter "FullyQualifiedName~GatewayTheme|FullyQualifiedName~GatewayBuiltinThemeProbe|FullyQualifiedName~DesktopCompanionWindowTests.OpenBubble|FullyQualifiedName~ReactorMarkdownWebParity|FullyQualifiedName~ReactorToolActivityProofTests|FullyQualifiedName~WorkAlignment": 63 passed, 0 failed.1af25869, on the new stack top3c4cacae, which contains this commit:./build.ps1succeeded;dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 6012 passed, 0 failed, 29 skipped (existing opt-in integration skips);dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 6801 passed, 0 failed;dotnet test ./tests/OpenClaw.Tray.UITests -r win-x64 --filter "FullyQualifiedName~GatewayTheme|FullyQualifiedName~GatewayBuiltinThemeProbe|FullyQualifiedName~DesktopCompanionWindowTests.OpenBubble|FullyQualifiedName~ReactorMarkdownWebParity"(developer machine, Windows dark mode): 33 passed, 0 failed.On
22cf2495:./build.ps1: all builds succeeded.dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore --filter "FullyQualifiedName~Theme|FullyQualifiedName~Appearance": 95 passed, 0 failed.dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore --filter "FullyQualifiedName~Theme|FullyQualifiedName~Settings|FullyQualifiedName~Appearance|FullyQualifiedName~DesktopCompanion|FullyQualifiedName~Chat": 2586 passed, 0 failed.dotnet test ./tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -r win-x64 --filter "FullyQualifiedName~GatewayTheme"(developer machine, Windows dark mode): 25 passed, 0 failed.783b9ed7, which contains this commit:./build.ps1succeeded;dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 5982 passed, 0 failed, 29 skipped (existing opt-in integration skips);dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 6791 passed, 0 failed.016f6e1b(Crabbox Hyper-V Windows 11 build 29683, interactive desktop, isolated tray profile, proof captures on), once with Windows in light mode and once in dark:dotnet test tests\OpenClaw.Tray.UITests -c Debug -r win-x64 --filter "Category!=Accessibility&...&(FullyQualifiedName~GatewayTheme|FullyQualifiedName~DesktopCompanionWindowTests|FullyQualifiedName~ChatThemeProofScope|FullyQualifiedName~SettingsPageInsetTests|FullyQualifiedName~ChatMarkdown)": 53 passed, 4 skipped (opt-in pointer tests), 1 failed in each mode. The failure,DesktopCompanionWindowTests.MascotScale_UpdatesLayoutAndHitRegionWithoutScalingOrReplacingPopup(chatOpen: True), needs a larger work area than the guest's 1024x720 at 200% scale.ac745c6a, same guest, Windows light then dark:--filter "FullyQualifiedName~GatewayThemeBackdropTests": 5 passed, 0 failed in each mode.Carried over from this layer's earlier review rounds (the code is unchanged apart from the restack):
GatewayThemeTests.BrandingResolvesLikeTheDashboardandBrandingReachesBuiltinPluginAndSnapshottedThemescover resolution against upstream defaults, unknown values and snapshots; a snapshot saved before branding existed reads back as missing and resolves to upstream's defaults.GatewayThemeBrandingTestscompares the dots' opacity with a tolerance (it reads back at single precision) and waits for the pulse, which starts on the indicator'sLoaded; both fixes came from an earlier CI soak failure with Windows animations off.scripts/Update-GatewayThemeTable.ps1 -UpstreamRef 4ffdd2047d192dd65554de3c8c46c0e0197c6e2aregenerates the committed table byte for byte on this head; a branding key that isn't a string literal fails the run.Real Behavior Proof
OpenClaw.GatewayFixtureHost --scenario gateway-themeslaunching the Companion Debug build with an isolated profile for the chat shots.22cf2495for the build, unit tests, the current renderings and the running-Companion chat captures;016f6e1bfor the guest UI tests in both Windows modes;3c298fbbfor the earlier renderings and chat shots.dotnet test tests/OpenClaw.Tray.UITests -c Debug -r win-x64 --filter FullyQualifiedName~GatewayThemeBrandingTestswithOPENCLAW_UI_PROOF_DIRset; then a guest script that selects each Gateway theme in Settings (UI Automation), sends a message from the composer and captures chat while the fixture's reply runs.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 theme PRs already read; no URLs or artwork are fetched.Compatibility and Migration
Yes/No) YesYes/No) NoYes/No) NoReview Conversations