Repository navigation
chore(themes): sync the built-in Gateway theme table with the packaged Gateway release - #2300
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 changesAdds daily automation that verifies the packaged Gateway release, regenerates its built-in theme table, tests it, and optionally opens a sync PR. Example: The packaged Gateway v2026.11.1-msix.0 resolves to upstream commit 4ffdd204 while the table still references 220ca12e.
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored automation adds useful work absent from main; no actionable patch defect was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherRepository automation consumes verified Gateway release metadata and upstream theme sources, then produces a generated C# table in a reviewable pull request. flowchart TD
A[Daily workflow] --> B[Verified packaged Gateway]
B --> C[Resolve upstream commit]
C --> D[Existing theme generator]
D --> E[Theme tests]
E --> F[Optional sync pull request]
Technical reviewBest possible solution: Keep one scheduled publisher that reuses the verified release resolver and existing generator while submitting table updates through normal review. Do we have a high-confidence way to reproduce the issue? This is preventive automation rather than a reported runtime defect; source inspection confirms the base has a manual generator without the proposed scheduled publisher. Is this the best way to solve the issue? The scope is coherent: preserve verified release provenance and generated-data ownership, automate reviewable updates, and replace fixed inventories with generator-backed invariants. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c38dbcc53e7d. Provenance checked
TestingProof path: unit tests only. 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:46 PM ET / 23:46 UTC (Revision 4). |
d97fff0 to
ce53645
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
ce53645 to
3f14cc1
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…ateway release A daily workflow reads the openclaw commit that the latest stable openclaw-windows-packaging release ships from its verified payload, regenerates BuiltinGatewayThemes.g.cs when it moved, runs the theme tests (including the bundled-font check) and opens or updates one pull request from automation/gateway-theme-sync with a GitHub App token. Resolution lives in scripts/GatewayThemeUpstream.psm1 with offline tests in CI; the built-in table test now checks invariants instead of a pinned theme list so new upstream themes can sync.
3f14cc1 to
c5fd5c7
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: Copilot App <[email protected]>
Keep provenance on the generated commit, fence branch replacement, isolate the publisher from the build, and verify catalog and palette contracts against their source. Co-authored-by: Copilot App <[email protected]>
Use the PR or merge-group base SHA and bound the two theme checks on the shared fast-validation runner. Co-authored-by: Copilot App <[email protected]>
This adds a daily workflow that keeps the Companion's built-in Gateway theme table current with the Gateway people actually run. It finds the latest stable openclaw-windows-packaging release (for example
v2026.11.1-msix.0), downloads and verifies its x64 MSIX, reads the openclaw commit the bundled Gateway was built from (app/dist/build-info.json) and compares it withBuiltinGatewayThemes.UpstreamRef. When they differ it regenerates the table withscripts/Update-GatewayThemeTable.ps1, runs the theme tests and opens or updates one pull request from the fixed branchautomation/gateway-theme-sync. When they match it exits without changes.A theme that names a font the Companion does not bundle fails the run before any pull request is opened (
EveryBuiltinThemeTypefaceIsBundledWithTheCompanion), with a job summary pointing atscripts/Update-ThemeFonts.ps1. Adding a font and its license stays a human step. An unknown or non-literal branding value fails the generator the same way. New upstream themes with bundled fonts sync normally: the built-in table test checks invariants rather than a pinned theme list.This is part 10 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,
c5fd5c75 ci(themes): sync the built-in Gateway theme table with the packaged Gateway release. It depends on #2299 (theme branding). The table it maintains is the fallback for built-in palettes. The workflow publishes nothing until a GitHub App is provisioned: an App with Contents and Pull requests read/write on this repository, its id in the repository variableGATEWAY_THEME_SYNC_APP_ID, its private key in the secretGATEWAY_THEME_SYNC_APP_PRIVATE_KEY, and the variableGATEWAY_THEME_SYNC_ENABLED=true. Until then each run still regenerates and tests a stale table but publishes nothing. An App token is needed because pull requests opened withGITHUB_TOKENdon't start CI.This commit is
783b9ed7rebased onto main1af25869, andgit range-diffshows the same patch plus one test cleanup from this PR's first hosted review: the built-in branding check no longer re-resolves values the table already normalized. Evidence and validation below name the heads they ran on; in this stack783b9ed7is now3f14cc1fand2e98953ais now3c4cacae.Rebased again onto main
30cfe593, which includes #2307 and #2308: this commit is nowc5fd5c75(was3f14cc1f), andgit range-diffshows the same patch. Evidence below that names3f14cc1for an earlier head ran on this same patch.Themes architecture
Layer 10 of 11 in the Companion themes stack. This layer adds the daily workflow that regenerates the bundled built-in theme table whenever the latest stable packaged Gateway ships a different openclaw commit. 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 SYNC layerWhat Problem This Solves
The built-in theme palettes are generated from a pinned upstream commit. Without automation the table drifts as new Gateway releases change or add themes, and nobody notices until a user picks a theme that renders differently from the dashboard.
User Impact
User impact: none directly; maintainers get a reviewed pull request whenever a new stable packaged Gateway changes the built-in themes, instead of drift.
Why This Change Was Made
Resolve-PackagedGatewayRelease,Save-PackagedGatewayArchiveandGet-PackagedGatewayMetadata(stable release, canonical tag and asset, SHA-256 and payload identity checks).docs/RELEASING.md;test-gateway-packaged-release.ps1pairsv2026.9.9-msix.0with Gateway 2026.8.20). It must also be a public openclaw/openclaw commit, since the generator reads upstream sources there. Every unresolvable step fails with a clear message instead of guessing.BuiltinTableHasEveryUpstreamThemeInBothModeschecks invariants of any regenerated table (claw present, unique ids, both modes, fonts named, dark darker than light) instead of the 11 pinned ids;Update-GatewayThemeTable.ps1already checks the table against upstreamBUILTIN_THEME_IDS.scripts/GatewayThemeUpstream.psm1so CI can test it offline; publishing lives inscripts/Publish-GatewayThemeSync.ps1rather than inline YAML.Implementation notes
.github/workflows/gateway-theme-sync.yml:schedule(daily) andworkflow_dispatch,windows-latest(has Edge andgh, which the generator needs),permissions: {}withcontents: readfor the job, a repository guard and a full-ref default-branch guard (refs/heads/<default>, so a same-named tag is refused), per-repository concurrency,persist-credentials: false.scripts/Resolve-GatewayThemeUpstream.ps1writespackaging_release,gateway_version,upstream_refandup_to_datetoGITHUB_OUTPUT; the 257 MB MSIX download takes about 18 s.fetch-depth: 0because GitVersion.MsBuild needs full history to build the test projects.scripts/Publish-GatewayThemeSync.ps1commits only the table as the App's bot user, passes the token to git as a per-command header and uses--force-with-leaseagainst the branch head it observed.ci.ymlrunsscripts/test-gateway-theme-upstream.ps1andscripts/test-gateway-theme-sync-publish.ps1beside the packaged-release provenance test.Evidence
Dry run on this head (
783b9ed7) against the real packaging release (./scripts/Resolve-GatewayThemeUpstream.ps1 -CacheDirectory <temp> -GitHubOutput <file>, 9 s including the verified MSIX download). The latest stable packaged Gateway ships the commit the table is already pinned to, so a scheduled run exits without changes:When the release moves, the workflow regenerates the table with
scripts/Update-GatewayThemeTable.ps1; on this head that command reproduces the committed table byte for byte at4ffdd204. An earlier dry run, before the table was repinned (the pin was upstream main220ca12e), resolvedup_to_date=falseand regenerated all 11 themes, and the theme tests passed against that table, includingEveryBuiltinThemeTypefaceIsBundledWithTheCompanion.On this head,
scripts/test-gateway-theme-upstream.ps1passes 8 assertions (release selection, digest verification, version-to-commit mapping) andscripts/test-gateway-theme-sync-publish.ps1passes 11 assertions for the publication step against a stubbedgh(branch reuse when the open sync PR already carries the table, a new PR otherwise, masked token handling); it never contacts GitHub. actionlint 1.7.12 reports no issues ingateway-theme-sync.ymlorci.yml.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
none: repository automation only; no shipped runtime behavior changes. Proven with the offline resolution tests, a dry run against the real packaging release and actionlint.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.d97fff08, this layer's first native head, after the rebase merged this layer'sci.ymlsteps with main's workflow changes (the scripts and workflows are unchanged since):./scripts/test-gateway-theme-upstream.ps1: 8 assertions passed;./scripts/test-gateway-theme-sync-publish.ps1: 11 assertions passed.On
783b9ed7:./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../scripts/test-gateway-theme-upstream.ps1: 8 assertions passed (latest stable release maps to the commit in its payload, not its tag; annotated and matching cases; prerelease, unknown commit, unreadable payload and missingUpstreamReffail clearly)../scripts/test-gateway-theme-sync-publish.ps1: 11 assertions passed (gitandghfaked as PowerShell functions: first publish, an unchanged open pull request left untouched, a changed table pushed with a lease and the pull request updated, a declined commit and a fork pull request ignored, a current branch without an open pull request).gateway-theme-sync.ymlandci.yml: no findings.Real Behavior Proof
783b9ed7../scripts/Resolve-GatewayThemeUpstream.ps1,./scripts/Update-GatewayThemeTable.ps1 -UpstreamRef <resolved commit>, then the workflow's twodotnet testcommands against the regenerated table, as listed in Evidence.4ffdd204, the commit the table is pinned to, so an enabled run exits without changes. Before the repin, the same run resolvedup_to_date=false, regenerated the table and passed the theme tests, so a moved release opens a sync pull request.Yes/No/N/A) N/APublish-GatewayThemeSync.ps1has not executed against GitHub.Security Impact
Yes/No) YesYes/No) YesYes/No) YesYes/No) NoYes/No) NoYes, explain the risk and mitigation: the workflow reads public release metadata and downloads the public packaged Gateway MSIX (SHA-256 verified against the release digest, never installed or executed) withGITHUB_TOKEN(contents: read). The App token (Contents and Pull requests write) is minted only after the table regenerates and its tests pass, only on this repository's default branch (compared as a fullrefs/heads/ref) and only whenGATEWAY_THEME_SYNC_ENABLEDistrue. It is never written to git config or logged, and it can write only to the bot branch and its pull request; the change still needs normal review and CI to merge.Compatibility and Migration
Yes/No) YesYes/No) YesYes/No) NoGATEWAY_THEME_SYNC_APP_ID,GATEWAY_THEME_SYNC_APP_PRIVATE_KEYandGATEWAY_THEME_SYNC_ENABLED=true. Without them the workflow publishes nothing.Review Conversations