Skip to content

feat(avatar): add real avatars - #161

Merged
HazAT merged 5 commits into
masterfrom
nm/avatars
Aug 22, 2026
Merged

feat(avatar): add real avatars#161
HazAT merged 5 commits into
masterfrom
nm/avatars

Conversation

@natemoo-re

Copy link
Copy Markdown
Member

Currently, the UI shows the same plain initials for every user. The avatar_url is already stored, we just hadn't surfaced it.

This PR adds a new Avatar component which falls back to the existing initials implemention.

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

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

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Unused avatar load cache
    • Removed unused loadedAvatarUrls Set and its onLoad handler, updated comment to accurately reflect that only failed URLs are cached

You can send follow-ups to the cloud agent here.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b5ad4e0. Configure here.

Comment thread src/app/components/Avatar.tsx Outdated
Comment on lines +32 to +35
onError={() => {
failedAvatarUrls.add(avatarUrl!);
forceRender();
}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: When an avatar image fails, only the specific component instance re-renders. Other Avatar components using the same failed URL will continue to show a broken image.
Severity: LOW

Suggested Fix

To ensure all Avatar components update when an image URL fails, implement a mechanism to notify all instances. For example, use a shared state or an event emitter. When an image fails, broadcast an event that all mounted Avatar components subscribe to, causing them to call forceRender() and display the fallback consistently.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: src/app/components/Avatar.tsx#L32-L35

Potential issue: When an avatar image fails to load, the `onError` handler adds the
failed URL to the module-level `failedAvatarUrls` set but only triggers a re-render for
the specific component instance where the error occurred. If other `Avatar` components
are mounted and displaying the same `avatarUrl`, they will not be notified of the
failure. Consequently, their rendering logic, which checks `failedAvatarUrls`, will not
be re-evaluated, and they will continue to display a broken image icon instead of the
intended fallback.

Did we get this right? 👍 / 👎 to inform future reviews.

@HazAT
HazAT merged commit 168e59e into master Aug 22, 2026
12 checks passed
@HazAT
HazAT deleted the nm/avatars branch August 22, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants