diff --git a/web/src/components/Companion/PetalCompanion.tsx b/web/src/components/Companion/PetalCompanion.tsx index efc03aa..91ece65 100644 --- a/web/src/components/Companion/PetalCompanion.tsx +++ b/web/src/components/Companion/PetalCompanion.tsx @@ -88,13 +88,18 @@ export function PetalCompanion({ const [pickerOpen, setPickerOpen] = useState(false) const rootRef = useRef(null) const badgeRef = useRef(null) + // Stand-in for the badge's corner, used only for measuring — see + // useCardOverlap. It sits exactly where the badge sits but never bobs, shrinks + // or hovers, so what the mascot yields to can't depend on whether it is + // currently yielding. + const probeRef = useRef(null) // When suggestion cards stack down into the corner, the kitten fades to // translucent and shrinks a step so the card stays readable and clickable. // It wakes back up whenever it has something to say (bubble) or is being // interacted with (picker open) — except under an open History or Garden // panel, where even a cheer would cover the controls she just reached for. - const crowded = useCardOverlap(badgeRef) + const crowded = useCardOverlap(probeRef) const faded = crowded.modal || (crowded.cards && !pickerOpen && !bubble) // Awake companions (no sleeping clip) don't visibly nap — when the engine @@ -135,7 +140,7 @@ export function PetalCompanion({ return (
{pickerOpen && (
)} + +