Skip to content

feat(ui): let themes drop the mascot, set status words, add critters and avatar hats - #154518

Merged
steipete merged 4 commits into
mainfrom
steipete/red-hat-theme-openclaw-944e01
Sep 21, 2026
Merged

steipete merged 4 commits into
mainfrom
steipete/red-hat-theme-openclaw-944e01

Conversation

@steipete

@steipete steipete commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Portable theme definitions (built-in, plugin, and personal) gain four optional presentation fields so a theme can shape the product's character, not just its colors:

  • mascot: "claw" | "none" — none replaces the lobster mark in the sidebar header, favicon, login gate, system-agent avatar, About hero, working row, subagent and save indicators, and the custodian rail icon with a neutral prompt mark drawn in the theme's --primary / --primary-foreground. The resident lobster and the lobster "stranger" passers stay off the composer ledge; the crab, snail, duck, jellyfish, and bottle keep coming under the unchanged browser-local Lobster visits toggle.
  • workingPhrases — up to 24 literal, untranslated long-wait phrases (≤ 24 characters, trimmed, no duplicates) that replace the crustacean gerunds in the chat working row; [] shows no phrase at all.
  • critters — up to 8 ids from a built-in catalog (penguin, fedora) added to the ledge passer pool at 2 % per critter per page load. The regulars keep their exact odds; the stranger's 4.5 % applies only when a resident lobster exists, so existing seeds keep their outcomes on the default theme (pinned by a test).
  • avatarHat — fedora; an agent avatar wears it about one page load in six, seeded per agent and load salt, never on reserved system agents or pending avatars.

No built-in theme uses the fields; they are exercised by tests and by plugin and personal definitions. The first consumer is the Red Hat theme in openclaw/tidepool, which was prototyped as a built-in on this branch and then moved out so the monorepo only carries the generic mechanism.

How it fits together

  • Gateway protocol: normalizeThemeDefinition validates the fields (unknown ids and duplicates are rejected with the allowed values named), the TypeBox schema mirrors them, and resolveThemeBranding gives every consumer one defaulted shape. Plugin and personal descriptors project the fields so themes.list and themes.get return them, and the theme tool's import round-trips them.
  • Control UI: ApplicationTheme.branding resolves built-ins statically and dynamic themes from the catalog definition, applyThemePresentation stamps data-theme-mascot and data-theme-avatar-hat on the root, leaf glyphs read them through currentThemeBranding(), and the favicon runtime rebuilds its base artwork from computed colors when the mascot flips. The lobster pet gets a residentEnabled gate separate from the visits toggle, plus critters, and replans its passer when either changes.
  • Artwork stays built in (theme-flair-sprites.ts); definitions never carry markup.

Proof

  • Initial feature-tree validation: 924 focused Vitest tests green across the protocol, theme catalog, Gateway projection, theme tool, working phrase, working indicator, lobster pet, composer critters, avatar hat, sidebar roster, favicon, contrast, and token suites.
  • Initial feature-tree end-to-end suites (theme-typography, theme-muted-contrast, theme-selection-defaults): 58 tests green.
  • tsgo core and UI, stylelint, oxfmt --check, keyless i18n baseline and verify: green.
  • Final startup budget: integrated Linux CI measured 369,497 B against current main’s 366,912 B enforcement limit, an overage of 2,585 B (0.70%). The rounded baseline/cap is 369,600 B; unchanged 512 B growth and 64 B variance allowances yield a 370,176 B enforcement limit (0.89% above main). The final local build measures 369,737 B JS and 51,158 B CSS; CSS retains its unchanged 51,200 B ceiling.
  • Original feature-tree autoreview (Codex, P0–P1): scoped-clean; the fix diff was reviewed separately below.

Captures from the mocked end-to-end harness (synthetic fixtures only; one portable theme with mascot: "none", critters: ["penguin", "fedora"], avatarHat: "fedora"):

Before (default theme) After: penguin on the ledge, hats on two avatars
before after-penguin
After: the fedora crossing After: neutral mark and theme status words
after-fedora after-working

Release notes

Themes can now opt out of the lobster mascot, supply their own long-wait status vocabulary, add composer visitors from a built-in critter catalog, and put an occasional hat on agent avatars. Plugin and personal themes get the same fields; see the theme tool and plugin manifest docs.

CI and review repairs

Deferred palette completion now republishes changed mascot and hat attributes; settled transcripts track both requested and applied branding. Loaded chat photos share the existing hat overlay without changing image loading. Authored phrase lists use a coprime stride so every phrase appears, preserving the default 19-phrase sequence. The lobster pointer interactions and visitor tests move into coherent sibling modules without dropping coverage. Theme fixture defaults and generated Swift protocol models match the expanded contract.

Focused Vitest verification (reporter durations): protocol themes, 101 tests in 1.17 s; Gateway lineage, 20 tests in 6.52 s; lobster runtime/visitors, 75 tests in 2.58 s; branding owners and siblings, 112 tests in 9.72 s; final transcript invalidation, 24 tests in 9.63 s. A final phrase/avatar lint cleanup replay passed 22 tests in 5.80 s. Each of the four review defects was reproduced before its fix.

Core and UI typechecks, changed-file oxlint, UI stylelint, formatting, keyless i18n verification, line-cap ratchet, and final startup budget pass. Protocol regeneration is clean after the fix commit. Codex autoreview is scoped-clean at P0–P1 for the fix diff; the original feature tree had the same scoped review.

The supplemental before/after captures below render the real avatar components with synthetic photos. Eligible transcript and forwarded photos gain hats; an unselected agent remains unchanged.

Before: eligible loaded chat photos have no hats

After: hats appear on eligible loaded photos
Second CI repair: the plugin catalog now assigns optional branding fields without map spreads while retaining absent fields; the favicon test uses the deferred helper's default type argument. Plain and typed oxlint pass. The repeated focused checks passed 14 plugin catalog tests (Vitest Duration 82.29 s, 87% transformation) and 7 favicon tests (Duration 2.47 s). Codex autoreview of this second fix is scoped-clean at P0–P1.

Rebase integration retains both main’s composer corner-shape documentation and the theme-branding paragraph. The shared neutral SVG now declares its existing 100% dimensions, removing duplicate startup CSS rules without changing geometry. Chromium verified identical bounds at desktop and mobile sizes, with both standard and native macOS CSS variants. The 14 mascot/catalog tests passed in 3.62 s; 14 forwarded-avatar browser tests passed in 2.10 s after Vite finished preparing its updated dependencies. Stylelint, oxlint, keyless i18n baseline, and the final budget check pass; the integration adjustment is scoped-clean under Codex P0–P1 autoreview.

@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling size: XL maintainer Maintainer-authored PR labels Sep 21, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 21, 2026
@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 6:36 AM ET / 10:36 UTC (Revision 6).

ClawSweeper review

What this changes

Extends portable themes with optional neutral branding, waiting phrases, composer visitors, and avatar hats, with validation, documentation, regression coverage, and an adjusted startup budget.

Merge readiness

✅ Ready for maintainer review

This PR remains useful: current main lacks the proposed presentation capabilities. The four earlier findings are addressed, and this review found no new blocking correctness defect.

Priority: P3
Reviewed head: 4da7ba02c34dbe9aabb1b38d45f5485435e0870a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent extension with useful visual proof and resolved earlier findings; no new blocking defect was found.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected browser screenshots exercise the Control UI theme consumers and visibly show neutral branding, both visitors, avatar hats, and authored waiting text; source and regression coverage support the subsequent lifecycle fixes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected browser screenshots exercise the Control UI theme consumers and visibly show neutral branding, both visitors, avatar hats, and authored waiting text; source and regression coverage support the subsequent lifecycle fixes.
Evidence reviewed 9 items Pinned introduction reviewed: Reviewed the merge-base-to-head changes. The recorded test merge has the supplied base followed by the exact PR head as parents; unrelated endpoint drift was excluded.
Still necessary on main: The fetched main normalizer accepts only name, description, light, and dark; it rejects the four proposed presentation fields. The existing merged theme work supplies the underlying catalog rather than these capabilities. The latest release API reports v2026.9.5; release-source probes did not establish equivalent shipped functionality.
Compatibility and shared ownership: All four additions are optional, omitted values retain existing branding, and the existing normalizer still enforces the 4096-byte limit. Plugin snapshot tests preserve definitions without the new fields; UI catalog tests exercise existing definitions, branding refresh, unavailable-theme fallback, and restoration without replacing the saved selection.
Findings None None.
Security None None.

How this fits together

OpenClaw’s theme catalog combines built-in, plugin, and personal definitions. The Control UI consumes validated definitions to render branding, chat status, avatars, and composer decorations.

flowchart TD
  A[Plugin and personal themes] --> B[Shared theme validation]
  C[Built-in themes] --> D[Gateway theme catalog]
  B --> D
  D --> E[Control UI theme owner]
  E --> F[Branding and waiting text]
  E --> G[Avatars and composer visitors]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +743, Tests +884, Docs +26, Other +23. Total +1676 across 70 files.

View PR surface stats
Area Files Added Removed Net
Source 45 991 248 +743
Tests 18 980 96 +884
Docs 4 26 0 +26
Config 0 0 0 0
Generated 0 0 0 0
Other 3 27 4 +23
Total 70 2024 348 +1676

Review metrics

Metric Value Why it matters
Portable theme contract 4 optional fields; 0 existing defaults changed The public plugin and personal-theme format grows while existing definitions retain their behavior.
Startup enforcement 366912 → 370176 gzip bytes (+0.89%) The declared feature cost is bounded while growth and variance allowances remain unchanged.
Production versus tests Production/tooling net +766 lines; tests/support net +884 lines Production growth supports the shared presentation contract and artwork, with regression coverage for defaults and lifecycle changes.

Technical review

Best possible solution:

Keep presentation choices in the shared declarative theme contract, preserving existing defaults and browser preferences while plugin themes opt into the new behavior.

Do we have a high-confidence way to reproduce the issue?

Not applicable to a feature request; current main rejects the proposed fields, and supplied browser captures demonstrate the new visible behavior.

Is this the best way to solve the issue?

Yes: extending the existing validated theme catalog is a coherent approach, with built-in artwork and no competing preference or persistence owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 017146c2b957.

Labels

Label justifications:

  • P3: This is optional appearance customization rather than a repair for a broken core workflow.
  • merge-risk: 🚨 compatibility: The portable plugin and personal-theme format expands; the PR explicitly documents opt-in semantics and covers unchanged definitions and defaults.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected browser screenshots exercise the Control UI theme consumers and visibly show neutral branding, both visitors, avatar hats, and authored waiting text; source and regression coverage support the subsequent lifecycle fixes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected browser screenshots exercise the Control UI theme consumers and visibly show neutral branding, both visitors, avatar hats, and authored waiting text; source and regression coverage support the subsequent lifecycle fixes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected browser screenshots exercise the Control UI theme consumers and visibly show neutral branding, both visitors, avatar hats, and authored waiting text; source and regression coverage support the subsequent lifecycle fixes.

Evidence

What I checked:

  • Pinned introduction reviewed: Reviewed the merge-base-to-head changes. The recorded test merge has the supplied base followed by the exact PR head as parents; unrelated endpoint drift was excluded. (4da7ba02c34d)
  • Still necessary on main: The fetched main normalizer accepts only name, description, light, and dark; it rejects the four proposed presentation fields. The existing merged theme work supplies the underlying catalog rather than these capabilities. The latest release API reports v2026.9.5; release-source probes did not establish equivalent shipped functionality. (packages/gateway-protocol/src/theme.ts:262, 017146c2b957)
  • Compatibility and shared ownership: All four additions are optional, omitted values retain existing branding, and the existing normalizer still enforces the 4096-byte limit. Plugin snapshot tests preserve definitions without the new fields; UI catalog tests exercise existing definitions, branding refresh, unavailable-theme fallback, and restoration without replacing the saved selection. (packages/gateway-protocol/src/theme.ts:57, 4da7ba02c34d)
  • Earlier findings addressed: Deferred presentation now notifies branding consumers; transcript dependencies include requested and applied branding; loaded photo avatars receive the shared overlay; authored phrases use a coprime stride. Corresponding regressions are present. The earlier reviewed SHA was unavailable locally, so no byte-identical continuity claim is made. (ui/src/app/bootstrap-theme.ts:96, 4da7ba02c34d)
  • Inspected visual evidence: Inspected all four prepared PNGs from the captured PR body: the default view, neutral branding with penguin and avatar hats, the fedora visitor, and neutral chat status with authored waiting text. These demonstrate the visible changes in the repository’s mocked-Gateway browser harness. The two supplemental photo captures were not included in the prepared manifest and are not counted as inspected evidence.
  • Bounded startup-budget adjustment: The baseline and hard cap both become 369600 bytes, retaining the 512-byte growth and 64-byte variance allowances. The committed rationale records a 369497-byte Linux measurement and an approved 1% envelope; the resulting 370176-byte enforcement limit is 0.89% above the prior limit. (config/control-ui-startup-budget-baseline.json:2, 4da7ba02c34d)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (5 earlier review cycles)
  • reviewed 2026-09-21T06:47:41.025Z sha 022e644 :: needs changes before merge. :: [P2] Notify branding consumers after deferred palette application | [P2] Include avatar hats in transcript render invalidation | [P3] Apply the hat overlay to loaded chat photo avatars | [P3] Choose a coprime stride for authored phrase lists
  • reviewed 2026-09-21T07:50:08.189Z sha 2bcb934 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-21T08:44:46.121Z sha 2176d46c2b2e85c73126cf304890045d3210e108 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-21T09:13:09.816Z sha f4ea7df5c8158f99e1e191aff3c9db855378fbc8 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-21T09:38:29.640Z sha 531d5fc :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 21, 2026
@steipete
steipete force-pushed the steipete/red-hat-theme-openclaw-944e01 branch from f4ea7df to 531d5fc Compare September 21, 2026 09:28
…and avatar hats

Portable theme definitions (built-in, plugin, personal) gain four optional
presentation fields. `mascot: "none"` swaps the lobster mark, favicon, login
gate, system avatar, About hero, and the working-row claw for a neutral prompt
mark drawn in the theme's primary color, and keeps the resident lobster and
lobster strangers off the composer ledge while ordinary visitors keep coming
under the unchanged Lobster visits toggle. `workingPhrases` replaces the
crustacean long-wait words with theme-authored text (up to 24, empty = silent).
`critters` adds catalog visitors (a penguin in a red fedora, and the fedora on
its own) to the ledge traffic at 2 % per critter per load without changing the
regulars' odds. `avatarHat` puts a fedora on an agent avatar about one page
load in six, seeded per agent and load.

The Gateway validates the fields in normalizeThemeDefinition and the TypeBox
schema, projects them onto plugin and personal descriptors, and the theme tool
imports them unchanged. The Control UI resolves branding through the theme
context, stamps data-theme-mascot and data-theme-avatar-hat on the root, and
rebuilds the favicon from computed colors when the mascot changes.

