Skip to content

feat(ui): add accent-color picker to first-run onboarding - #11893

Closed
roninjin10 wants to merge 1 commit into
elizaOS:developfrom
roninjin10:feat/onboarding-accent-color-picker
Closed

feat(ui): add accent-color picker to first-run onboarding#11893
roninjin10 wants to merge 1 commit into
elizaOS:developfrom
roninjin10:feat/onboarding-accent-color-picker

Conversation

@roninjin10

Copy link
Copy Markdown
Contributor

Closes #11892

What & why

New users finished first-run onboarding stuck on the default brand orange — there was no accent picker anywhere in the app (Settings › Appearance only exposed theme mode: light/dark/system). This adds a small, skippable "make it yours" accent step to the in-chat first-run conductor, and mirrors the same control in Settings › Appearance, so accent color becomes a real, discoverable, persisted preference.

The app did not previously support user-selectable accents (arbitrary or preset) — --accent was set once by base.css / an optional host brand theme. So this introduces a minimal preset mechanism that reuses the existing display-preferences store + the --accent CSS var; it does not add a parallel theming system.

How it works

  • ACCENT_PRESETS (state/ui-preferences.ts) — the single source of truth (Eliza Orange · Amber · Rose · Red · Green · Olive). Curated warm/neutral palette, never blue (brand rule Production-quality pass + all-views aesthetic audit gate for every dashboard view #8796). The default preset carries color: null.
  • state/persistence.tsloadUiAccentId / saveUiAccentId (eliza:ui-accent, mirroring saveUiThemeMode) + applyUiAccent(color), which overrides the --accent family inline on <html> (winning over base.css / any host brand theme) and derives --accent-rgb/-hover/-muted/-subtle/--ring/--border-hover/--primary. default (null) clears the overrides → brand accent.
  • useDisplayPreferences.tsuiAccentId + setUiAccent, applied live and persisted through the same store/path Settings' theme mode uses; wired through AppContext + AppState/AppContextValue.
  • Onboarding (use-first-run-conductor.ts) — an accent CHOICE is seeded alongside the tutorial prompt at wrap-up, so it never gates completion: a user who ignores it just taps a tutorial option; the tutorial pick stays the single real completeFirstRun. Picking a swatch calls the shared setUiAccent. Additive: a new step + handler group, no refactor of the surrounding conductor.
  • Settings › Appearance — a swatch grid driving the same preference.

Placement in the step order

Runtime → (provider) → finish/provision → accent ("make it yours") + tutorial (seeded together) → tutorial pick completes. The accent step is non-blocking by construction.

Evidence

  • Unit tests (primary): state/useDisplayPreferences.accent.test.tsx (18 assertions across the palette helpers, applyUiAccent derivation + clear + malformed-input handling, and store persist/restore/normalize) and a new use-first-run-conductor.test.ts case (accent step seeded alongside the tutorial; a swatch pick calls setUiAccent + does not complete first-run; a garbage id no-ops; the tutorial pick remains the single completion). All existing conductor/setup-steps/appearance tests pass unchanged.
  • Visual: .github/issue-evidence/onboarding-accent-color-picker.png — the onboarding accent choice + the Settings swatch grid + the accent applied live to a primary button/link (rendered from the shipped ACCENT_PRESETS + the exact applyUiAccent derivation).

Verification run

  • bun run --cwd packages/ui typecheck — clean.
  • bunx @biomejs/biome check <changed files> — clean.
  • bun run --cwd packages/ui test -- --run src/state/ src/first-run/773 passed (includes the new accent + conductor tests).

N/A rows: real-LLM trajectories (no agent/model/prompt behavior changed — a client-side UI preference); audio (no voice change).

🤖 Generated with Claude Code

Onboarding previously left every new user stuck on the default brand
orange — there was no accent picker anywhere (Appearance settings only
exposed theme mode). This adds a small, skippable "make it yours" accent
step to the in-chat first-run conductor at wrap-up, and mirrors the same
control in Settings › Appearance so accent becomes a real, reusable,
persisted preference.

- New curated ACCENT_PRESETS (never blue, brand rule elizaOS#8796) as the single
  source of truth shared by onboarding + Settings.
- persistence: loadUiAccentId/saveUiAccentId + applyUiAccent, which
  overrides the --accent family inline (winning over base.css / any host
  brand theme) and derives rgb/hover/muted/subtle; the `default` preset
  clears the override, restoring the brand accent.
- useDisplayPreferences: uiAccentId state + setUiAccent, applied live and
  persisted (same store/path Settings' theme mode uses); wired through
  AppContext + AppState/AppContextValue types.
- Onboarding: an accent CHOICE is seeded alongside the tutorial prompt, so
  it never gates completion (a user who ignores it just taps a tutorial
  option). Picking a swatch calls the shared setUiAccent.
- Settings › Appearance: a swatch grid driving the same preference.
- Tests: applyUiAccent derivation + clear, store persist/restore/normalize,
  and the conductor seeding/handling the accent pick without gating finish.

Closes elizaOS#11892

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1b41a87a-5343-40dd-b47a-d891e0732081

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

lalalune added a commit that referenced this pull request Jul 3, 2026
Supersedes #11893. Closes #11892.\n\nValidation:\n- bun run --cwd packages/ui test -- --run src/state/ src/first-run/\n- bun run --cwd packages/ui typecheck\n- bunx @biomejs/biome check changed files\n- git diff --check origin/develop...HEAD\n- bun run --cwd packages/app audit:app
@lalalune

lalalune commented Jul 3, 2026

Copy link
Copy Markdown
Member

Superseded by #11910 after rebasing onto current develop and re-validating. #11910 is merged to develop at d6aedf8.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

First-run onboarding: let users pick their accent color

2 participants