fix(avatars): scale agent squircles from normalized paths - #7307
Merged
Merged
Conversation
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.
Overview
Category: fix
User Impact: Agent avatars and empty agent-team placeholders now keep the same intentional squircle silhouette at every size on desktop, while human avatars remain circular.
Problem: Desktop agent avatars used percentage-rounded rectangles, which made the silhouette vary by surface and required each avatar implementation to recreate the shape. Empty team placeholders also drew a regular CSS border inside the clip, leaving straight inset edges that looked like a cropped square. Solution: Reuse one normalized SVG clip path across desktop artwork. Empty team placeholders use a separately clipped squircle outline behind the clipped surface, so both the fill and outline follow the canonical silhouette.
Related issue
Follow-up to #7106.
Changes
File changes
desktop/src/features/agents/ui/AgentCreationPreview.tsx
Applies the shared squircle clip to agent creation preview images and fallbacks.
desktop/src/features/agents/ui/AgentSessionToolItem/CompactMessageSummary.tsx
Uses the shared agent-avatar silhouette in compact session summaries.
desktop/src/features/agents/ui/IdentityInitialsAvatar.tsx
Clips agent initials with the normalized squircle instead of a percentage radius.
desktop/src/features/agents/ui/TeamIdentityCard.tsx
Uses the shared squircle for agent identities and gives empty teams a separately clipped squircle outline instead of a regular inset border.
desktop/src/features/agents/ui/activityRenderClasses/UserMessageBubble.tsx
Keeps agent avatars in activity message bubbles on the canonical silhouette.
desktop/src/features/home/ui/InboxListPane.tsx
Applies the shared clip to agent avatars in the inbox list.
desktop/src/features/home/ui/InboxMessageRow.tsx
Applies the shared clip to agent avatars in inbox message rows.
desktop/src/features/huddle/components/ParticipantList.tsx
Uses the normalized squircle for agent participants while preserving circular human avatars.
desktop/src/features/messages/ui/MessageRow.tsx
Clips agent message avatars through the shared definition.
desktop/src/features/messages/ui/SystemMessageAvatars.tsx
Uses the canonical agent shape in system-message avatar groups.
desktop/src/features/messages/ui/TypingIndicatorRow.tsx
Uses the canonical agent shape in typing indicators.
desktop/src/features/profile/ui/ProfileAvatar.tsx
Scales the same squircle to the larger agent profile avatar.
desktop/src/features/profile/ui/SelectedRecipientChip.tsx
Uses the shared shape for selected agent recipients.
desktop/src/features/projects/ui/IssueAssigneesRow.tsx
Applies the agent squircle to issue assignees without changing human avatar geometry.
desktop/src/features/projects/ui/ProjectCards.tsx
Uses the canonical shape for agent avatars on project cards.
desktop/src/features/projects/ui/ProjectEntityListRow.tsx
Uses the canonical shape for agent identities in project entity lists.
desktop/src/features/projects/ui/ProjectsActivityFeed.tsx
Uses the shared clip for agent avatars in project activity.
desktop/src/features/projects/ui/ProjectsOverviewRail.tsx
Uses the shared clip for agent avatars in the project overview rail.
desktop/src/main.tsx
Mounts the single shared SVG clip-path definition once for the desktop application.
desktop/src/shared/lib/cn.ts
Registers
rounded-squirclein the border-radius class group so shadcn-stylecn(...)composition resolves it againstrounded-fullby normal last-class precedence.desktop/src/shared/styles/globals/utilities.css
Registers the reusable Tailwind
rounded-squircleutility and references the normalized SVG clip path without agent-specific CSS selectors.desktop/src/shared/ui/AvatarClipPaths.tsx
Owns the reusable normalized object-bounding-box
rounded-squirclepath so all desktop sizes reuse one definition.desktop/src/shared/ui/UserAvatar.tsx
Routes the existing squircle shape option through the shared SVG clip.
desktop/tests/e2e/agents.spec.ts
Verifies team facepile and empty-team placeholder surfaces/outlines use the canonical clip without a rectangular border.
desktop/tests/e2e/messaging.spec.ts
Verifies agent message and profile avatars reuse one clip definition and scale across rendered sizes.
Reproduction steps
Testing
304b159a2: desktop checks, TypeScript typecheck, differential file-size gate, and all 6,453 desktop unit tests.rounded-squircleregistration passed changed-file Biome, desktop TypeScript/build, and pre-push desktop checks at27e0c12d3; the full desktop unit suite passed 6,459/6,459.Screenshots
Screenshots are temporarily omitted. The previous captures used the desktop E2E mock bridge and were not evidence from a live running app, so they were removed.