From a634994d2530cf4969b67c2ac6963f0ca815c06c Mon Sep 17 00:00:00 2001 From: prosolis <5590409+prosolis@users.noreply.github.com> Date: Thu, 25 Jun 2026 22:35:38 -0700 Subject: [PATCH] Companion: double the mascot size + drop the sleepy-face nap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Mascot badge 64→128px (Lottie 56→112, emoji fallback 32→64); zzz glyph scaled + repositioned to match. It read too small on screen. - Awake companions (no sleeping clip, e.g. Happy Dog) no longer show a 😴 face or drifting "z" when the engine naps them — they hold their idle pose via a renderMood redirect. Only the always-asleep cat (real sleep clip) keeps the zzz, preserving that gag. Claude-Session: https://claude.ai/code/session_016Yr6jELuRc7hyzYLccQKZd --- .../components/Companion/PetalCompanion.tsx | 21 ++++++++++++------- web/src/components/Companion/companions.ts | 2 +- web/src/index.css | 6 +++--- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/web/src/components/Companion/PetalCompanion.tsx b/web/src/components/Companion/PetalCompanion.tsx index 5bbc927..ac233f3 100644 --- a/web/src/components/Companion/PetalCompanion.tsx +++ b/web/src/components/Companion/PetalCompanion.tsx @@ -17,7 +17,7 @@ const MOOD_EMOJI: Record = { happy: '😺', talking: '😸', celebrate: '😻', - sleeping: '😴', + sleeping: '🐾', } const STORAGE_KEY = 'petal.companion' @@ -40,8 +40,13 @@ export function PetalCompanion({ wordCount, saveStatus, editTick, acceptTick }: const [pickerOpen, setPickerOpen] = useState(false) const rootRef = useRef(null) - // Always-asleep mascots keep the calm sway + zzz whatever the engine's mood. - const napping = companion.alwaysAsleep || mood === 'sleeping' + // Awake companions (no sleeping clip) don't visibly nap — when the engine + // dozes them, keep their normal idle pose instead of a sleepy face. Only a + // mascot with a real sleep animation (the always-asleep cat) shows the zzz. + const hasSleepClip = Boolean(companion.animations.sleeping) + const renderMood: Mood = + mood === 'sleeping' && !companion.alwaysAsleep && !hasSleepClip ? 'idle' : mood + const napping = companion.alwaysAsleep || (mood === 'sleeping' && hasSleepClip) function choose(id: string) { setCompanionId(id) @@ -148,8 +153,8 @@ export function PetalCompanion({ wordCount, saveStatus, editTick, acceptTick }: aria-label="Choose a companion" className={`petal-companion pointer-events-auto select-none ${napping ? 'petal-companion-sleep' : ''}`} style={{ - width: 64, - height: 64, + width: 128, + height: 128, padding: 0, borderRadius: 'var(--radius-pill)', background: 'var(--color-surface-alt)', @@ -162,9 +167,9 @@ export function PetalCompanion({ wordCount, saveStatus, editTick, acceptTick }: > {MOOD_EMOJI[mood]}} + animationData={companion.animations[renderMood]} + className="h-28 w-28" + fallback={{MOOD_EMOJI[renderMood]}} /> {napping && ( diff --git a/web/src/components/Companion/companions.ts b/web/src/components/Companion/companions.ts index e9b1a63..a47dcc3 100644 --- a/web/src/components/Companion/companions.ts +++ b/web/src/components/Companion/companions.ts @@ -41,7 +41,7 @@ export const COMPANIONS: Companion[] = [ happy: happyDog, talking: happyDog, celebrate: happyDog, - // no sleeping clip → naps with the 😴 emoji fallback + // no sleeping clip → stays in its idle pose instead of visibly napping }, }, ] diff --git a/web/src/index.css b/web/src/index.css index de362ae..73d6660 100644 --- a/web/src/index.css +++ b/web/src/index.css @@ -227,10 +227,10 @@ button, a, input { } .petal-zzz { - top: 2px; - right: 8px; + top: 6px; + right: 14px; font-weight: 800; - font-size: 0.8rem; + font-size: 1.1rem; animation: petal-zzz 2.4s ease-in-out infinite; } @keyframes petal-zzz {