Skip to content

fix(chat): show a tip user's initials, not a silhouette, when they have no photo - #1337

Closed
bmc08gt wants to merge 1 commit into
code/cashfrom
fix/tip-avatar-initials
Closed

fix(chat): show a tip user's initials, not a silhouette, when they have no photo#1337
bmc08gt wants to merge 1 commit into
code/cashfrom
fix/tip-avatar-initials

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

The same person gets two different avatars depending on which screen you're on. A tipper with no profile photo is GH in the tips list, and an anonymous grey silhouette in the conversation you open from it.

Two overloads of ContactAvatar back a server profile, and only one of them uses the name:

  • ContactAvatar(image, displayName) — the tips list, the blocklist — falls back to InitialsText(displayName).
  • ContactAvatar(userProfile) — the chat top bar, the info card, the profile sheet, the activity feed — dropped the name and fell back to the person silhouette.

What changed

The UserProfile overload now falls back the same way, naming the person with nameOrHandle so a handle-only account gets the first letter of their handle rather than nothing. InitialsText already strips the @.

A profile with neither a name nor a handle keeps the silhouette, which the activity feed depends on — its non-person rows pass UserProfile.Empty to get one.

Tests

ContactAvatarFallbackScreenshotTest renders the three states side by side (named, handle-only, anonymous). common-ui picks up libs.bundles.unit.testing for the Compose test rule; it already had Robolectric.

The messenger's existing ChatIdentityScreenshotTest covers this end to end — its tip-user rows now render initials.

…ve no photo

The same person got two different avatars depending on the screen. The tips list
and the blocklist call `ContactAvatar(image, displayName)`, which falls back to
initials. The chat header, info card, profile sheet and activity feed call the
`UserProfile` overload, which dropped the name on the floor and fell back to the
person silhouette — so a tipper with no photo was "GH" in the tips list and an
anonymous grey figure in the conversation they opened from it.

Give that overload the same fallback, naming the person with `nameOrHandle` so a
handle-only account gets the first letter of their handle rather than nothing.
`InitialsText` already strips the `@`.

A profile with neither a name nor a handle keeps the silhouette. The activity
feed depends on that: its non-person rows pass `UserProfile.Empty` to get one.

`ContactAvatarFallbackScreenshotTest` renders the three states side by side.
@bmc08gt bmc08gt self-assigned this Aug 26, 2026
@github-actions github-actions Bot added the type: fix Bug fix label Aug 26, 2026
@bmc08gt bmc08gt closed this Aug 26, 2026
@bmc08gt
bmc08gt deleted the fix/tip-avatar-initials branch August 27, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant