Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
feat(pet): animate layered Vibey poses (#2719)
Max5ed246102e3d
diff --git a/docs/plans/2026-10-12-desktop-mini-main-agent.md b/docs/plans/2026-10-12-desktop-mini-main-agent.mdindex 35135454c..955f9f6ee 100644--- a/docs/plans/2026-10-12-desktop-mini-main-agent.md+++ b/docs/plans/2026-10-12-desktop-mini-main-agent.md@@ -414,6 +414,17 @@ Two beats, so the exit reads before the reflow:- breathing on working poses;- the 30s breathing settle on resting poses, which keeps idle cost nearzero.+- Use the layered Vibey art in `ui/src/pet/VibeyArt.tsx` for the accessory+ motion. `needs_input` reveals three dots from bottom to top before the+ envelope pops; `blocked` lets the sweat drop flow down; `running` lights its+ trail dots and rocks the question mark; `team` uses the same body with a+ turning wrench in the thought bubble; `ready` bursts confetti outward and+ down; and `sleeping` sends a small `z` followed by a large `Z` upward.+ `idle` and `listening` render body-only art with the existing breathing.+- The layered loops animate `transform` and `opacity` only. They pause while+ the page is inactive. Reduced motion disables every animation and leaves the+ full static composition visible. Sleeping deliberately keeps its `z`/`Z`+ loop while the window is visible, even though idle still settles after 30s.- Vibey on the mini stage is **115px** (the owner tuned it on the prototype:2×, then −10%). Verify the size on a real desktop with the owner.@@ -432,13 +443,13 @@ Use the first matching condition, following the approved prototype's `POSES`:3. Blocked: the main session failed.4. Running: the main session is running.5. Ready: main unread results or a nondismissed replied card.-6. Team working: an eligible activity is active.+6. Team working: an eligible activity is active. This uses the `team` pose,+ with the wrench bubble, while Vibey's own turn keeps the `running` pose.7. Idle; sleeping after five idle minutes.Cards and team activity use the same filtered snapshot. Background definitionsalone do not create cards or a busy pose. Quick-reply suggestions do not count-as needs input. Keep the current static images (team uses the existing running-image); layered pose animation is deferred. Preserve reduced-motion behavior.+as needs input. Preserve reduced-motion behavior.The lower-left green activity-count badge is removed; the stack and team posealready communicate activity. Keep the upper-right red unread badge.diff --git a/ui/e2e/pet-mini/fixture.tsx b/ui/e2e/pet-mini/fixture.tsxindex 517fd9ba2..f876c8a86 100644--- a/ui/e2e/pet-mini/fixture.tsx+++ b/ui/e2e/pet-mini/fixture.tsx@@ -1,4 +1,5 @@import { createRoot } from 'react-dom/client';+import { PetAvatar, type PetPose } from '../../src/pet/PetAvatar';import { PetPage } from '../../src/pet/PetPage';import { PetWindow } from '../../src/pet/PetWindow';import { petBridge } from '../../src/pet/petBridge';@@ -12,6 +13,20 @@ import '../../src/index.css';const params = new URLSearchParams(location.search);await i18n.changeLanguage(params.get('lang') ?? 'en');+const PINNED_POSES: readonly PetPose[] = [+ 'idle',+ 'sleeping',+ 'listening',+ 'running',+ 'team',+ 'ready',+ 'needs_input',+ 'blocked',+];+const requestedPose = params.get('pose');+const pinnedPose = requestedPose && PINNED_POSES.includes(requestedPose as PetPose)+ ? requestedPose as PetPose+ : null;declare global {interface Window {petLayoutHitRegions: Parameters<typeof petBridge.setHitRegions>[0];@@ -138,7 +153,17 @@ window.setPetLayoutVisible = (visible) => root.render(<ToastProvider><ApiProvider><InstanceAuthorizationProvider session={{ remote: false, instance_kind: 'personal', capabilities: OWNER_INSTANCE_CAPABILITIES }}>- <WorkbenchInboxProvider><PetWindow>{visible ? <PetPage /> : null}</PetWindow></WorkbenchInboxProvider>+ {pinnedPose ? (+ visible ? (+ <PetWindow>+ <div className="pet-mini-avatar-wrap" style={{ position: 'relative', width: 115, height: 115 }}>+ <PetAvatar pose={pinnedPose} />+ </div>+ </PetWindow>+ ) : null+ ) : (+ <WorkbenchInboxProvider><PetWindow>{visible ? <PetPage /> : null}</PetWindow></WorkbenchInboxProvider>+ )}</InstanceAuthorizationProvider></ApiProvider></ToastProvider>,diff --git a/ui/src/assets/pet/layers/celebrate-body.png b/ui/src/assets/pet/layers/celebrate-body.pngnew file mode 100644index 000000000..4517286daBinary files /dev/null and b/ui/src/assets/pet/layers/celebrate-body.png differdiff --git a/ui/src/assets/pet/layers/celebrate-c01.png b/ui/src/assets/pet/layers/celebrate-c01.pngnew file mode 100644index 000000000..7b24e30e7Binary files /dev/null and b/ui/src/assets/pet/layers/celebrate-c01.png differdiff --git a/ui/src/assets/pet/layers/celebrate-c02.png b/ui/src/assets/pet/layers/celebrate-c02.pngnew file mode 100644index 000000000..25d440597Binary files /dev/null and b/ui/src/assets/pet/layers/celebrate-c02.png differdiff --git a/ui/src/assets/pet/layers/celebrate-c03.png b/ui/src/assets/pet/layers/celebrate-c03.pngnew file mode 100644index 000000000..58f4025cfBinary files /dev/null and b/ui/src/assets/pet/layers/celebrate-c03.png differdiff --git a/ui/src/assets/pet/layers/celebrate-c04.png b/ui/src/assets/pet/layers/celebrate-c04.pngnew file mode 100644index 000000000..1a4a6313cBinary files /dev/null and b/ui/src/assets/pet/layers/celebrate-c04.png differdiff --git a/ui/src/assets/pet/layers/celebrate-c05.png b/ui/src/assets/pet/layers/celebrate-c05.pngnew file mode 100644index 000000000..bdf950565Binary files /dev/null and b/ui/src/assets/pet/layers/celebrate-c05.png differdiff --git a/ui/src/assets/pet/layers/celebrate-c06.png b/ui/src/assets/pet/layers/celebrate-c06.pngnew file mode 100644index 000000000..857db9c74Binary files /dev/null and b/ui/src/assets/pet/layers/celebrate-c06.png differdiff --git a/ui/src/assets/pet/layers/celebrate-c07.png b/ui/src/assets/pet/layers/celebrate-c07.pngnew file mode 100644index 000000000..bdc2336e0Binary files /dev/null and b/ui/src/assets/pet/layers/celebrate-c07.png differdiff --git a/ui/src/assets/pet/layers/celebrate-c08.png b/ui/src/assets/pet/layers/celebrate-c08.pngnew file mode 100644index 000000000..5167dded0Binary files /dev/null and b/ui/src/assets/pet/layers/celebrate-c08.png differdiff --git a/ui/src/assets/pet/layers/celebrate-c09.png b/ui/src/assets/pet/layers/celebrate-c09.pngnew file mode 100644index 000000000..e74a222c9Binary files /dev/null and b/ui/src/assets/pet/layers/celebrate-c09.png differdiff --git a/ui/src/assets/pet/layers/celebrate-c10.png b/ui/src/assets/pet/layers/celebrate-c10.pngnew file mode 100644index 000000000..29685141dBinary files /dev/null and b/ui/src/assets/pet/layers/celebrate-c10.png differdiff --git a/ui/src/assets/pet/layers/celebrate-c11.png b/ui/src/assets/pet/layers/celebrate-c11.pngnew file mode 100644index 000000000..b52d11fd8Binary files /dev/null and b/ui/src/assets/pet/layers/celebrate-c11.png differdiff --git a/ui/src/assets/pet/layers/celebrate-c12.png b/ui/src/assets/pet/layers/celebrate-c12.pngnew file mode 100644index 000000000..c28802a28Binary files /dev/null and b/ui/src/assets/pet/layers/celebrate-c12.png differdiff --git a/ui/src/assets/pet/layers/error-body.png b/ui/src/assets/pet/layers/error-body.pngnew file mode 100644index 000000000..f37955681Binary files /dev/null and b/ui/src/assets/pet/layers/error-body.png differdiff --git a/ui/src/assets/pet/layers/error-drop.png b/ui/src/assets/pet/layers/error-drop.pngnew file mode 100644index 000000000..39f40f218Binary files /dev/null and b/ui/src/assets/pet/layers/error-drop.png differdiff --git a/ui/src/assets/pet/layers/message-body.png b/ui/src/assets/pet/layers/message-body.pngnew file mode 100644index 000000000..eb4572cc7Binary files /dev/null and b/ui/src/assets/pet/layers/message-body.png differdiff --git a/ui/src/assets/pet/layers/message-dot1.png b/ui/src/assets/pet/layers/message-dot1.pngnew file mode 100644index 000000000..88f8ee8e3Binary files /dev/null and b/ui/src/assets/pet/layers/message-dot1.png differdiff --git a/ui/src/assets/pet/layers/message-dot2.png b/ui/src/assets/pet/layers/message-dot2.pngnew file mode 100644index 000000000..99ea887fbBinary files /dev/null and b/ui/src/assets/pet/layers/message-dot2.png differdiff --git a/ui/src/assets/pet/layers/message-dot3.png b/ui/src/assets/pet/layers/message-dot3.pngnew file mode 100644index 000000000..74d8d7522Binary files /dev/null and b/ui/src/assets/pet/layers/message-dot3.png differdiff --git a/ui/src/assets/pet/layers/message-envelope.png b/ui/src/assets/pet/layers/message-envelope.pngnew file mode 100644index 000000000..8626a38caBinary files /dev/null and b/ui/src/assets/pet/layers/message-envelope.png differdiff --git a/ui/src/assets/pet/layers/sleep-body.png b/ui/src/assets/pet/layers/sleep-body.pngnew file mode 100644index 000000000..eb7eca186Binary files /dev/null and b/ui/src/assets/pet/layers/sleep-body.png differdiff --git a/ui/src/assets/pet/layers/sleep-z1.png b/ui/src/assets/pet/layers/sleep-z1.pngnew file mode 100644index 000000000..409279d75Binary files /dev/null and b/ui/src/assets/pet/layers/sleep-z1.png differdiff --git a/ui/src/assets/pet/layers/sleep-z2.png b/ui/src/assets/pet/layers/sleep-z2.pngnew file mode 100644index 000000000..d6a34b5ceBinary files /dev/null and b/ui/src/assets/pet/layers/sleep-z2.png differdiff --git a/ui/src/assets/pet/layers/thinking-body.png b/ui/src/assets/pet/layers/thinking-body.pngnew file mode 100644index 000000000..6e0ead8a6Binary files /dev/null and b/ui/src/assets/pet/layers/thinking-body.png differdiff --git a/ui/src/assets/pet/layers/thinking-bubble.png b/ui/src/assets/pet/layers/thinking-bubble.pngnew file mode 100644index 000000000..b1d7b1bb9Binary files /dev/null and b/ui/src/assets/pet/layers/thinking-bubble.png differdiff --git a/ui/src/assets/pet/layers/thinking-dot1.png b/ui/src/assets/pet/layers/thinking-dot1.pngnew file mode 100644index 000000000..df7477bf2Binary files /dev/null and b/ui/src/assets/pet/layers/thinking-dot1.png differdiff --git a/ui/src/assets/pet/layers/thinking-dot2.png b/ui/src/assets/pet/layers/thinking-dot2.pngnew file mode 100644index 000000000..6ad538f0fBinary files /dev/null and b/ui/src/assets/pet/layers/thinking-dot2.png differdiff --git a/ui/src/assets/pet/layers/thinking-question.png b/ui/src/assets/pet/layers/thinking-question.pngnew file mode 100644index 000000000..b6394922dBinary files /dev/null and b/ui/src/assets/pet/layers/thinking-question.png differdiff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.jsonindex 358f81291..abc9d5247 100644--- a/ui/src/i18n/en.json+++ b/ui/src/i18n/en.json@@ -5902,6 +5902,7 @@"sleeping": "Vibey is asleep","listening": "Listening","running": "Working…",+ "team": "The team is working","ready": "Reply ready","needs_input": "Needs your input","blocked": "Something went wrong"diff --git a/ui/src/i18n/zh.json b/ui/src/i18n/zh.jsonindex a4faa792c..7701f659a 100644--- a/ui/src/i18n/zh.json+++ b/ui/src/i18n/zh.json@@ -5902,6 +5902,7 @@"sleeping": "歪比睡着了","listening": "正在听","running": "正在处理…",+ "team": "团队在干活","ready": "有新回复","needs_input": "需要你回应","blocked": "出了点问题"diff --git a/ui/src/pet/PetAvatar.tsx b/ui/src/pet/PetAvatar.tsxindex af0b6e247..289bb8d1f 100644--- a/ui/src/pet/PetAvatar.tsx+++ b/ui/src/pet/PetAvatar.tsx@@ -1,33 +1,17 @@import { useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';-import vibey from '@/assets/pet/vibey.png';-import vibeyCelebrate from '@/assets/pet/vibey-celebrate.png';-import vibeyError from '@/assets/pet/vibey-error.png';-import vibeyFocus from '@/assets/pet/vibey-focus.png';-import vibeyMessage from '@/assets/pet/vibey-message.png';-import vibeySleep from '@/assets/pet/vibey-sleep.png';-import vibeyThinking from '@/assets/pet/vibey-thinking.png';import { usePageActive } from '@/lib/pageActivity';+import { VibeyArt, type VibeyPose } from './VibeyArt';import type { PetState } from './petState';import './pet.css';-/** What the avatar draws: a pet state, plus the two pose-only states. */-export type PetPose = PetState | 'listening' | 'sleeping';+/** What the avatar draws: a pet state, plus pose-only listening, sleeping, and team states. */+export type PetPose = PetState | 'listening' | 'sleeping' | 'team';-const POSES: Record<PetPose, string> = {- idle: vibey,- sleeping: vibeySleep,- listening: vibeyFocus,- running: vibeyThinking,- ready: vibeyCelebrate,- needs_input: vibeyMessage,- blocked: vibeyError,-};--// Breathing stops after a while in a resting pose, so a pet left alone costs-// nothing; any other pose keeps breathing while the window is visible.+// Breathing stops after a while in idle, so a pet left alone costs nothing.+// Sleeping is deliberate motion and keeps looping while the window is visible.const BREATHING_SETTLE_MS = 30 * 1000;/** The caller derives the pose from eligible activities; badge counts unread replies. */@@ -55,7 +39,7 @@ export const PetAvatar: React.FC<{ pose: PetPose; badge?: number }> = ({const PetPoseImage: React.FC<{ pose: PetPose; alt: string }> = ({ pose, alt }) => {const pageActive = usePageActive();- const resting = pose === 'idle' || pose === 'sleeping';+ const resting = pose === 'idle';const [settled, setSettled] = useState(false);useEffect(() => {@@ -65,12 +49,11 @@ const PetPoseImage: React.FC<{ pose: PetPose; alt: string }> = ({ pose, alt }) =}, [resting]);return (- <img- className="pet-avatar__pose"- src={POSES[pose]}- alt={alt}- data-breathing={pageActive && !settled ? 'true' : 'false'}- draggable={false}+ <VibeyArt+ pose={pose as VibeyPose}+ label={alt}+ active={pageActive}+ breathing={!resting || !settled}/>);};diff --git a/ui/src/pet/PetPage.test.tsx b/ui/src/pet/PetPage.test.tsxindex f3edcf737..46e540c08 100644--- a/ui/src/pet/PetPage.test.tsx+++ b/ui/src/pet/PetPage.test.tsx@@ -516,7 +516,7 @@ describe('PetPage other conversations', () => {runningAgents = workingIn('T');mainSession('S');render(<PetPage />);- await waitFor(() => expect(pose()).toBe('running'));+ await waitFor(() => expect(pose()).toBe('team'));expect(dataState()).toBe('idle');runningAgents = { ...runningAgents, agents: [] };await emit((h) => h.onTurnEnd?.({ session_id: 'T' }));@@ -533,7 +533,7 @@ describe('PetPage other conversations', () => {await waitFor(() => expect(api.getRunningAgents.mock.calls.length).toBeGreaterThanOrEqual(2));expect(pose()).toBe('idle');runningAgents = workingIn('T');- await waitFor(() => expect(pose()).toBe('running'), { timeout: 5000 });+ await waitFor(() => expect(pose()).toBe('team'), { timeout: 5000 });// Registered: no more retries for it.const settled = api.getRunningAgents.mock.calls.length;await new Promise((resolve) => setTimeout(resolve, 2500));@@ -551,7 +551,7 @@ describe('PetPage other conversations', () => {await emit((h) => h.onTurnStart?.({ session_id: 'T' }));await waitFor(() => expect(api.getRunningAgents.mock.calls.length).toBe(before + 1));runningAgents = workingIn('T');- await waitFor(() => expect(pose()).toBe('running'), { timeout: 5000 });+ await waitFor(() => expect(pose()).toBe('team'), { timeout: 5000 });}, 15000);it('re-reads on every event that can change who is working, and catches up on visibility', async () => {@@ -560,7 +560,7 @@ describe('PetPage other conversations', () => {runningAgents = workingIn('T');mainSession('S');render(<PetPage />);- await waitFor(() => expect(pose()).toBe('running'));+ await waitFor(() => expect(pose()).toBe('team'));for (const trigger of REFRESH_TRIGGERS) {const before = api.getRunningAgents.mock.calls.length;await emit((h) => (h[trigger] as ((data: unknown) => void) | undefined)?.({ session_id: 'T', scope_id: null, event: 'updated' }));@@ -576,7 +576,7 @@ describe('PetPage other conversations', () => {canUseAgents = true;runningAgents = workingIn('T');render(<PetPage />);- await waitFor(() => expect(pose()).toBe('running'));+ await waitFor(() => expect(pose()).toBe('team'));});it('never reads other conversations without the agents permission', async () => {@@ -1806,7 +1806,7 @@ describe('desktop mini v2 interaction contract', () => {expect(pose()).toBe('idle');turn([activity('run:r1', 'agent_run')]);await emit((h) => h.onRunsUpdated?.({}));- await waitFor(() => expect(pose()).toBe('running'));+ await waitFor(() => expect(pose()).toBe('team'));expect(screen.queryByLabelText('pet.stop.stop')).toBeNull();});@@ -2063,7 +2063,7 @@ describe('Personal Agent review invariants', () => {expect(pose()).toBe('sleeping');runningAgents = workingIn('visible');await emit((h) => h.onRunsUpdated?.({}));- expect(pose()).toBe('running');+ expect(pose()).toBe('team');} finally { vi.useRealTimers(); }});diff --git a/ui/src/pet/VibeyArt.tsx b/ui/src/pet/VibeyArt.tsxnew file mode 100644index 000000000..0bcd6afd4--- /dev/null+++ b/ui/src/pet/VibeyArt.tsx@@ -0,0 +1,145 @@+import type { CSSProperties } from 'react';+import { Wrench } from 'lucide-react';++import vibey from '@/assets/pet/vibey.png';+import vibeyFocus from '@/assets/pet/vibey-focus.png';++import { GLYPH_COLOR, LAYERS, type LayerPart } from './vibeyLayers';+import './vibey-art.css';++export type VibeyPose =+ | 'listening'+ | 'needs_input'+ | 'blocked'+ | 'running'+ | 'ready'+ | 'team'+ | 'idle'+ | 'sleeping';++const ART = 192;+const pct = (value: number, of = ART) => `${(value / of) * 100}%`;++const box = (+ part: Pick<LayerPart, 'x' | 'y' | 'w' | 'h'>,+ offsetX = 0,+ offsetY = 0,+ outerWidth = ART,+ outerHeight = ART,+): CSSProperties => ({+ left: pct(part.x - offsetX, outerWidth),+ top: pct(part.y - offsetY, outerHeight),+ width: pct(part.w, outerWidth),+ height: pct(part.h, outerHeight),+});++function Part({+ part,+ offsetX,+ offsetY,+ outerWidth,+ outerHeight,+}: {+ part: LayerPart;+ offsetX?: number;+ offsetY?: number;+ outerWidth?: number;+ outerHeight?: number;+}) {+ const style = {+ ...box(part, offsetX, offsetY, outerWidth, outerHeight),+ '--step': part.step,+ '--dx': part.dx ?? 0,+ '--dy': part.dy ?? 0,+ } as CSSProperties;+ return (+ <img+ className={`va-part va-${part.role}`}+ data-step={part.step}+ src={part.src}+ alt=""+ draggable={false}+ style={style}+ />+ );+}++function ThoughtLayers({ tool }: { tool: boolean }) {+ const parts = LAYERS.thinking.parts;+ const dots = parts.filter((part) => part.role === 'tdot');+ const bubble = parts.find((part) => part.role === 'bubble')!;+ const glyph = parts.find((part) => part.role === 'glyph')!;+ const side = glyph.h * 0.92;+ const toolBox = {+ x: glyph.x + glyph.w / 2 - side / 2,+ y: glyph.y + glyph.h / 2 - side / 2,+ w: side,+ h: side,+ };++ return (+ <>+ {dots.map((part) => <Part key={part.src} part={part} />)}+ <span className="va-bubble-group" style={box(bubble)}>+ <img className="va-bubble" src={bubble.src} alt="" draggable={false} />+ {tool ? (+ <span className="va-tool" style={box(toolBox, bubble.x, bubble.y, bubble.w, bubble.h)}>+ <Wrench color={GLYPH_COLOR} strokeWidth={3.2} width="100%" height="100%" />+ </span>+ ) : (+ <Part part={glyph} offsetX={bubble.x} offsetY={bubble.y} outerWidth={bubble.w} outerHeight={bubble.h} />+ )}+ </span>+ </>+ );+}++const CONFIG: Record<VibeyPose, { body: string; mood: 'is-breathing' | 'is-sleeping' }> = {+ listening: { body: vibeyFocus, mood: 'is-breathing' },+ needs_input: { body: LAYERS.message.body, mood: 'is-breathing' },+ blocked: { body: LAYERS.error.body, mood: 'is-breathing' },+ running: { body: LAYERS.thinking.body, mood: 'is-breathing' },+ ready: { body: LAYERS.celebrate.body, mood: 'is-breathing' },+ team: { body: LAYERS.thinking.body, mood: 'is-breathing' },+ idle: { body: vibey, mood: 'is-breathing' },+ sleeping: { body: LAYERS.sleep.body, mood: 'is-sleeping' },+};++/**+ * Layered Vibey art. The body breathes while accessories run their own loops.+ * `active` is controlled by page activity so a hidden desktop window pauses all+ * animation work without changing the rendered composition.+ */+export function VibeyArt({+ pose,+ active = true,+ breathing = true,+ still = false,+ className = '',+ label,+}: {+ pose: VibeyPose;+ active?: boolean;+ breathing?: boolean;+ still?: boolean;+ className?: string;+ label?: string;+}) {+ const { body, mood } = CONFIG[pose];+ return (+ <span+ className={`pet-avatar__pose vibey-art va-${pose} ${breathing ? mood : 'is-resting'} ${active ? 'is-active' : 'is-paused'} ${still ? 'is-still' : ''} ${className}`}+ data-active={active ? 'true' : 'false'}+ role={label ? 'img' : undefined}+ aria-label={label}+ aria-hidden={label ? undefined : true}+ >+ <img className="va-body" src={body} alt="" draggable={false} />+ {pose === 'needs_input' && LAYERS.message.parts.map((part) => <Part key={part.src} part={part} />)}+ {pose === 'blocked' && LAYERS.error.parts.map((part) => <Part key={part.src} part={part} />)}+ {pose === 'ready' && LAYERS.celebrate.parts.map((part) => <Part key={part.src} part={part} />)}+ {pose === 'sleeping' && LAYERS.sleep.parts.map((part) => <Part key={part.src} part={part} />)}+ {(pose === 'running' || pose === 'team') && <ThoughtLayers tool={pose === 'team'} />}+ </span>+ );+}diff --git a/ui/src/pet/pet.css b/ui/src/pet/pet.cssindex 6231f675c..8234767a1 100644--- a/ui/src/pet/pet.css+++ b/ui/src/pet/pet.css@@ -1,5 +1,4 @@-/* Desktop pet motion: CSS only, one pose per state. See- docs/plans/2026-10-01-desktop-pet.md ("Rendering and idle cost"). */+/* Desktop pet shell. Layered pose motion lives in vibey-art.css. */.pet-avatar {position: relative;@@ -12,27 +11,11 @@inset: 0;width: 100%;height: 100%;- object-fit: contain;pointer-events: none;user-select: none;-webkit-user-drag: none;}-/* Every pose plays a short squash when it mounts (a state change remounts it),- then breathes slowly while the window is visible and the pose is not resting. */-.pet-avatar__pose {- animation: pet-change 320ms ease-out;-}--.pet-avatar__pose[data-breathing='true'] {- animation: pet-change 320ms ease-out, pet-breathe 3.6s ease-in-out 320ms infinite;-}--@keyframes pet-breathe {- 0%, 100% { transform: translateY(0) scale(1, 1); }- 50% { transform: translateY(-3px) scale(1.015, 0.985); }-}-@keyframes pet-change {0% { opacity: 0.2; transform: scale(1.08, 0.9); }60% { opacity: 1; transform: scale(0.97, 1.03); }diff --git a/ui/src/pet/petState.test.ts b/ui/src/pet/petState.test.tsindex e78ea1fe0..fb86902cc 100644--- a/ui/src/pet/petState.test.ts+++ b/ui/src/pet/petState.test.ts@@ -196,9 +196,9 @@ describe('derivePetPose', () => {}});- it('shows another conversation\'s work over idle and sleep', () => {- expect(derivePetPose('idle', { othersWorking: true, asleep: true })).toBe('running');- expect(derivePetPose('idle', { othersWorking: true, asleep: false })).toBe('running');+ it('shows the team pose for another conversation\'s work before sleep', () => {+ expect(derivePetPose('idle', { othersWorking: true, asleep: true })).toBe('team');+ expect(derivePetPose('idle', { othersWorking: true, asleep: false })).toBe('team');expect(derivePetPose('idle', { othersWorking: false, asleep: true })).toBe('sleeping');expect(derivePetPose('idle', { othersWorking: false, asleep: false })).toBe('idle');});diff --git a/ui/src/pet/petState.ts b/ui/src/pet/petState.tsindex 784f65ec5..e7586754c 100644--- a/ui/src/pet/petState.ts+++ b/ui/src/pet/petState.ts@@ -129,7 +129,7 @@ export const derivePetPose = ({ othersWorking, asleep }: { othersWorking: boolean; asleep: boolean },): PetPose => {if (state !== 'idle') return state;- if (othersWorking) return 'running';+ if (othersWorking) return 'team';return asleep ? 'sleeping' : 'idle';};diff --git a/ui/src/pet/vibey-art.css b/ui/src/pet/vibey-art.cssnew file mode 100644index 000000000..0fca3a52a--- /dev/null+++ b/ui/src/pet/vibey-art.css@@ -0,0 +1,216 @@+/* Layered Vibey art: the body breathes while each accessory runs its own loop. */+.vibey-art {+ position: absolute;+ inset: 0;+ display: block;+ aspect-ratio: 1;+ animation: pet-change 320ms ease-out;+}++.vibey-art img.va-body {+ position: absolute;+ top: 0;+ left: 0;+ width: 100%;+ height: 100%;+ object-fit: contain;+ transform-origin: 50% 86%;+ pointer-events: none;+}++.vibey-art img.va-part,+.vibey-art .va-bubble-group,+.vibey-art .va-tool {+ position: absolute;+ display: block;+ max-width: none;+ margin: 0;+ padding: 0;+ border-radius: 0;+ background: none;+ pointer-events: none;+}++.vibey-art .va-bubble-group img.va-bubble {+ position: absolute;+ top: 0;+ left: 0;+ width: 100%;+ height: 100%;+}++.vibey-art .va-tool svg {+ display: block;+ overflow: visible;+}++/* Body motion keeps the existing desktop-pet breathing feel. */+.vibey-art.is-breathing .va-body {+ animation: va-breathe 3.6s ease-in-out infinite;+}++.vibey-art.is-sleeping .va-body {+ animation: va-breathe-deep 3.6s ease-in-out infinite;+}++@keyframes va-breathe {+ 0%, 100% { transform: translateY(0) scale(1, 1); }+ 50% { transform: translateY(-3px) scale(1.015, 0.985); }+}++@keyframes va-breathe-deep {+ 0%, 100% { transform: translateY(0) scale(1, 1); }+ 50% { transform: translateY(-3px) scale(1.02, 0.98); }+}++/* 有事需要你: three dots rise bottom -> top, then the envelope pops; loop. */+.va-needs_input .va-part { animation: 3s ease-out infinite both; }+.va-needs_input .va-dot[data-step='0'] { animation-name: va-needs-d0; }+.va-needs_input .va-dot[data-step='1'] { animation-name: va-needs-d1; }+.va-needs_input .va-dot[data-step='2'] { animation-name: va-needs-d2; }+.va-needs_input .va-envelope {+ transform-origin: 18% 82%;+ animation-name: va-needs-env;+}++@keyframes va-needs-d0 {+ 0% { opacity: 0; transform: scale(.2); }+ 7% { opacity: 1; transform: scale(1.3); }+ 11%, 80% { opacity: 1; transform: none; }+ 90%, 100% { opacity: 0; transform: scale(.6); }+}++@keyframes va-needs-d1 {+ 0%, 11% { opacity: 0; transform: scale(.2); }+ 18% { opacity: 1; transform: scale(1.3); }+ 22%, 80% { opacity: 1; transform: none; }+ 90%, 100% { opacity: 0; transform: scale(.6); }+}++@keyframes va-needs-d2 {+ 0%, 22% { opacity: 0; transform: scale(.2); }+ 29% { opacity: 1; transform: scale(1.3); }+ 33%, 80% { opacity: 1; transform: none; }+ 90%, 100% { opacity: 0; transform: scale(.6); }+}++@keyframes va-needs-env {+ 0%, 35% { opacity: 0; transform: scale(.3) rotate(-14deg); }+ 45% { opacity: 1; transform: scale(1.14) rotate(5deg); }+ 51% { transform: scale(.95) rotate(-3deg); }+ 57% { transform: none; }+ 63% { transform: rotate(-7deg); }+ 67% { transform: rotate(6deg); }+ 71%, 80% { opacity: 1; transform: none; }+ 90%, 100% { opacity: 0; transform: scale(.75); }+}++/* 出了点问题: the sweat drop keeps sliding down. */+.va-blocked .va-drop {+ transform-origin: 50% 0;+ animation: va-drop 1.8s infinite both;+}++@keyframes va-drop {+ 0% { opacity: 0; transform: translateY(-8%) scale(.45); animation-timing-function: ease-out; }+ 20% { opacity: 1; transform: none; }+ 32% { opacity: 1; transform: none; animation-timing-function: cubic-bezier(.5, 0, .9, .6); }+ 80% { opacity: 1; transform: translateY(135%) scale(.94, 1.08); }+ 94%, 100% { opacity: 0; transform: translateY(170%) scale(.8, 1.1); }+}++/* 自己在想 / 团队在干活: trail dots light up bottom -> top, the bubble floats. */+.va-running .va-tdot,+.va-team .va-tdot {+ animation: va-tdot 1.4s ease-in-out infinite both;+ animation-delay: calc(var(--step) * 220ms);+}++.va-running .va-bubble-group,+.va-team .va-bubble-group {+ animation: va-float 2.4s ease-in-out infinite;+}++.va-running .va-glyph {+ transform-origin: 50% 88%;+ animation: va-wobble 1.6s ease-in-out infinite;+}++.va-team .va-tool {+ transform-origin: 50% 50%;+ animation: va-wrench 1.1s ease-in-out infinite;+}++@keyframes va-tdot {+ 0%, 100% { opacity: .35; transform: scale(.8); }+ 30% { opacity: 1; transform: scale(1.18); }+ 60% { opacity: 1; transform: none; }+}++@keyframes va-float {+ 0%, 100% { transform: none; }+ 50% { transform: translateY(-6%); }+}++@keyframes va-wobble {+ 0%, 100% { transform: rotate(-9deg); }+ 50% { transform: rotate(9deg); }+}++@keyframes va-wrench {+ 0%, 100% { transform: rotate(-28deg); }+ 45% { transform: rotate(22deg); }+ 58% { transform: rotate(14deg); }+}++/* 有新汇报: confetti bursts out piece by piece and drifts down; loop. */+.va-ready .va-confetti {+ animation: va-confetti 2.6s ease-out infinite both;+ animation-delay: calc(var(--step) * 70ms);+}++@keyframes va-confetti {+ 0% { opacity: 0; transform: translate(calc(var(--dx) * -170%), calc(var(--dy) * -170%)) scale(.2) rotate(-90deg); }+ 16% { opacity: 1; transform: translate(calc(var(--dx) * 25%), calc(var(--dy) * 25%)) scale(1.2) rotate(12deg); }+ 26% { opacity: 1; transform: none; }+ 70% { opacity: 1; transform: translate(calc(var(--dx) * 45%), calc(var(--dy) * 45% + 40%)) rotate(28deg); }+ 86%, 100% { opacity: 0; transform: translate(calc(var(--dx) * 65%), calc(var(--dy) * 65% + 80%)) scale(.8) rotate(45deg); }+}++/* 睡着了: small z first, then the big Z, both drifting up; loop. */+.va-sleeping .va-z { animation: 3.2s ease-out infinite both; }+.va-sleeping .va-z[data-step='0'] { animation-name: va-z0; }+.va-sleeping .va-z[data-step='1'] { animation-name: va-z1; }++@keyframes va-z0 {+ 0% { opacity: 0; transform: translate(-25%, 35%) scale(.4); }+ 14% { opacity: 1; transform: none; }+ 72% { opacity: 1; transform: translate(10%, -14%); }+ 88%, 100% { opacity: 0; transform: translate(18%, -32%) scale(.9); }+}++@keyframes va-z1 {+ 0%, 26% { opacity: 0; transform: translate(-25%, 35%) scale(.4); }+ 42% { opacity: 1; transform: none; }+ 76% { opacity: 1; transform: translate(8%, -12%); }+ 90%, 100% { opacity: 0; transform: translate(14%, -26%) scale(.9); }+}++/* Inactive pages pause looping body/accessory motion while allowing the+ one-shot pose-change squash to reach its final state. */+.vibey-art[data-active='false'] * {+ animation-play-state: paused !important;+}++/* Still thumbnails and reduced motion show the full static composition. */+.vibey-art.is-still,+.vibey-art.is-still * {+ animation: none !important;+}++@media (prefers-reduced-motion: reduce) {+ .vibey-art,+ .vibey-art * {+ animation: none !important;+ }+}diff --git a/ui/src/pet/vibeyLayers.ts b/ui/src/pet/vibeyLayers.tsnew file mode 100644index 000000000..efcb9c6d2--- /dev/null+++ b/ui/src/pet/vibeyLayers.ts@@ -0,0 +1,98 @@+import messageBody from '@/assets/pet/layers/message-body.png';+import messageDot1 from '@/assets/pet/layers/message-dot1.png';+import messageDot2 from '@/assets/pet/layers/message-dot2.png';+import messageDot3 from '@/assets/pet/layers/message-dot3.png';+import messageEnvelope from '@/assets/pet/layers/message-envelope.png';+import sleepBody from '@/assets/pet/layers/sleep-body.png';+import sleepZ1 from '@/assets/pet/layers/sleep-z1.png';+import sleepZ2 from '@/assets/pet/layers/sleep-z2.png';+import celebrateBody from '@/assets/pet/layers/celebrate-body.png';+import celebrateC01 from '@/assets/pet/layers/celebrate-c01.png';+import celebrateC02 from '@/assets/pet/layers/celebrate-c02.png';+import celebrateC03 from '@/assets/pet/layers/celebrate-c03.png';+import celebrateC04 from '@/assets/pet/layers/celebrate-c04.png';+import celebrateC05 from '@/assets/pet/layers/celebrate-c05.png';+import celebrateC06 from '@/assets/pet/layers/celebrate-c06.png';+import celebrateC07 from '@/assets/pet/layers/celebrate-c07.png';+import celebrateC08 from '@/assets/pet/layers/celebrate-c08.png';+import celebrateC09 from '@/assets/pet/layers/celebrate-c09.png';+import celebrateC10 from '@/assets/pet/layers/celebrate-c10.png';+import celebrateC11 from '@/assets/pet/layers/celebrate-c11.png';+import celebrateC12 from '@/assets/pet/layers/celebrate-c12.png';+import thinkingBody from '@/assets/pet/layers/thinking-body.png';+import thinkingDot1 from '@/assets/pet/layers/thinking-dot1.png';+import thinkingDot2 from '@/assets/pet/layers/thinking-dot2.png';+import thinkingBubble from '@/assets/pet/layers/thinking-bubble.png';+import thinkingQuestion from '@/assets/pet/layers/thinking-question.png';+import errorBody from '@/assets/pet/layers/error-body.png';+import errorDrop from '@/assets/pet/layers/error-drop.png';++export type LayerPart = {+ src: string;+ role: string;+ step: number;+ x: number;+ y: number;+ w: number;+ h: number;+ dx?: number;+ dy?: number;+};++export type LayerSet = {+ body: string;+ parts: LayerPart[];+};++export const GLYPH_COLOR = 'rgb(201,203,227)';++export const LAYERS: Record<'message' | 'sleep' | 'celebrate' | 'thinking' | 'error', LayerSet> = {+ message: {+ body: messageBody,+ parts: [+ { src: messageDot1, role: 'dot', step: 0, x: 141, y: 55, w: 11, h: 8 },+ { src: messageDot2, role: 'dot', step: 1, x: 147, y: 46, w: 8, h: 10 },+ { src: messageDot3, role: 'dot', step: 2, x: 153, y: 42, w: 9, h: 11 },+ { src: messageEnvelope, role: 'envelope', step: 3, x: 151, y: 52, w: 33, h: 33 },+ ],+ },+ sleep: {+ body: sleepBody,+ parts: [+ { src: sleepZ1, role: 'z', step: 0, x: 141, y: 40, w: 10, h: 12 },+ { src: sleepZ2, role: 'z', step: 1, x: 146, y: 20, w: 17, h: 20 },+ ],+ },+ celebrate: {+ body: celebrateBody,+ parts: [+ { src: celebrateC01, role: 'confetti', step: 0, x: 140, y: 28, w: 15, h: 15, dx: 0.631, dy: -0.776 },+ { src: celebrateC02, role: 'confetti', step: 1, x: 154, y: 50, w: 10, h: 9, dx: 0.815, dy: -0.579 },+ { src: celebrateC03, role: 'confetti', step: 2, x: 165, y: 65, w: 10, h: 11, dx: 0.931, dy: -0.366 },+ { src: celebrateC04, role: 'confetti', step: 3, x: 167, y: 88, w: 8, h: 11, dx: 0.996, dy: -0.085 },+ { src: celebrateC05, role: 'confetti', step: 4, x: 165, y: 112, w: 14, h: 14, dx: 0.971, dy: 0.24 },+ { src: celebrateC06, role: 'confetti', step: 5, x: 156, y: 137, w: 11, h: 10, dx: 0.845, dy: 0.534 },+ { src: celebrateC07, role: 'confetti', step: 6, x: 19, y: 124, w: 10, h: 11, dx: -0.923, dy: 0.384 },+ { src: celebrateC08, role: 'confetti', step: 7, x: 16, y: 98, w: 10, h: 10, dx: -0.999, dy: 0.041 },+ { src: celebrateC09, role: 'confetti', step: 8, x: 18, y: 70, w: 13, h: 13, dx: -0.949, dy: -0.316 },+ { src: celebrateC10, role: 'confetti', step: 9, x: 21, y: 50, w: 11, h: 10, dx: -0.836, dy: -0.549 },+ { src: celebrateC11, role: 'confetti', step: 10, x: 35, y: 33, w: 15, h: 15, dx: -0.662, dy: -0.75 },+ { src: celebrateC12, role: 'confetti', step: 11, x: 72, y: 26, w: 9, h: 10, dx: -0.259, dy: -0.966 },+ ],+ },+ thinking: {+ body: thinkingBody,+ parts: [+ { src: thinkingDot1, role: 'tdot', step: 0, x: 142, y: 59, w: 7, h: 9 },+ { src: thinkingDot2, role: 'tdot', step: 1, x: 145, y: 53, w: 10, h: 11 },+ { src: thinkingBubble, role: 'bubble', step: 2, x: 139, y: 20, w: 40, h: 36 },+ { src: thinkingQuestion, role: 'glyph', step: 3, x: 151, y: 28, w: 16, h: 24 },+ ],+ },+ error: {+ body: errorBody,+ parts: [+ { src: errorDrop, role: 'drop', step: 0, x: 132, y: 61, w: 15, h: 21 },+ ],+ },+};