Generated per-person avatars, and a direct settings control - #282
Merged
Conversation
Covers determinism/distinctness/legibility for a person's generated fallback avatar, an explicit image still winning, and the sidebar settings icon navigating in one click without opening the account menu.
Every human's fallback avatar (chat messages, mention list, PR-thread replies, the header presence stack, the sidebar account row, and Settings' own account card) now gets a deterministic, per-principal fill instead of the same flat gray circle agents already stood apart from — reusing @corbits/presence's colorForPrincipal (already shipped for live cursors) rather than a second hashing scheme, paired with a computed black/white initials color so it stays legible in both themes regardless of hue. An explicit profile image, when present, still wins. Also splits the sidebar's bottom-left account row into two controls: avatar+name keeps opening the popup menu (weekly usage, feedback, log out), and a new settings gear navigates straight to Settings in one click instead of two. Nothing from the old menu is stranded. react-ui's Avatar takes no `style` prop (only `className`), so the fill is set as CSS custom properties on an ancestor and read back via a `.avatar-identity-generated` class — no react-ui change needed. The underlying gap (Avatar's tone system is a closed enum with no per-principal option) belongs upstream if this needs to grow past a CSS-variable workaround.
…y color DESIGN.md's Account row bullet described Settings as reachable only through the popup menu; it now has its own one-click icon. Also notes the generated-avatar exception to "tokens only" for color.
…ace without
A className written as a literal plus an interpolation tokenized as
["a-b", "${X}"], so the class-list exemption never applied and the class
name was reported as user copy. Shape is now decided with interpolations
blanked; whitespace is still decided on the literal as written, since
blanking substitutes spaces and would make a key like `bench:${id}` look
like prose.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@corbits/presence'scolorForPrincipal(already shipped for live cursors) paired with a computed black/white initials color for legibility in both themes.UserProfile.image) when one exists, previously ignored entirely.[data-slot="avatar"]) that never matched react-ui's actualAvatarmarkup, so the sidebar avatar's intended sizing silently never applied.Upstream gap: react-ui's
Avatarhas nostyleprop and a closedAvatarToneenum, so the per-person fill is implemented as CSS custom properties set on an ancestor and read back via a.avatar-identity-generatedclass rather than a first-class prop. Flagged in CL-6570 for react-ui to grow an identity-color escape hatch if this need shows up elsewhere.Closes CL-6570.
Test plan
bun run typecheckinpackages/chat-ui,packages/settings-ui,apps/web— all cleanbun testinpackages/chat-ui(674 pass),packages/settings-ui(142 pass),apps/web(845 pass, 3 pre-existing unrelated failures needingbun run buildfirst, confirmed failing identically on unmodifiedorigin/main)eslinton all changed files — cleanbunx prettier --writeon all changed files