Startup JS grows by 2,467 B gzip (0.67 %); the baseline moves with it.
@steipete
steipete force-pushed the steipete/red-hat-theme-openclaw-944e01 branch from 531d5fc to 4da7ba0 Compare September 21, 2026 10:24
@steipete
steipete merged commit 9e61c5e into main Sep 21, 2026
229 of 231 checks passed
@steipete
steipete deleted the steipete/red-hat-theme-openclaw-944e01 branch September 21, 2026 11:08
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Sep 21, 2026
The failed-turn lifecycle E2E published completed timing through history and
an event, but its canonical mock roster omitted runtimeMs and lastRunId.
A scheduled roster refresh replaced those facts and removed the duration
between assertions. Linux reproduced the exact 30-second textContent timeout.

Publish the same completed session through the existing canonical fixture
owner and verify its timing after an explicit roster refresh. Preserve the
original command-count, 13-second duration, and reload assertions. Product
rendering and branding remain unchanged.

Controlled source comparison passes at 9e61c5e and its parent, and fails
at 1f54ad5 while that commit's parent passes. This repairs the fixture
regression introduced by #149240; it is not a branding regression from #154518.

Validation: Linux single-worker E2E 16/16 in three consecutive runs
(59.62s, 44.33s, 49.52s); macOS 16/16 in 25.30s; 80 focused unit tests
in 14.32s; UI and UI-test typechecks, oxfmt, oxlint, and changed-file gate.
The strengthened assertion fails without the fixture repair. Independent
review is scoped-clean through P1. No user-facing product behavior change.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 22, 2026
…and avatar hats (openclaw#154518)

* feat(ui): let themes drop the mascot, set status words, add critters and avatar hats

Portable theme definitions (built-in, plugin, personal) gain four optional
presentation fields. `mascot: "none"` swaps the lobster mark, favicon, login
gate, system avatar, About hero, and the working-row claw for a neutral prompt
mark drawn in the theme's primary color, and keeps the resident lobster and
lobster strangers off the composer ledge while ordinary visitors keep coming
under the unchanged Lobster visits toggle. `workingPhrases` replaces the
crustacean long-wait words with theme-authored text (up to 24, empty = silent).
`critters` adds catalog visitors (a penguin in a red fedora, and the fedora on
its own) to the ledge traffic at 2 % per critter per load without changing the
regulars' odds. `avatarHat` puts a fedora on an agent avatar about one page
load in six, seeded per agent and load.

The Gateway validates the fields in normalizeThemeDefinition and the TypeBox
schema, projects them onto plugin and personal descriptors, and the theme tool
imports them unchanged. The Control UI resolves branding through the theme
context, stamps data-theme-mascot and data-theme-avatar-hat on the root, and
rebuilds the favicon from computed colors when the mascot changes.

Startup JS grows by 2,467 B gzip (0.67 %); the baseline moves with it.

* fix(ui): complete portable theme branding and CI contracts

* fix(ui): satisfy core lint and the Linux startup budget

* fix(ui): give the startup JS baseline its allowance headroom
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 22, 2026
The failed-turn lifecycle E2E published completed timing through history and
an event, but its canonical mock roster omitted runtimeMs and lastRunId.
A scheduled roster refresh replaced those facts and removed the duration
between assertions. Linux reproduced the exact 30-second textContent timeout.

Publish the same completed session through the existing canonical fixture
owner and verify its timing after an explicit roster refresh. Preserve the
original command-count, 13-second duration, and reload assertions. Product
rendering and branding remain unchanged.

Controlled source comparison passes at ed6b5fe and its parent, and fails
at 923e1df while that commit's parent passes. This repairs the fixture
regression introduced by openclaw#149240; it is not a branding regression from openclaw#154518.

Validation: Linux single-worker E2E 16/16 in three consecutive runs
(59.62s, 44.33s, 49.52s); macOS 16/16 in 25.30s; 80 focused unit tests
in 14.32s; UI and UI-test typechecks, oxfmt, oxlint, and changed-file gate.
The strengthened assertion fails without the fixture repair. Independent
review is scoped-clean through P1. No user-facing product behavior change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant