Skip to content

feat: step buddy per refresh, with configurable step rate - #15

Merged
jpboliv merged 3 commits into
mainfrom
fix/buddy-frame-per-refresh
Jul 10, 2026
Merged

feat: step buddy per refresh, with configurable step rate#15
jpboliv merged 3 commits into
mainfrom
fix/buddy-frame-per-refresh

Conversation

@jpboliv

@jpboliv jpboliv commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Problem

Rocky looked frozen. Animation poses were keyed to wall-clock ticks (0.5–2s), but Claude Code only re-runs the statusline every ~8–11s during activity (measured by instrumenting the wrapper). Sub-2s ticks sampled every ~10s = coin-flip pose changes at best, fully frozen when idle. The fast moods (reacting 600ms, celebrating 500ms) played entire cycles between refreshes — invisible.

Fix

  • buddy.frame counter in state; statusline.js bumps it once per invocation (skipped when mode is off), merged into the same update() as the milestone stamp.
  • renderBuddy keys arm poses, gait, and dance beats off the frame counter — every host refresh now visibly changes the pose. Mood windows and quip rotation stay wall-clock.
  • armsTick/fastGait/tick config removed — per-mood speed differences were meaningless at ~10s sampling.
  • readState() prunes the retired buddyStyle key (left behind by a97d039); next write self-cleans old state files.
  • README cadence note updated.

Step rate setting (new)

Per-refresh stepping can look frantic during fast refresh bursts, so "how often Rocky steps" is now configurable:

  • buddy.stepSeconds in state throttles the frame bump: advance at most once per that many seconds, stamped in buddy.lastStepAt. 0/absent/invalid = every refresh (default, unchanged behavior).
  • New /eridian:buddy <seconds> command (scripts/buddy-speed.js + commands/buddy.md, mirrors mode.js): set, 0 to reset, no arg prints current, rejects garbage/negatives.
  • Rocky can only slow relative to host cadence, never speed up — the statusline can't run itself.

Verification

  • TDD: throttle + command tests watched failing first, then green — 126/126 pass, lint + prettier clean.
  • End-to-end: real statusline wrapper run 3× back-to-back — pose flips on every consecutive invocation; with /eridian:buddy 2, three rapid refreshes hold the frame and a refresh after 2.1s advances it; reset restores per-refresh stepping.

🤖 Generated with Claude Code

wall-clock ticks fell between host refreshes, never seen. frame counter now. also prunes retired buddyStyle key.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jpboliv
jpboliv requested a review from pjpires July 10, 2026 10:28
jpboliv and others added 2 commits July 10, 2026 15:58
wall-clock gate around the per-refresh frame bump: advance at most once
per stepSeconds, stamped in buddy.lastStepAt. 0/absent/invalid = every
refresh (unchanged default).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
/eridian:buddy 2 = at most one pose step per 2s; 0 restores per-refresh
default; no arg prints current. Setting lives in buddy.stepSeconds.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jpboliv jpboliv changed the title fix: step buddy one frame per statusline refresh feat: step buddy per refresh, with configurable step rate Jul 10, 2026
@jpboliv
jpboliv merged commit baa98c8 into main Jul 10, 2026
1 check passed
@jpboliv
jpboliv deleted the fix/buddy-frame-per-refresh branch July 10, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant