Skip to content

Add user avatars across the UI#85

Merged
HamptonMakes merged 1 commit intomainfrom
user-avatars-in-ui
Apr 6, 2026
Merged

Add user avatars across the UI#85
HamptonMakes merged 1 commit intomainfrom
user-avatars-in-ui

Conversation

@HamptonMakes
Copy link
Copy Markdown
Collaborator

Summary

Shows user avatars (or initial fallbacks) on plan cards, plan headers, active viewers, and comment threads.

Changes

  • user_avatar helper — Renders <img> when avatar_url is set, falls back to initials in a colored circle
  • Plan cards — Avatar next to author name
  • Plan header — Avatar next to author name
  • Viewers list — Uses avatar images when available, keeps initials fallback
  • Comments — Avatar next to comment author name
  • CSS — New .avatar component with sm/md sizes, object-fit: cover on viewer images
  • Seeds — Hampton gets a real GitHub avatar URL; reviewer gets title/team

To test locally

bundle exec rails db:seed
bundle exec rails s

- Add user_avatar helper that renders avatar_url images or initial fallbacks
- Show avatars on plan cards (index) and plan detail header
- Show avatar images in the active viewers list when avatar_url is set
- Show avatars next to comment authors
- Add .avatar CSS component with sm/md sizes
- Seed demo users with avatar_url, title, and team fields

Amp-Thread-ID: https://ampcode.com/threads/T-019d6373-a857-75b8-b976-dc9a989c53e0
Co-authored-by: Amp <[email protected]>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e7052aae44

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +6 to +10
user_name ||= if comment.author_type == "cloud_persona"
AutomatedPlanReviewer.find_by(id: comment.author_id)&.name || "Reviewer"
else
comment.author_type
end
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore user-friendly fallback author labels

This fallback now returns raw author_type values when the backing user lookup fails, so historical comments can render internal enum strings like human or local_agent (for example, after a user is removed in ActiveAdmin or related token rows are gone). That is a regression from the previous Unknown/Agent behavior and produces confusing thread headers such as bot-name (via local_agent); keep explicit human-readable fallbacks per author type.

Useful? React with 👍 / 👎.

@HamptonMakes HamptonMakes merged commit b43e2f8 into main Apr 6, 2026
5 checks passed
@HamptonMakes HamptonMakes deleted the user-avatars-in-ui branch April 6, 2026 20:33
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.

1 participant