Skip to content

fix(avatar): add cached fallback to AsyncMemberAvatar#115554

Merged
natemoo-re merged 7 commits into
masterfrom
nm/fix/avatar-user
May 14, 2026
Merged

fix(avatar): add cached fallback to AsyncMemberAvatar#115554
natemoo-re merged 7 commits into
masterfrom
nm/fix/avatar-user

Conversation

@natemoo-re
Copy link
Copy Markdown
Member

@natemoo-re natemoo-re commented May 14, 2026

Custom user avatars (uploaded / gravatar) did not render in the assignee column of the issues feed.

ActorAvatar already handles AsyncMemberAvatar internally, but we have an opt-out mechanism when actor.name || actor.email exists, which happens in the issues feed.

This PR simplifies that bypass and updates the useMembers hook to scan the query cache for users that may already have been fetched as sets it as initialData. This allows the AsyncMemberAvatar to render the full avatar if it's already been fetched or fallback to the current behavior if not.

Net result The issues feed now has user avatars as expected. Closes #115541.

@natemoo-re natemoo-re requested a review from souredoutlook May 14, 2026 14:41
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 14, 2026
@natemoo-re natemoo-re force-pushed the nm/fix/avatar-user branch from 83c0ba1 to 5c4b0ae Compare May 14, 2026 14:42
@natemoo-re natemoo-re marked this pull request as ready for review May 14, 2026 14:43
@natemoo-re natemoo-re requested a review from a team as a code owner May 14, 2026 14:43
Comment thread static/app/components/core/avatar/actorAvatar.tsx Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.52%

@natemoo-re natemoo-re requested a review from a team as a code owner May 14, 2026 15:20
natemoo-re and others added 2 commits May 14, 2026 11:25
Restore the canRenderActor gate so AsyncMemberAvatar only fires
a useMembers fetch when the sparse actor has no name or email. When
a name is present, render the letter avatar immediately; the
useMembers cache scan in findMembersInCache will still upgrade to
the real avatar when the data is already loaded by another query.

This prevents unmocked /members/ requests in tests and avoids
showing a loading placeholder for named actors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@natemoo-re natemoo-re changed the title fix(avatar): remove actor shortcircuit from AsyncMemberAvatar fix(avatar): add cached fallback to AsyncMemberAvatar May 14, 2026
@natemoo-re natemoo-re enabled auto-merge (squash) May 14, 2026 15:49
@natemoo-re natemoo-re merged commit 0596d13 into master May 14, 2026
73 checks passed
@natemoo-re natemoo-re deleted the nm/fix/avatar-user branch May 14, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants