Skip to content

feat(ui): per-user chat bubble colors for logged-in senders#112070

Merged
fuller-stack-dev merged 1 commit into
mainfrom
feat/per-user-chat-bubble-color
Jul 21, 2026
Merged

feat(ui): per-user chat bubble colors for logged-in senders#112070
fuller-stack-dev merged 1 commit into
mainfrom
feat/per-user-chat-bubble-color

Conversation

@fuller-stack-dev

Copy link
Copy Markdown
Member

Closes #112068

What Problem This Solves

In multi-user Control UI sessions, every human sender's chat bubbles look identical: all user bubbles share the same accent tint regardless of who wrote the message. Sender names and avatar initials already distinguish authors, but scanning a busy conversation still requires reading footer names to tell users apart at a glance.

Why This Change Was Made

Each attributed (logged-in) sender's bubbles are now tinted with a stable personal color derived from the same identity seed that already colors their avatar initials, so a user's bubble, avatar, and footer name share one hue. Only the hue varies per user; saturation, lightness, and alpha are fixed per theme mode, which guarantees message text stays readable for every possible hue in both light and dark themes (including the openknot/dash variants, which reuse data-theme-mode). Unattributed local messages, assistant, and tool bubbles are unchanged; no new config or state is introduced.

User Impact

Logged-in users each get their own consistent chat bubble color across sessions and devices, making multi-user conversations scannable at a glance. Single-user sessions look exactly as before.

Evidence

  • Visual verification with the real base.css + grouped.css in a standalone harness across hues spanning the full wheel, in both data-theme-mode="dark" and "light": distinct tints per user, contrast above 10:1 in both modes (dark: 16%-alpha tint under near-white text; light: fixed 94%-lightness pastel under dark text).
  • Computed-style checks confirm untinted local-user and assistant bubbles render byte-identically to before (rgba(255,92,92,0.1) accent and transparent backgrounds respectively).
  • New tests: identity-hue stability/range (ui/src/lib/identity-avatar.test.ts), tinted-vs-untinted group rendering incl. deterministic hue reuse (ui/src/pages/chat/components/chat-message.test.ts).
  • pnpm check:changed delegated to Blacksmith Testbox (lease tbx_01ky1b0q8dyqvsqha63qnwzrc2): exit 0, all lint/check lanes clean.
  • Codex autoreview (gpt-5.6-sol, high reasoning): first pass flagged a real light-mode CSS specificity bug (tinted hover border suppressed); fixed with an explicit light-mode hover rule. Rerun: clean, no actionable findings ("patch is correct", 0.93).

🤖 Generated with Claude Code

Attributed senders' bubbles, footer names, and avatar initials now share a
stable identity hue (same FNV-1a seed as avatar initials, hash % 360). Only
the hue varies per user; saturation/lightness/alpha are fixed per theme mode
so text contrast holds for every hue in light and dark themes. Unattributed
local, assistant, and tool bubbles are unchanged.

Closes #112068

Co-Authored-By: Claude Fable 5 <[email protected]>
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Jul 21, 2026
@clawsweeper

clawsweeper Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: feat(ui): per-user chat bubble colors for logged-in senders This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Land-ready verification (head 869730cecbb):

  • Review artifacts completed and validated via scripts/pr review-init / review-artifacts-init / review-validate-artifacts (recommendation: READY FOR /prepare-pr; issue validation: valid against [Feature]: Per-user chat bubble colors in Control UI (light/dark safe) #112068).
  • Codex autoreview (gpt-5.6-sol, high): first pass found one real finding — light-mode CSS specificity suppressed the tinted hover border — fixed in ui/src/styles/chat/grouped.css; rerun clean ("patch is correct", 0.93).
  • pnpm check:changed delegated to Blacksmith Testbox lease tbx_01ky1b0q8dyqvsqha63qnwzrc2, exit 0.
  • Hosted CI on the exact head: run 29802436264 green on attempt 2. Attempt 1 had a single unrelated failure in src/agents/agent-bundle-mcp-runtime.test.ts ("retires timed-out shared MCP sessions", a timing flake with documented history in [Bug]: MCP timeout retirement regression test flakes after valid fast recovery #103208); this PR touches only ui/**.
  • Visual proof: standalone harness with the real base.css/grouped.css across hues spanning the wheel in both data-theme-mode states; contrast >10:1 both modes; computed styles confirm unattributed local and assistant bubbles are unchanged.
  • Known gaps: the Testbox run predates the CSS-only hover fix (hosted CI on the final head covers it). ClawSweeper's review worker lease expired with only its placeholder comment, so there are no Rank-up moves to apply.

@fuller-stack-dev
fuller-stack-dev merged commit b521a85 into main Jul 21, 2026
180 of 188 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the feat/per-user-chat-bubble-color branch July 21, 2026 05:42
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 21, 2026
…112070)

Attributed senders' bubbles, footer names, and avatar initials now share a
stable identity hue (same FNV-1a seed as avatar initials, hash % 360). Only
the hue varies per user; saturation/lightness/alpha are fixed per theme mode
so text contrast holds for every hue in light and dark themes. Unattributed
local, assistant, and tool bubbles are unchanged.

Closes openclaw#112068

Co-authored-by: Claude Fable 5 <[email protected]>
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 maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Per-user chat bubble colors in Control UI (light/dark safe)

1 participant