Problem
The shared Avatar component is monolithic: user vs workspace forking via type, image vs icon vs letter-avatar rendering, and source/error resolution all live in one file (~175 lines). This blocks removing the type prop and migrating call sites to focused components.
Solution
Extract focused pieces under src/components/Avatar/:
AvatarUser.tsx, AvatarWorkspace.tsx, AvatarBody.tsx
AvatarImage.tsx, AvatarIcon.tsx, AvatarInitials.tsx
useUserAvatarSource.ts, useWorkspaceAvatarSource.ts, useAvatarLoadError.ts
types.ts
index.tsx facade preserving today's public API
Add unit tests in tests/unit/AvatarTest.tsx.
PR
#95050
Dependencies
Unblocks M3 and M4. M2 (size unification) can land independently but should coordinate merge order to reduce conflicts.
Issue Owner
Current Issue Owner: @jmusial
Problem
The shared
Avatarcomponent is monolithic: user vs workspace forking viatype, image vs icon vs letter-avatar rendering, and source/error resolution all live in one file (~175 lines). This blocks removing thetypeprop and migrating call sites to focused components.Solution
Extract focused pieces under
src/components/Avatar/:AvatarUser.tsx,AvatarWorkspace.tsx,AvatarBody.tsxAvatarImage.tsx,AvatarIcon.tsx,AvatarInitials.tsxuseUserAvatarSource.ts,useWorkspaceAvatarSource.ts,useAvatarLoadError.tstypes.tsindex.tsxfacade preserving today's public APIAdd unit tests in
tests/unit/AvatarTest.tsx.PR
#95050
Dependencies
Unblocks M3 and M4. M2 (size unification) can land independently but should coordinate merge order to reduce conflicts.
Issue Owner
Current Issue Owner: @jmusial