Skip to content

feat(mobile): customizable sent message colors - #8155

Open
abcdmku wants to merge 9 commits into
pingdotgg:mainfrom
abcdmku:feat/mobile-sent-message-colors
Open

feat(mobile): customizable sent message colors#8155
abcdmku wants to merge 9 commits into
pingdotgg:mainfrom
abcdmku:feat/mobile-sent-message-colors

Conversation

@abcdmku

@abcdmku abcdmku commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Sent messages on mobile were always the theme's blue with no way to change them.

This adds a Sent messages section to mobile Settings → Appearance: bubble color and text color, each with the theme default, a few presets, or a custom color via an HSV picker and hex field. Auto text picks black or white by contrast on custom bubbles, and derived tokens (muted text, inline code, skill mentions) follow the chosen colors. Mobile only; preferences are device-local.

Before After After (custom color)
Appearance settings on main: themes go straight to Text, no message color options Sent messages section with theme default bubble and auto text selected Sent messages section with a custom bubble color selected in the HSV picker

Built with Claude Fable 5 on Claude Code.

🤖 Generated with Claude Code


Note

Low Risk
Device-local appearance preferences and theme CSS overrides only; no auth or network paths. Main risk is contrast/readability regressions on custom colors, which tests partially guard.

Overview
Adds a Sent messages block to mobile Settings → Appearance with a live preview, theme/preset swatches, an HSV picker, and hex input for bubble and text colors.

userBubbleColor and userBubbleTextColor are stored in device preferences (null means theme default or auto text). AppearancePreferencesProvider merges createUserBubbleOverrides into Uniwind CSS variables for both light and dark sheets so chat bubbles pick up the same tokens (muted text, code blocks, fences, skill accents). normalizeUserBubbleColor and explicit null handling in sanitizePreferences avoid stale colors after clearing overrides.

mobileTheme adds contrast-based derivation and hex/HSV helpers; tests cover normalization, overrides, and fence readability.

Reviewed by Cursor Bugbot for commit 4d02613. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add customizable sent message bubble and text colors to mobile appearance settings

  • Adds a "Sent messages" section to the Appearance screen with a live preview and color swatch controls for bubble and text colors.
  • Users pick theme default, presets, or a custom color via the new HsvColorPicker or hex input; text color can be set to auto (derived for readability), white, black, or custom.
  • AppearancePreferencesProvider exposes userBubbleColor and userBubbleTextColor with setters; changes update theme variables immediately without a reload.
  • createUserBubbleOverrides in mobileTheme.ts generates coherent CSS variable overrides for the bubble, text, and related tokens like inline code and mentions.
  • Risk: sanitizePreferences in mobile-preferences.ts now sanitizes new color fields and preserves explicit null; out-of-tree callers that merge preferences without sanitization may see stale bubble colors.

Macroscope summarized 4d02613.

Adds a Sent messages section to mobile appearance settings with theme-default,
preset, and custom hex swatches for the bubble and text colors. Custom bubbles
derive readable text, muted, inline-code, and skill-mention tokens so markdown
inside the bubble keeps its layering.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

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: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bd0e5833-80ad-4d80-8ff5-88b1f206738b

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

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 25, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cbad33f05b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@macroscopeapp

macroscopeapp Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR adds a substantial new mobile appearance workflow with an HSV color picker, persisted preferences, and global theme overrides affecting sent messages and their markdown content. The cross-cutting user-facing behavior is beyond a small self-contained change and merits human review.

You can add or adjust custom eligibility rules. Learn more.

@abcdmku abcdmku changed the title feat(mobile): customize sent message bubble and text colors feat(mobile): sent message color theming Aug 25, 2026
@abcdmku abcdmku changed the title feat(mobile): sent message color theming feat(mobile): app color theming Aug 25, 2026
@abcdmku
abcdmku force-pushed the feat/mobile-sent-message-colors branch from d8f38ed to 933f428 Compare August 25, 2026 01:59
@abcdmku abcdmku changed the title feat(mobile): app color theming feat(mobile): customizable sent message colors Aug 25, 2026
Comment thread apps/mobile/src/persistence/mobile-preferences.ts
abcdmku and others added 2 commits August 24, 2026 21:05
Selecting Custom now toggles local state and reveals the hex field without
committing a seed color, so it works even when the current color matches a
preset (the auto text color is always black or white, both presets). The
swatch row also wraps instead of clipping on narrow screens.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The maxLength cap truncated pastes like " #abcdef " before the normalizer
could trim them; the normalizer already rejects anything invalid, so the
cap only broke valid pastes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@abcdmku
abcdmku force-pushed the feat/mobile-sent-message-colors branch from 933f428 to 095539d Compare August 25, 2026 02:05
Selecting Custom now shows an HSV picker (saturation/brightness pad plus a
hue slider, drawn with SVG gradients) alongside the hex field. The color
commits once on gesture release so a drag writes preferences a single time.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Aug 25, 2026
abcdmku and others added 2 commits August 24, 2026 21:11
Sanitizing dropped an explicit null for the message color keys, so any later
preference save re-derived a blob without them and the session's initial
stored snapshot bled the old color back through the optimistic merge until
restart. Preserve null the same way terminalFontSize and codeFontSize do.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Dragging previously set React state per frame, re-rendering the SVG
surfaces and stuttering. Thumbs now follow shared values like the font
size slider, and the color commits once on release.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread apps/mobile/src/features/settings/appearance/components/HsvColorPicker.tsx Outdated
Horizontal-only pan activation meant brightness-only drags scrolled the
page instead of moving the thumb. The pad now activates on any direction.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread apps/mobile/src/features/settings/appearance/components/HsvColorPicker.tsx Outdated

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b3212db. Configure here.

Comment thread apps/mobile/src/lib/mobileTheme.ts
Quantizing while adopting an external hex drifted the picker's color off
the typed value; adopt the parsed HSV exactly and quantize only on gesture
commits.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread apps/mobile/src/features/settings/appearance/components/HsvColorPicker.tsx Outdated
The fence background stayed the theme's black overlay, which fights black
auto text on mid-tone custom bubbles; it now shifts the surface away from
the text's pole so composited contrast only improves, with a test over the
presets. Picker commits also snapshot the full HSV from the shared values
at gesture time instead of reading component state when the queued
callback runs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant