orca icon indicating copy to clipboard operation
orca copied to clipboard

[Bug]: Imported .codex-pet bundles ignore Codex's per-frame durations and play every row at 8 fps

Open nasagong opened this issue 4 months ago • 2 comments

Operating system

macOS

Orca version

v1.4.141

Details

Summary

Imported .codex-pet bundles play every animation at a uniform 8 fps, so the idle loop that should take 6.6 s in Codex cycles in 0.75 s. The pet flips through its poses ~9x too fast regardless of agent state.

Root cause

Orca's codex-pet defaults mirror Codex's animation rows but flatten the pacing into a single sheet-wide fps. applyCodexPetDefaults (src/main/ipc/pet-bundle.ts) bakes CODEX_PET_DEFAULT_FPS = 8 with only row/frame counts, and SpriteFrame (src/renderer/src/components/pet/PetOverlay.tsx) plays each row as steps(frames) at that rate.

Codex instead paces frames unevenly — codex-rs/tui/src/pets/model.rs holds idle at [1680, 660, 660, 840, 840, 1920] ms (6.6 s cycle) and runs app-state rows at 120–150 ms/frame with a longer final hold.

Reproduce

  1. Settings → Experimental → Pet
  2. Status bar pet menu → "Import .codex-pet bundle…" → pick any Codex-generated bundle (e.g. ~/.codex/pets/<name>/)
  3. Compare the idle animation with the same pet in the Codex App

Expected

Idle rests ~1.7 s / ~1.9 s on its bookend frames (6.6 s cycle), and app-state rows pace at 120–150 ms/frame with a longer final hold, matching Codex.

Screen recording

Image

Note

The overlay also lacks the Codex mascot's pointer interactions (hover → jumping, grab holds the pose, horizontal drag runs). I have a fix ready for both and will open a PR referencing this issue.

nasagong avatar Jul 14 '26 11:07 nasagong

🤖 Agent handoff — reproduction kit

Status: REPRODUCED · GitHub label has_repro
Writeup (branch): docs/bug-reproductions/8729.md
Branch with tests + docs: nwparker/bug-repro-handoffs

Summary

Imported Codex pet bundles play every animation at sheet-wide 8 fps. The idle loop that should take ~6.6 s in Codex cycles in 0.75 s (~9× too fast).

Automated re-run

git fetch origin nwparker/bug-repro-handoffs
git checkout nwparker/bug-repro-handoffs
# or: git worktree add /tmp/orca-repro-8729 origin/nwparker/bug-repro-handoffs

pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/repro-8729-codex-pet-fps.test.ts

Code / evidence files

How another agent should use this

  1. Check out nwparker/bug-repro-handoffs (or cherry-pick the repro-* test for this issue).
  2. Run the command(s) above — green documents the bug (or cannot_repro proves current tree does not show it).
  3. Implement the fix on a new branch from main; keep/adapt the repro test as a regression test that should flip behavior or stay as a guard.
  4. Open a PR with: Description, Evidence, ELI5, User-regression-tradeoffs.

Posted by bug-repro orchestration so work is not trapped in a local worktree only.

nwparker avatar Jul 16 '26 18:07 nwparker

FYI, #8730 already implements this fix

nasagong avatar Jul 17 '26 02:07 nasagong