Skip to content

fix(inbox): don't render GitHub bot avatars in reviewers list#2785

Open
rafaeelaudibert wants to merge 2 commits into
mainfrom
posthog-code/inbox-bot-reviewer-avatar
Open

fix(inbox): don't render GitHub bot avatars in reviewers list#2785
rafaeelaudibert wants to merge 2 commits into
mainfrom
posthog-code/inbox-bot-reviewer-avatar

Conversation

@rafaeelaudibert

Copy link
Copy Markdown
Member

Summary

In the inbox reviewers list, when a reviewer is a GitHub bot (login suffixed with [bot]) we no longer fetch and render their generic bot avatar:

  • posthog[bot] → renders the PostHog logo (transparent-background SVG, object-contain to fit the square slot).
  • Any other bot (e.g. dependabot[bot]) → renders an empty space sized exactly like the avatar, preserving layout/spacing without loading the noisy generic icon.
  • Non-bot logins keep the existing github.com/<login>.png avatar behavior, unchanged.

This affects everywhere SuggestedReviewerAvatar is used: the avatar stack, the reviewers section, and the add-reviewer popover.

Changes

  • packages/ui/src/features/inbox/components/utils/SuggestedReviewerAvatar.tsx — add [bot] detection and the two bot rendering paths.
  • packages/ui/src/features/inbox/assets/posthog-icon.svg — local copy of the PostHog logo for the inbox feature (avoids a cross-feature import from features/auth). Import follows the existing auth/OAuthControls.tsx pattern, typed by packages/ui/src/assets.d.ts.

🤖 Generated with Claude Code

Bot reviewers (GitHub login suffixed with `[bot]`) have noisy generic
avatars. Render an empty space sized like the avatar for them instead, and
use the PostHog logo specifically for `posthog[bot]`.

Generated-By: PostHog Code
Task-Id: 4bd1be27-3e0b-4d10-83fd-a9d64a126439
@rafaeelaudibert rafaeelaudibert requested a review from a team June 19, 2026 19:57
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit f8fbfc7.

@greptile-apps

greptile-apps Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
packages/ui/src/features/inbox/assets/posthog-icon.svg:1
**Landscape SVG will appear half-height in the avatar slot**

The SVG's viewport is 499×271 (~1.85:1 aspect ratio). When `object-contain` scales it to fit a 20×20 slot, the rendered logo is only ~10.9 px tall and 20 px wide, leaving roughly 4.5 px of blank space above and below. In an avatar stack of round 20×20 headshots, the PostHog logo will look noticeably smaller than it fills the slot. If this is acceptable, no change is needed — but it's worth a visual check. Cropping the SVG's viewBox to a square region around the icon mark would make it fill the slot height.

Reviews (1): Last reviewed commit: "fix(inbox): don't render GitHub bot avat..." | Re-trigger Greptile

Comment thread packages/ui/src/features/inbox/assets/posthog-icon.svg Outdated
- Collapse the cn() call to a single line so `biome ci` passes (CI quality job).
- Crop the PostHog logo asset to its colorful chevron mark (viewBox now
  ~1.19:1 instead of 1.85:1) so it fills the square avatar slot instead of
  rendering half-height. Drops the dark monochrome hedgehog, which would be
  invisible in dark mode and is unreadable at avatar size anyway.

Generated-By: PostHog Code
Task-Id: 4bd1be27-3e0b-4d10-83fd-a9d64a126439
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