Skip to content

feat(ui): save appearance preferences per user profile - #130340

Merged
steipete merged 7 commits into
mainfrom
claude/identity-themes-accent-colors-8d148f
Aug 26, 2026
Merged

steipete merged 7 commits into
mainfrom
claude/identity-themes-accent-colors-8d148f

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Appearance preferences (ui.prefs.theme, ui.prefs.themeMode, ui.prefs.accent) are gateway-global config today, and writing them requires operator.admin via config.patch. On a multi-person gateway that shape is wrong twice over:

  • One admin changing their accent rewrites the shared gateway config and reskins every connected person's UI.
  • Non-admins silently degrade to "Stored in this browser only": their appearance choices never follow them across devices.

Why This Change Was Made

When a Control UI connection is bound to an authenticated user profile (trusted-proxy, Tailscale, GitHub identity), the appearance trio becomes per-profile, stored in the existing user_preferences KV table in the shared state DB via users.prefs.set (self-bound, operator.write). Precedence:

profile pref (users.prefs) → gateway config ui.prefs.* → ui.seamColor (accent) → theme default

Key design decisions:

  • No identity → zero change by construction. Token/password/none auth never creates a profile; every profile-less code path is byte-identical to before (regression-guarded in tests). Single-user installs see nothing new.
  • No new storage, no new config. Reuses the existing user_preferences table (lazy-additive, no schema change) with three new keys (ui.theme, ui.themeMode, ui.accent), defined once in gateway-protocol next to GIT_COAUTHOR_PREFERENCE_KEY. Values are normalized defensively at every reader (strict #rrggbb, closed enums; invalid → unset → falls through to the gateway default).
  • Additive protocol event users.prefs.changed (bounded schema, operator.read scope guard), emitted only to connections bound to the same merged profile, so a person's other devices update live.
  • The accent apply path is untouched (control-ui-presentation.ts); only the store feeding the resolved value became identity-aware, inside the existing server-prefs provenance/pending machinery. Pending local edits still shadow incoming updates; per-profile pending state is scope-namespaced (<gateway>:profile:<id>) so shared browsers cannot replay another person's queued intent.
  • Restore default deletes only the profile key (null write) and falls back to the gateway-wide value — an admin's ui.prefs/ui.seamColor remain the defaults for everyone who hasn't chosen.
  • talk.config projects the caller's profile accent first when the connection is profile-bound; token-authenticated nodes (no profile) are unchanged, so native apps inherit correct behavior with no app changes.
  • Read-only (viewer-scope) profile-bound connections keep today's device-local degradation; users.prefs.set needs operator.write.
  • Scope: appearance trio only. Locale, chat display prefs, and sidebar entries stay gateway-config; they are equally personal and can follow through the same seam later.

Behavior change worth naming: on multi-person gateways an admin restyling their own UI no longer pushes it onto the whole team. Gateway-wide ui.prefs becomes the default people see before making a personal choice, and stays authoritative for profile-less connections.

Startup JS budget: main's tide/beacon/phosphor baseline 341333 → 342930 B gzip (+1.6 KiB incl. jitter headroom) for the profile resolution/routing on the boot path; measured 342875 B on the combined tree.

Rebase onto the Tide/Beacon/Phosphor themes landing surfaced a real drift class: the profile store's closed theme enum would have silently dropped "tide"/"beacon"/"phosphor" profile values. Fixed by making UI_APPEARANCE_THEME_VALUES the exported wire-contract list, deriving the Control UI's synced-theme set from it (new Set<ThemeName>(...) makes an unknown protocol name a compile error), and adding an exhaustive Record<ThemeName, true> test so a future theme missing from the wire contract fails to compile and fails at runtime. (theme.ts and the config zod enum keep their own copies — consolidating those is a named follow-up, not this PR.)

User Impact

  • Team-gateway users: theme, color mode, and accent become personal and follow you across devices ("Saved to your profile — follows you on every device." provenance hint); nobody restyles anyone else.
  • Non-admin operators with operator.write get durable synced appearance for the first time (previously browser-local only).
  • Single-user/token-auth operators: no visible change anywhere.

Evidence

  • Targeted suites (all green): packages/gateway-protocol users-prefs schema, server-broadcast.board, server-methods/users-preferences (incl. merged-profile event targeting), server-methods/talk (profile accent projection incl. malformed-value rejection and profile-less regression), UI server-prefs.profile / server-prefs / app-shell-gateway / config-page (102 tests, incl. the theme wire-contract exhaustiveness guard); all re-run green after the rebase.
  • pnpm check:changed green (format, tsgo, oxlint, import cycles, DB-first guard, coercion guard, all others).
  • pnpm build + pnpm ui:build green; startup budget within pinned baseline.
  • Live proof on an isolated dev gateway (OPENCLAW_STATE_DIR, port 19310, trusted-proxy auth behind a header-injecting loopback proxy; two identities alice/bob, three browser contexts driven by Playwright, video + screenshots attached):
    1. alice picks violet + Dash → hint shows "Saved to your profile"; chrome updates.
    2. bob (separate profile) stays on defaults, picks teal; alice unaffected.
    3. alice on a second fresh browser context receives violet + Dash from her profile.
    4. Live push: pink chosen on device 2 arrives on device 1 without reload (users.prefs.changed).
    5. Restore default clears only alice's accent profile key (deletion also propagates live); her theme row and bob's accent row survive: user_preferences end state alice ui.theme="dash", bob ui.accent="#35b9b0".
  • Profile-less live path is the unchanged path (token auth); byte-identical resolution is regression-guarded in server-prefs.profile.test.ts and the untouched pre-existing server-prefs suite.

Production vs test LOC (numstat, judged): ~+330 production (feature capability: protocol keys/event, gateway emit + talk projection, UI routing/provenance) / ~+310 tests, plus docs.

02-alice-violet-profile-hint

04-bob-default-not-violet

07-alice1-live-pink

06-alice2-follows-profile

alice-device1-flow.mp4

When a Control UI connection is bound to an authenticated user profile
(trusted-proxy, Tailscale, GitHub identity), theme, theme mode, and accent
become per-profile: stored in the existing user_preferences KV store via
users.prefs.set, overriding gateway-wide ui.prefs, with live cross-device
updates over a new additive users.prefs.changed event scoped to the same
merged profile. Restore default deletes only the profile key and falls back
to the gateway-wide value. talk.config projects the caller's profile accent
for native clients. Profile-less connections (token/password/none auth)
keep the existing gateway-config behavior byte-identically.

Release-note context: on multi-person gateways appearance choices are now
personal and follow you across devices; an admin restyling their own UI no
longer reskins the whole team.
@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime size: XL maintainer Maintainer-authored PR labels Aug 26, 2026
@steipete
steipete marked this pull request as ready for review August 26, 2026 20:02
iOS and Android resolve the profile accent through talk.config on connect
and config refresh; live per-profile appearance push on natives is a named
follow-up.
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Aug 26, 2026
@openclaw-barnacle openclaw-barnacle Bot added the app: android App: android label Aug 26, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 26, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 26, 2026, 7:25 PM ET / 23:25 UTC.

ClawSweeper review

What this changes

The PR makes Control UI theme, mode, and accent profile-specific for authenticated users, with gateway-wide preferences as the fallback for unprofiled connections.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 7 items remain

Keep open: three identity and native-client gaps mean profile appearance can persist into unprofiled access, lose a reset during loading, or fail to reach native branding.

Priority: P2
Reviewed head: d364920d61ef67b2722149826101c246292ee479

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The feature has targeted coverage and an authorization-safe server boundary, but three user-visible correctness gaps remain.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The PR is authored by a repository member, so the external-contributor proof gate does not apply.
Patch quality 🦐 gold shrimp (3/6) 3 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The PR is authored by a repository member, so the external-contributor proof gate does not apply.
Evidence reviewed 7 items Profile removal does not restore fallback: Gateway synchronization refreshes profile preferences after runtime configuration setup, but that refresh returns immediately with no profile; the cached config snapshot is not reapplied.
Cached config cannot reload on identity change: ensureLoaded loads only when no config snapshot exists, so it cannot restore gateway preference values after a profile disappears.
Unprofiled transitions are reachable: The gateway store clears selfUser during stale-build and connection-error transitions.
Findings 3 actionable findings [P1] Reconcile appearance when an authenticated profile disappears
[P1] Carry the active profile through appearance reset
[P2] Deliver profile accent to the native branding consumers
Security None None.

How this fits together

The Control UI receives a gateway connection snapshot, combines gateway configuration with profile preferences, and applies the resulting appearance in the browser. Gateway methods persist profile preferences and expose profile-aware accent data to connected clients.

flowchart LR
  A[Gateway connection] --> B[Connection identity]
  B --> C[Profile preferences]
  D[Gateway UI configuration] --> E[Appearance reconciliation]
  C --> E
  E --> F[Control UI appearance]
  E --> G[Native client appearance]
  F --> H[Preference update]
Loading

Before merge

  • Reconcile appearance when an authenticated profile disappears (P1) - When selfUser changes from a profile to null, the profile refresh returns immediately and the cached gateway config is not reapplied. The former profile overlay can therefore remain visible for token/password or other unprofiled access. Reconcile gateway preferences under the new unprofiled scope and add a profile-to-none regression.
  • Carry the active profile through appearance reset (P1) - Reset chooses its scope from the asynchronously loaded preference cache rather than the current gateway snapshot. Before a fetch finishes, or while changing profiles, an explicit default selection can be treated as device-local and skipped by the write path, so it is lost on reload. Pass the current profile ID through reset/write selection, or gate edits until loading completes.
  • Deliver profile accent to the native branding consumers (P2) - This adds a profile-aware accent only to talk.config, but iOS and Android branding refreshes read config.get, which has no client/profile projection; their talk-config parsers do not consume ui. The new allowlist's claim that native clients resolve this accent through talk.config is therefore false. Wire the profile-aware result into native branding refresh and add request-to-render-state coverage.
  • Resolve merge risk (P2) - A profile-to-unprofiled transition can display the former user’s appearance instead of the gateway fallback.
  • Resolve merge risk (P1) - A reset while preference loading is pending can skip persistence for the active profile.
  • Resolve merge risk (P1) - iOS and Android can retain gateway-wide branding despite the PR's profile-accent behavior.
  • Complete next step (P2) - The active feature branch needs its three concrete identity and native-propagation defects corrected before merger review.

Findings

  • [P1] Reconcile appearance when an authenticated profile disappears — ui/src/app/app-shell-gateway.ts:287-296
  • [P1] Carry the active profile through appearance reset — ui/src/app/server-prefs.ts:270-304
  • [P2] Deliver profile accent to the native branding consumers — src/gateway/server-methods/talk.ts:809-823
Agent review details

Security

None.

PR surface

Source +501, Tests +740, Docs +6, Other +21. Total +1268 across 36 files.

View PR surface stats
Area Files Added Removed Net
Source 19 660 159 +501
Tests 9 764 24 +740
Docs 3 9 3 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 5 24 3 +21
Total 36 1457 189 +1268

Review metrics

Metric Value Why it matters
Production versus test change production ~+330, tests ~+310 The feature adds a material profile-preference protocol and reconciliation path; its production behavior needs the identified transition fixes.
Preference contract 3 profile-stored appearance keys, 1 additive preference-change event Authenticated operators now have a different preference precedence and propagation contract.

Stored data model

Persistent data-model change detected: serialized state: ui/src/app/server-prefs-storage.ts, serialized state: ui/src/app/server-prefs.profile.test.ts, unknown-data-model-change: packages/gateway-protocol/src/schema/users-prefs.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Repair identity and native propagation (recommended)
    Restore gateway fallback on profile removal, bind reset/write scope to the current identity, and connect profile accent to native branding with focused regressions.

Technical review

Best possible solution:

Use the current connection identity, including no identity, as the sole source for reconciliation and reset scope, then wire profile-aware accent data into native branding refreshes.

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

Yes—source establishes deterministic profile-to-none, loading-time reset, and native refresh paths; this read-only review did not execute them.

Is this the best way to solve the issue?

Yes—the existing architecture can address the defects by making active identity authoritative and adding a real native appearance consumer.

Full review comments:

  • [P1] Reconcile appearance when an authenticated profile disappears — ui/src/app/app-shell-gateway.ts:287-296
    When selfUser changes from a profile to null, the profile refresh returns immediately and the cached gateway config is not reapplied. The former profile overlay can therefore remain visible for token/password or other unprofiled access. Reconcile gateway preferences under the new unprofiled scope and add a profile-to-none regression.
    Confidence: 0.96
  • [P1] Carry the active profile through appearance reset — ui/src/app/server-prefs.ts:270-304
    Reset chooses its scope from the asynchronously loaded preference cache rather than the current gateway snapshot. Before a fetch finishes, or while changing profiles, an explicit default selection can be treated as device-local and skipped by the write path, so it is lost on reload. Pass the current profile ID through reset/write selection, or gate edits until loading completes.
    Confidence: 0.91
  • [P2] Deliver profile accent to the native branding consumers — src/gateway/server-methods/talk.ts:809-823
    This adds a profile-aware accent only to talk.config, but iOS and Android branding refreshes read config.get, which has no client/profile projection; their talk-config parsers do not consume ui. The new allowlist's claim that native clients resolve this accent through talk.config is therefore false. Wire the profile-aware result into native branding refresh and add request-to-render-state coverage.
    Confidence: 0.94

Overall correctness: patch is incorrect
Overall confidence: 0.93

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 25a16dd96c42.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P2: The feature has bounded but user-visible preference correctness gaps across identity transitions and native clients.
  • merge-risk: 🚨 compatibility: Existing authenticated and unprofiled connections can retain, lose, or fail to receive the intended appearance state.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The PR is authored by a repository member, so the external-contributor proof gate does not apply.

Evidence

Acceptance criteria:

  • [P1] Run focused Control UI regressions for profile-to-none and pending identity-switch reset paths.
  • [P2] Exercise an authenticated profile followed by unprofiled reconnect and verify gateway fallback appearance.
  • [P1] Verify iOS and Android request-to-render state reflects the authenticated profile accent.

What I checked:

Likely related people:

  • steipete: Authored this feature series and multiple prior profile/preference changes. (role: feature owner and recent area contributor; confidence: high; commits: a86807d617b4, d364920d61ef; files: ui/src/app/server-prefs.ts, src/gateway/server-methods/users.ts)
  • Shakker: History shows substantial preference state and synchronization work in this owner boundary. (role: preference-state refactor contributor; confidence: medium; commits: 55e1246702c7, fa06a000c564; files: ui/src/app/server-prefs-state.ts, ui/src/app/server-prefs.ts)
  • Vincent Koc: History shows prior fixes for transient sync and preference provenance. (role: preference-sync contributor; confidence: medium; commits: fefd0830436f, 56ca103f9e21; files: ui/src/app/server-prefs.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Repair identity removal and pending-profile reset behavior with focused regressions.
  • Wire profile accent into native branding and prove the request-to-render path.
  • Refresh redacted live Control UI and native behavior proof after the repairs.

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 (4 earlier review cycles)
  • reviewed 2026-08-26T20:38:11.936Z sha 4403739 :: found issues before merge. :: [P1] Persist the product-default choice for profile users | [P1] Reapply a profile when the active identity changes | [P2] Do not project gateway accent while GitHub identity is pending
  • reviewed 2026-08-26T21:21:36.607Z sha 7a35ed9 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-26T21:38:04.317Z sha d203a89 :: found issues before merge. :: [P1] Keep imported custom themes browser-local
  • reviewed 2026-08-26T22:32:55.193Z sha 25f70bb :: found issues before merge. :: [P1] Keep imported custom themes out of profile storage

…pearance

Addresses the three ClawSweeper review findings:
- resetValue for profile-bound appearance keys is the deletion fallback
  (gateway value), so an explicit product-default selection persists as a
  profile write instead of being misclassified as a reset.
- An identity switch between two known scopes forces a full appearance
  reconcile and clears appearance keys the returning identity never set,
  so a shared browser cannot keep the previous profile's look (boot keeps
  the last-seen shortcut).
- talk.config joins the profile-dependent dispatch gate so a pending
  GitHub identity sync completes before the profile accent is projected;
  token clients pass through untouched.
@steipete

Copy link
Copy Markdown
Contributor Author

All three review findings are fixed on this head; each was verified against the running code before the change.

[P1] Persist the product-default choice for profile users — root cause was resetValue in ui/src/app/server-prefs-state.ts: with a profile active it must be what deleting the profile key falls back to (the gateway value), not the product default. With that corrected, setTheme/setThemeMode's value === resetValue classification only treats a click on the actual fallback value as a reset, so an explicit product-default choice becomes a users.prefs.set write. resetServerUiPref now also lands local settings on that fallback for any profile-bound appearance reset, not just provenance === "profile". Regression: server-prefs.profile.test.ts "targets reset at the gateway value so an explicit product-default choice persists" (asserts resetValue === "dash", the profile write of "claw", and the reset landing on "dash").

[P1] Reapply a profile when the active identity changes — the per-scope last-seen state short-circuited both the whole-object shortcut and the per-key delta in applyServerUiPrefs. A switch between two known scopes now forces a full reconcile (boot keeps the shortcut so legacy device-local values are untouched), and appearance keys the returning identity never recorded are cleared back to defaults so B's accent cannot linger on A. Pending/retained-local shadowing is preserved. Regression: "reapplies the returning profile's appearance after an identity switch" covers A→B→A for theme and the lingering-accent clear.

[P2] Do not project gateway accent while GitHub identity is pending — talk.config is now in PROFILE_DEPENDENT_CORE_METHODS, so the established dispatch gate awaits the pending GitHub identity sync before the handler runs (profile-less/token clients have no sync handle and pass through untouched; a failed sync returns the existing retryable profile-unavailable error). Pinned in registry.test.ts.

Exact-head CI is green on this head; the earlier live multi-identity proof (screenshots/video above) covers the unchanged happy paths.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 26, 2026
@clawsweeper clawsweeper Bot removed the rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. label Aug 26, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. labels Aug 26, 2026
Custom palettes are browser-local by contract, so a profile must never
carry theme=custom to a browser that cannot render it. The wire contract
drops custom from the storable theme values (readers self-heal any stored
value), a profile-bound custom selection stays retained browser-local
(including the offline-queued path), and the exhaustive theme test now
encodes the exception.
@steipete

Copy link
Copy Markdown
Contributor Author

The custom-theme finding is fixed on head d364920, aligned with the existing documented contract that imported palettes live only in the browser that imported them:

  • UI_APPEARANCE_THEME_VALUES (the profile wire contract) no longer includes custom, so readers treat any stored custom as unset and fall back to the gateway value — the store self-heals.
  • A profile-bound custom selection is retained browser-local instead of syncing (pushServerUiPrefs blocks it; the offline-queued path is diverted in the drain), while other appearance keys in the same batch still sync. The existing "Stored in this browser only" hint then describes the situation truthfully.
  • The Control UI keeps honoring config-synced custom (unchanged palette-gated canApply path); the UI theme set is now [...wire contract, "custom"] with the difference named in a comment.
  • The exhaustive theme test now encodes the exception (custom: false) and a new regression covers the mixed batch (accent syncs, custom stays local).

docs/concepts/user-model.md documents the exception.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 26, 2026
@steipete
steipete merged commit a4c01c1 into main Aug 26, 2026
213 checks passed
@steipete
steipete deleted the claude/identity-themes-accent-colors-8d148f branch August 26, 2026 23:48
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 26, 2026
* origin/main: (26 commits)
  fix(plugins): preserve registry epoch on activation rollback (#129232)
  refactor(plugins): make discovery invocation-owned (#130486)
  feat(ui): save appearance preferences per user profile (#130340)
  fix: Buzz bots recover relay stalls and reject revoked senders (#130467)
  fix(code-mode): serialize catalog handles nested in final values (#130276)
  fix(webchat): CLI skill and harness-injected turns render as operator-sent messages (#130427)
  fix(agents): read the published model catalog owner from session_status (#130277)
  fix(channels): preserve long presentation text (#130368)
  fix(agents): route CLI bootstrap truncation notice into the system prompt (#130325)
  refactor(plugins): unify setup registration and artifact selection (#130474)
  fix(memory): prevent forgotten session content from returning (#130451)
  refactor(outbound): consolidate transport completion (#130460)
  fix(workers): protect in-flight workspace manifests from concurrent retention (#130449)
  fix(portals): keep worker previews reachable and owned by the active environment (#130434)
  fix(config): keep core channels keys in the generated config schema (#120736)
  chore(deps): refresh dependencies after seven-day cooldown (#130296)
  fix(agents): remind exec models to quote shell metacharacters (#125485)
  fix(auth): honor shared-store ownership in temp-state exec and agent deletion (#130437)
  fix(openshell): preserve file writes during concurrent mirror commands (#130447)
  fix(workers): report full nodes as at capacity, not offline (#130445)
  ...
steipete added a commit that referenced this pull request Aug 27, 2026
…droid (#130598)

* feat(apps): resolve the per-profile accent live on iOS, macOS, and Android

Named follow-up from #130340: native apps now fetch the caller's own
profile accent (users.prefs.get, strict #rrggbb normalization) and prefer
it over the gateway accent, refetching on users.prefs.changed — the
gateway targets that event at the caller's own profile, so clients need no
identity logic. macOS stores it separately from the seam color so
settings-pane config refreshes cannot clobber it, and fetches bypass
ControlChannel.request to avoid degrading the channel on older gateways.
Profile-less and token connections are unchanged. Removes the ios/android
users.prefs.changed allowlist entries now that handlers exist.

* chore(macos): satisfy swiftformat explicit-self on profileAccentHex
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
* feat(ui): save appearance preferences per user profile

When a Control UI connection is bound to an authenticated user profile
(trusted-proxy, Tailscale, GitHub identity), theme, theme mode, and accent
become per-profile: stored in the existing user_preferences KV store via
users.prefs.set, overriding gateway-wide ui.prefs, with live cross-device
updates over a new additive users.prefs.changed event scoped to the same
merged profile. Restore default deletes only the profile key and falls back
to the gateway-wide value. talk.config projects the caller's profile accent
for native clients. Profile-less connections (token/password/none auth)
keep the existing gateway-config behavior byte-identically.

Release-note context: on multi-person gateways appearance choices are now
personal and follow you across devices; an admin restyling their own UI no
longer reskins the whole team.

* chore(protocol): allowlist users.prefs.changed for mobile clients

iOS and Android resolve the profile accent through talk.config on connect
and config refresh; live per-profile appearance push on natives is a named
follow-up.

* chore(protocol): regenerate Swift/Kotlin models for users.prefs.changed

* fix(ui): honor explicit defaults and identity switches for profile appearance

Addresses the three ClawSweeper review findings:
- resetValue for profile-bound appearance keys is the deletion fallback
  (gateway value), so an explicit product-default selection persists as a
  profile write instead of being misclassified as a reset.
- An identity switch between two known scopes forces a full appearance
  reconcile and clears appearance keys the returning identity never set,
  so a shared browser cannot keep the previous profile's look (boot keeps
  the last-seen shortcut).
- talk.config joins the profile-dependent dispatch gate so a pending
  GitHub identity sync completes before the profile accent is projected;
  token clients pass through untouched.

* chore(ui): satisfy assertion-safety ratchet and docs formatting

* refactor(ui): extract server-prefs storage primitives

server-prefs.ts crossed the 700-line cap after the review fixes; the
stateless localStorage persistence primitives move to
server-prefs-storage.ts (no behavior change). Shrink-prunes the
assertion-safety baseline for the moved casts.

* fix(ui): keep imported custom themes out of profile storage

Custom palettes are browser-local by contract, so a profile must never
carry theme=custom to a browser that cannot render it. The wire contract
drops custom from the storable theme values (readers self-heal any stored
value), a profile-bound custom selection stays retained browser-local
(including the offline-queued path), and the exhaustive theme test now
encodes the exception.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
…droid (openclaw#130598)

* feat(apps): resolve the per-profile accent live on iOS, macOS, and Android

Named follow-up from openclaw#130340: native apps now fetch the caller's own
profile accent (users.prefs.get, strict #rrggbb normalization) and prefer
it over the gateway accent, refetching on users.prefs.changed — the
gateway targets that event at the caller's own profile, so clients need no
identity logic. macOS stores it separately from the seam color so
settings-pane config refreshes cannot clobber it, and fetches bypass
ControlChannel.request to avoid degrading the channel on older gateways.
Profile-less and token connections are unchanged. Removes the ios/android
users.prefs.changed allowlist entries now that handlers exist.

* chore(macos): satisfy swiftformat explicit-self on profileAccentHex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android 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. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts 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