Skip to content

Commit 8767b2b

Browse files
bra1nDumpclaudehappy-otter
committed
fix(app): inset the Happy H harness glyph from the badge rim
The H is a square mark, so its corners reach sqrt(2) beyond its width — at 0.30 in the 0.42 circle the diagonal touched the rim exactly. 0.26 gives it real clearance. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
1 parent 9b37e9e commit 8767b2b

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

packages/happy-app/sources/components/Avatar.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,19 @@ const harnessIcons: Record<AvatarHarnessIcon, number> = {
3333
};
3434

3535
// One badge geometry for every place an avatar carries a harness icon. The
36-
// glyph ratios keep clear air between glyph and circle edge — the Happy "H"
37-
// gets the same breathing room as the GPT mark, which needs the most.
36+
// glyph ratios keep clear air between glyph and circle edge. The Happy "H"
37+
// is a square mark, so its corners reach √2 further than its width — at
38+
// 0.30 in a 0.42 circle the diagonal touched the rim exactly; 0.26 leaves a
39+
// real margin.
3840
function harnessBadgeSizes(size: number, harness: AvatarHarnessIcon) {
3941
const circleSize = Math.round(size * 0.42);
40-
const iconSize = harness === 'codex' || harness === 'rig'
41-
? Math.round(size * 0.3)
42-
: harness === 'claude'
43-
? Math.round(size * 0.34)
44-
: Math.round(size * 0.42);
42+
const iconSize = harness === 'rig'
43+
? Math.round(size * 0.26)
44+
: harness === 'codex'
45+
? Math.round(size * 0.3)
46+
: harness === 'claude'
47+
? Math.round(size * 0.34)
48+
: Math.round(size * 0.42);
4549
return { circleSize, iconSize };
4650
}
4751

0 commit comments

Comments
 (0)