Skip to content

feat: discover and manage personal themes in Appearance - #184960

Open
roboclaw-bot wants to merge 1 commit into
mainfrom
openclaw/themes-appearance-discovery-20261026
Open

roboclaw-bot wants to merge 1 commit into
mainfrom
openclaw/themes-appearance-discovery-20261026

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Companion registry: openclaw/clawhub#4065

What Problem This Solves

Users need to discover and manage personal themes in Appearance, without confusing theme data with executable plugins.

User Impact

Appearance gains on-demand theme search, version-pinned install-and-apply, and personal-theme removal. Selecting a different theme resets font and accent overrides; removing the active personal theme restores the inherited default. Themes stay out of general plugin discovery and search.

The companion ClawHub Themes API must be deployed before catalog browsing works against production. Existing theme import remains available. This PR does not deploy either service.

Why This Change Was Made

The UI reuses the existing theme normalizer and profile preferences rather than installing executable packages. Gateway reads are bounded and accept only registry identifiers, validate pinned release checksums, and protect preference writes with expected-value checks. Connection/profile changes retire stale discovery results.

Work sessions

Evidence

  • Focused protocol, Gateway, discovery/controller, catalog filtering and manifest regression suites passed (nine selected files; portable theme shard: 29 tests).

  • Bundled-browser flow passed: on-demand browse, search/retry, install/apply, select the inherited default and personal theme, reload persistence, and remove.

  • UI typecheck, targeted UI/core lint, formatting, i18n verification and documentation listing passed; whitespace check clean.

  • Independent two-pass review returned no actionable P0–P2 findings. The final browser-fixture correction was subsequently exercised in the passing bundled-browser flow.

  • Cross-repository fixture passed the actual ClawHub and OpenClaw schemas, dotted publisher identity, normalized definition and canonical SHA-256 contract.

  • Hosted CI currently has an unrelated bundled-category failure: src/plugins/bundled-plugin-categories.test.ts reports knowledge: expected exactly one purpose category. The focused local reproduction matches; the test, manifest loader and Knowledge manifest are unchanged from base 929abf8, where the Knowledge manifest already has no category. No waiver or fix to that separate plugin is included. Failed job.

  • The second failing job contains two worker-containment assertions, not a Themes failure. Both still expect the bare root-escape error, while the model-visible recovery suffix was introduced by #184901, already in both the task base and the tested CI base cef62a5daf5bcf9484484c50b0aed751320a7cc0. The containment producer, apply_patch, worker test and permissions suite have identical blobs on that base and this head. This is source-attributed baseline contract drift, not a separately executed base replay. Failed job.

The browser and screenshots use the real Control UI with a synthetic Gateway and theme fixture, not a live ClawHub deployment. Live service installation has not been qualified. CI remains separate from these local results.

Before

Appearance at base 929abf8, dark mode, 1440×1000 viewport.

Before: Appearance with built-in themes and import

After

Appearance with the data-only Aurora fixture installed and selected, catalog expanded; same viewport.

After: Appearance theme discovery and personal-theme management

OpenClaw-Publication: 39cd947c-1d45-459e-a4c3-5273312e19a2
@clawsweeper

clawsweeper Bot commented Oct 26, 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 size: XL labels Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 458af51e0e31007a9432fd53db58849813c51cb3
  • Maintainer: @roboclaw-bot
  • Repository role: maintain

These security sensitive changes were made:

  • src/gateway/methods/core-descriptors.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@roboclaw-bot roboclaw-bot changed the title feat: add a data-only Themes registry for Appearance feat: discover and manage personal themes in Appearance Oct 26, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR adds ClawHub theme discovery, pinned installation, and personal-theme removal to Appearance.

Example: A signed-in user finds studio/aurora version 1.0.0 in Appearance.

  • Before: Appearance offers installed themes and manual import.
  • After: The user can install and apply Aurora, then remove its personal copy.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful and appropriately scoped, with inspected UI evidence and meaningful boundary tests, but a definite pagination defect remains and live registry installation is unqualified.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; inspected screenshots establish the rendered fixture workflow, while reported production-handler tests cover denied profile changes and commit-time revocation before preference persistence.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Users cannot discover and install registry-hosted personal themes directly from Appearance.
Reason: The maintainer-authored direction adds a useful Appearance workflow while preserving the existing importer and separating theme data from executable installation.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-authored feature has clear user value, but failed searches can pair an old pagination cursor with a new query.

Priority: P2
Reviewed head: 458af51e0e31007a9432fd53db58849813c51cb3

Before merge

  • Keep pagination cursors bound to their successful query (P2) - After a successful browse returns nextCursor, submit a different search and let that request fail. This assignment changes snapshot.query but retains snapshot.page, including its old cursor. The Load more button subsequently calls browse(snapshot.query, oldCursor), sending a continuation token from the previous query with the failed search's query. ClawHub selects different indexed queries for browsing and searching, so continuation can fail or mix unrelated results. Clear the retained page when changing queries, or publish the page and its query together only after success, and cover the failed-search-then-pagination sequence.

Findings

  • [P2] Keep pagination cursors bound to their successful query — ui/src/app/theme-discovery.ts:70

Tests

  • Missing end-to-end proof: The supplied browser flow does not exercise a real Gateway fetching and installing a pinned release from ClawHub.
Agent review details

How this fits together

Appearance sends theme RPCs to the Gateway, which reads data-only releases from ClawHub and stores normalized definitions in the requesting profile's existing preferences.

flowchart LR
  A[Appearance] --> B[Theme discovery owner]
  B --> C[Gateway theme methods]
  C --> D[ClawHub Themes API]
  C --> E[Profile preference owner]
  E --> F[Theme catalog and renderer]
Loading

Technical review

Best possible solution:

Keep the existing theme and preference owners, and bind each displayed page and continuation cursor to the query that produced them.

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

Source establishes the failure sequence: retain a page with nextCursor, submit a different search that fails, then click Load more; the request contains the new query and the old cursor.

Is this the best way to solve the issue?

The data-only registry boundary and reuse of personal preferences fit the feature; pagination needs a focused query-identity repair.

Full review comments:

  • [P2] Keep pagination cursors bound to their successful query — ui/src/app/theme-discovery.ts:70
    After a successful browse returns nextCursor, submit a different search and let that request fail. This assignment changes snapshot.query but retains snapshot.page, including its old cursor. The Load more button subsequently calls browse(snapshot.query, oldCursor), sending a continuation token from the previous query with the failed search's query. ClawHub selects different indexed queries for browsing and searching, so continuation can fail or mix unrelated results. Clear the retained page when changing queries, or publish the page and its query together only after success, and cover the failed-search-then-pagination sequence.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0b009adc6912.

Provenance checked

  • Personal theme persistence and authority keeps the original intent (68e23cc: Provide personal and plugin themes through shared profile-scoped appearance controls, preserving existing imports.)
  • Preference concurrency checks keeps the original intent (8db1c35: Consolidate Gateway presentation paths while retaining authority and normal concurrent-session behavior.)
  • Plugin catalog taxonomy and discovery changes intended behavior with a stated reason (d26a3ad: Expose registry-aligned product categories while keeping older manifest declarations readable; this PR expressly moves the themes category out of general discovery.)
  • Bounded catalog reads keeps the original intent (2e939d9: Replace exhaustive catalog hydration with bounded overview, search, and continuation requests.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm exec vitest run ui/src/app/theme-discovery.test.ts --config ui/vitest.node.config.ts
  • git diff --check

What I checked:

  • Introduced pagination defect: browse publishes the requested query before success while retaining the previous page; the Load more button combines that query with the retained page cursor. (ui/src/app/theme-discovery.ts:70, 458af51e0e31)
  • Required registry contract: The PR explicitly depends on feat: add a data-only Themes registry for Appearance clawhub#4065. Its listInternal implementation selects different indexed queries for browsing, text searches, and publisher searches, so a retained cursor must remain associated with its originating query. (convex/themes.ts, e975f99bbb5d)
  • Existing authority and storage owners retained: Install and removal use requestOwner and setCanonicalUserPreferences; the latter rechecks authority during worker transaction and commit admission. Added tests cover profile replacement, profile merging, revocation during fetch, and commit-time rollback. (src/gateway/server-methods/themes.ts:200, 458af51e0e31)
  • Stable storage compatibility: v2026.10.7 already stores personal definitions under ui.themeDefinition.* through the canonical preference owner; this PR retains that representation without adding tables, migrations, or replacement readers. (src/gateway/server-methods/themes.ts, 157d8c2bc3ea)
  • Visual proof inspected: Both supplied screenshots were inspected locally and show the before Appearance page and the Aurora fixture installed and selected. The body expressly identifies a synthetic Gateway and disclaims live ClawHub qualification. (458af51e0e31)
  • Current main and review state: Fetched main retains list/get/set/import without the new discovery methods. GitHub still reports the reviewed head open and mergeable, with mergeable_state blocked; the reported CI failures were not established as caused by this diff. (src/gateway/server-methods/themes.ts, 0b009adc6912)

Likely related people:

  • Peter Steinberger: Raw commit 68e23cc adds src/gateway/server-methods/themes.ts:185 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 68e23ccf848c; files: src/gateway/server-methods/themes.ts)

PR surface

Source +720, Tests +661, Docs +19. Total +1400 across 31 files. Added test files: 3.

View PR surface stats
Area Files Added Removed Net
Source 20 3434 2714 +720
Tests 9 662 1 +661
Docs 2 20 1 +19
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 31 4116 2716 +1400

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Optional Appearance functionality has a recoverable search-pagination defect with limited blast radius.
  • merge-risk: 🚨 compatibility: The public manifest taxonomy gains themes, and packages declaring it become excluded from general discovery; this direction is explicitly recorded in the maintainer-authored PR and documentation.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 26, 2026, 4:09 PM ET / 20:09 UTC.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. security-sensitive-changed size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant