Repository navigation
feat(ui): let themes drop the mascot, set status words, add critters and avatar hats - #154518
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. Reviewed September 21, 2026, 6:36 AM ET / 10:36 UTC (Revision 6). ClawSweeper reviewWhat this changesExtends 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 Review scores
Verification
How this fits togetherOpenClaw’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]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +743, Tests +884, Docs +26, Other +23. Total +1676 across 70 files. View PR surface stats
Review metrics
Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
f4ea7df to
531d5fc
Compare
…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.
531d5fc to
4da7ba0
Compare
|
Merged via squash.
|
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.
…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
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.
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"—nonereplaces 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
normalizeThemeDefinitionvalidates the fields (unknown ids and duplicates are rejected with the allowed values named), the TypeBox schema mirrors them, andresolveThemeBrandinggives every consumer one defaulted shape. Plugin and personal descriptors project the fields sothemes.listandthemes.getreturn them, and thethemetool'simportround-trips them.ApplicationTheme.brandingresolves built-ins statically and dynamic themes from the catalog definition,applyThemePresentationstampsdata-theme-mascotanddata-theme-avatar-haton the root, leaf glyphs read them throughcurrentThemeBranding(), and the favicon runtime rebuilds its base artwork from computed colors when the mascot flips. The lobster pet gets aresidentEnabledgate separate from the visits toggle, pluscritters, and replans its passer when either changes.theme-flair-sprites.ts); definitions never carry markup.Proof
theme-typography,theme-muted-contrast,theme-selection-defaults): 58 tests green.tsgocore and UI,stylelint,oxfmt --check, keyless i18n baseline and verify: green.Captures from the mocked end-to-end harness (synthetic fixtures only; one portable theme with
mascot: "none",critters: ["penguin", "fedora"],avatarHat: "fedora"):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.
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.