chore(desktop): remove the DEV Shift+H heart preview

The real trigger (core `reaction` event on affectionate messages) is live, so
drop the dev-only hotkey and its always-mounted listener.
This commit is contained in:
Brooklyn Nicholson 2026-07-10 16:09:23 -05:00
parent 3aaf7e3876
commit 1fa3886bce
3 changed files with 7 additions and 34 deletions

View file

@ -499,7 +499,7 @@ export function ChatView({
)}
{showChatBar && <ScrollToBottomButton />}
{/* Vibe hearts rise from the composer only when no pet is out (else
they play on the pet). DEV Shift+H to preview; not wired to ily/<3 yet. */}
they play on the pet). Fired by the core `reaction` event. */}
{!petPresent && (
<HeartField
className="absolute inset-x-0 z-30"

View file

@ -1,4 +1,4 @@
import { type CSSProperties, useEffect } from 'react'
import { type CSSProperties } from 'react'
import {
createParticleEmitter,
@ -11,8 +11,8 @@ import { $petOverlayActive, forwardPetReaction } from '@/store/pet-overlay'
/**
* TikTok-style floating hearts a thin skin over {@link ParticleField} (pixel
* heart glyph + pink). Placed two ways: rising from the composer when no pet is
* out, or from the pet when one is. Not wired to vibes/`ily`/`<3` yet call
* {@link burstVibeHearts} (or hit the DEV hotkey Shift+H).
* out, or from the pet when one is. Fired by the core `reaction` event (affection
* in a user message) via {@link burstVibeHearts}.
*/
// Light pink reads on both light and dark chat surfaces.
@ -55,8 +55,8 @@ const emitter = createParticleEmitter()
export const playVibeHearts = (count?: number) => emitter.burst(count)
/**
* Fire a vibe burst from anywhere (hotkey, future `ily`/`<3` wiring). Routes to
* where the affection should land:
* Fire a vibe burst (from the core `reaction` event). Routes to where the
* affection should land:
* - pet popped out forward to the overlay window + celebrate (mirrored)
* - pet in-window play here (on the pet) + celebrate
* - no pet play here (composer)
@ -75,29 +75,6 @@ export const burstVibeHearts = (count?: number) => {
}
}
/** DEV-only preview: Shift+H, firing even while the composer is focused. Mount
* once in an always-present component (FloatingPet) a single listener. */
export function useHeartPreviewHotkey() {
useEffect(() => {
if (!import.meta.env.DEV) {
return
}
const onKeyDown = (e: KeyboardEvent) => {
if (!e.shiftKey || e.repeat || e.altKey || e.ctrlKey || e.metaKey || e.code !== 'KeyH') {
return
}
e.preventDefault()
burstVibeHearts()
}
window.addEventListener('keydown', onKeyDown)
return () => window.removeEventListener('keydown', onKeyDown)
}, [])
}
export interface HeartFieldProps {
config?: Partial<ParticleFieldConfig>
className?: string

View file

@ -4,7 +4,7 @@ import { useCallback, useEffect, useRef, useState } from 'react'
import { useGatewayRequest } from '@/app/gateway/hooks/use-gateway-request'
import { useOnProfileSwitch } from '@/app/hooks/use-on-profile-switch'
import { useRouteOverlayActive } from '@/app/hooks/use-route-overlay-active'
import { PetHeartField, useHeartPreviewHotkey } from '@/components/chat/vibe-hearts'
import { PetHeartField } from '@/components/chat/vibe-hearts'
import { persistString, storedString } from '@/lib/storage'
import {
$petAtRest,
@ -121,10 +121,6 @@ export function FloatingPet() {
const roamDir = useStore($petRoamDir)
const routeOverlayOpen = useRouteOverlayActive()
// DEV Shift+H heart preview lives here — FloatingPet is always mounted
// (app-shell), so one listener covers every route whether a pet is out or not.
useHeartPreviewHotkey()
const [position, setPosition] = useState<Point>(loadPosition)
const containerRef = useRef<HTMLDivElement | null>(null)
// The facing mirror lives on the sprite wrapper, not the container, so the