Skip to content

fix(web): keep avatar initials inside avatars and enlarge them - #826

Merged
pikann merged 2 commits into
Paca-AI:masterfrom
robertcoroianu:fix/avatar-initials-overflow
Nov 25, 2026
Merged

pikann merged 2 commits into
Paca-AI:masterfrom
robertcoroianu:fix/avatar-initials-overflow

Conversation

@robertcoroianu

@robertcoroianu robertcoroianu commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Initials in small avatars (e.g. the table's reporter column) spilled outside the circle. EntityAvatar set the small font size on the root, but AvatarFallback has its own text-sm which won. The size-matched font size is now applied on the fallback itself (plus leading-none).
  • Avatars in task rows/cards are one step larger so initials are easier to read:
    • table assignee and reporter: 24px -> 32px
    • small assignee picker (board card, subtask rows) and card reporter: 20px -> 24px

Test plan

  • tsc and Biome clean
  • vitest src/components passes
  • Check table, board cards and subtask rows in the browser (row/card height with the larger avatars)

🤖 Generated with Claude Code

AvatarFallback sets its own text size, which overrode the smaller size
EntityAvatar put on the root, so initials spilled out of xs/sm avatars.
Apply the size-matched font size on the fallback itself.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ Minor suggestions only — the fix itself is correct.

Approach: sound — the overflow comes from AvatarFallback's own text-sm outranking the font size inherited from the Avatar root, so setting the size-matched value on the fallback is the narrowest fix and covers every EntityAvatar size at once. (The primitive's group-data-[size=sm]/avatar:text-xs never applies here, since EntityAvatar does not forward size to Avatar.)

Reviewed changes

  • Root cause addressed on the fallback — FALLBACK_TEXT[size] is merged onto AvatarFallback, where twMerge displaces the primitive's text-sm, so xs/sm initials now render at 9/10px instead of 14px.
  • leading-none added — neutral for centering (the fallback is a flex box) and prevents the arbitrary font sizes from inheriting a stale line-height.
  • Call sites checked — every EntityAvatar that overrides the box via className (size="lg" className="size-9", AvatarUpload with size="xl"/"lg" inside size-14/size-12 frames) still declares a size at or above the rendered box, so no new overflow case is introduced; custom fallback nodes are all icons with their own explicit size.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Step the task row/card avatars up one size (20 -> 24px, 24 -> 32px) so
initials are easier to read.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@robertcoroianu robertcoroianu changed the title fix(web): keep avatar initials inside small avatars fix(web): keep avatar initials inside avatars and enlarge them Nov 25, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No critical issues — minor suggestions inline.

Reviewed changes

  • Table avatars enlarged — the AssigneePicker md size used by the task table and the table reporter moved from 24px to 32px (size="default"), with fallback icons bumped to size-4.
  • Card avatars enlarged — the picker's default sm size (board card, subtask rows, gantt row) and the card reporter moved from 20px to 24px, with fallback icons bumped to size-3.
  • Size map kept in step — AVATAR_SIZE now pairs sm with the 24px EntityAvatar and md with the 32px default, so the empty/auto/+N circles match the avatars they stand in for.

Note: 1 inline comment(s) dropped:

  • apps/web/src/components/projects/interactions/assignee-picker.tsx:24-25 (RIGHT) — no comment text

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@pikann pikann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Thank you for the contribution! 🚀

@pikann
pikann merged commit d792b4a into Paca-AI:master Nov 25, 2026
2 checks passed
robertcoroianu added a commit to robertcoroianu/paca that referenced this pull request Nov 25, 2026
The folder mark stayed at size-3 (12px) when the avatar grew from 20px to
24px, shrinking it from 60% to 50% of the box. size-3.5 keeps the ratio,
matching how Paca-AI#826 scaled its fallback icons.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

2 participants