fix(inbox): don't render GitHub bot avatars in reviewers list#2785
Open
rafaeelaudibert wants to merge 2 commits into
Open
fix(inbox): don't render GitHub bot avatars in reviewers list#2785rafaeelaudibert wants to merge 2 commits into
rafaeelaudibert wants to merge 2 commits into
Conversation
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
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
Prompt To Fix All With AIFix 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 |
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-containto fit the square slot).dependabot[bot]) → renders an empty space sized exactly like the avatar, preserving layout/spacing without loading the noisy generic icon.github.com/<login>.pngavatar behavior, unchanged.This affects everywhere
SuggestedReviewerAvataris 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 fromfeatures/auth). Import follows the existingauth/OAuthControls.tsxpattern, typed bypackages/ui/src/assets.d.ts.🤖 Generated with Claude Code