Cody’s floating pet is the heart of the desktop experience — a pixel-art character that lives in the corner of your screen, reacts to your workload, and gives you one-click access to the full assistant panel. The pet window is always visible, never intrudes on your workflows, and communicates task urgency through expressive mood states and speech bubbles, so you stay aware of what needs attention without switching context.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/miu-ll/Cody-assistant/llms.txt
Use this file to discover all available pages before exploring further.
Window Architecture
The pet lives in a dedicated ElectronBrowserWindow that is completely separate from the main assistant panel. This separation means you can minimize or close the assistant panel without terminating the process — the pet remains running and continues to fire reminders and monitor tasks in the background.
Key window properties set in electron/main/index.ts:
The pet window uses pixel-art sprites stored in
src/assets/pets/. Each variant has its own Idle and Walk sprite sheets, with different frame counts and timing. Sprite sheets are standard horizontal strips; the CSS animation steps through frames using background-position.Staying Always on Top
alwaysOnTop: true alone is not enough to survive every focus change on Windows (for example, when a game or full-screen application temporarily claims the foreground). Cody uses two reinforcement mechanisms:
- Event hooks —
petWindow.on('blur', ensurePetAlwaysOnTop),on('show', ...), andon('restore', ...)all callensurePetAlwaysOnTop()immediately. - Periodic timer — A
setIntervalfires every 2 500 ms and callsensurePetAlwaysOnTop()pluspetWindow.moveTop()whenever the pet is visible and not being dragged.
ensurePetAlwaysOnTop sets the level to 'screen-saver' and enables visibleOnAllWorkspaces so the pet appears on every virtual desktop and even above full-screen windows when possible.
Pet Variants
You can choose your companion from Settings → Pet. Each variant ships with its own sprite sheet and applies a matching visual theme — palette, accent colours, brand icon, and greeting illustration — to the assistant panel.Bunny 🐰
2-frame idle, 4-frame walk. 64 × 64 px sprites at 3× scale.
Froggo 🐸
4-frame idle strip, 2-frame land. 64 × 64 px at 3× scale.
Panda 🐼
4-frame idle, 4-frame walk. 64 × 64 px at 3× scale.
Cow 🐄
6-frame idle, 6-frame walk. 64 × 64 px at 3× scale.
Cat 🐱
10-frame idle sheet. 32 × 32 px at 4× scale.
Dog 🐶
5-frame idle, 5-frame walk. 25 × 20 px at 5× scale.
PetVariant type captures all options:
Greeting Scene
The assistant panel’s greeting illustration changes based on the current time of day:| Time window | Scene |
|---|---|
| Morning | Bright sun, warm sky |
| Afternoon / Evening | Warm sunset with golden tones |
| Night | Dark sky with moon and stars |
Dragging and Clicking
The pet supports two gestures distinguished by pointer movement:Click (no drag)
Press and release without moving the pointer more than 5 px.
endPetDrag() returns false (moved = false) and Cody calls openAssistant() to show the panel.- Open Cody — shows the assistant panel
- Focus Mode 25 min / 50 min — starts a timed focus session
- Do Not Disturb 60 min — starts a DND session
- Disable Focus Mode (shown instead when Focus is active)
- Quit — fully exits the application
Mood System
The pet expresses four moods driven by pending and urgent task counts. The assistant panel callswindow.desktop.petUpdate(payload) after any task state change; the main process forwards the payload to the pet window via IPC.
Mood Trigger Conditions
| Mood | Trigger | CSS class | Speech bubble |
|---|---|---|---|
calm | No urgent tasks, nothing overdue | mood-calm | (silent) |
alert | One or more urgent priority tasks | mood-alert | ”¡Ojo! N urgent(s) pending” |
worried | One or more overdue tasks | mood-worried | ”There are overdue tasks 😟“ |
happy | Just cleared all pending tasks (transition from non-null mood) | mood-happy | ”All up to date! 🎉“ |
Celebration
When you mark a task as done, the assistant sends{ type: 'celebrate' }. The pet plays a celebration animation for 1 600 ms and shows the bubble “+1! Well done 🥕” for 3 500 ms.
Speech Bubbles
Speech bubbles appear above the pet sprite for time-sensitive desktop notifications. They are displayed directly in the transparent pet window — no system notification required — so they appear exactly over the pet regardless of where it is positioned. Bubbles auto-dismiss after a configurable timeout (default 5 000 ms). Mood transitions trigger bubbles automatically; the pet also shows bubbles for reminders that arrive while the assistant panel is closed.Keyboard Accessibility
The pet element carriesrole="button" and tabIndex={0}. Pressing Enter or Space while the pet has keyboard focus opens the assistant panel, matching the short-click behaviour.
Global Shortcuts
| Shortcut | Action |
|---|---|
Win+Shift+C | Toggle between pet and assistant panel |
Win+Shift+F | Toggle Focus Mode (starts 25-min session if inactive) |