Skip to content

feat(anim): add waiting animation - #114

Open
victorRadu wants to merge 2 commits into
jamro:mainfrom
victorRadu:feat/anim-waiting
Open

victorRadu wants to merge 2 commits into
jamro:mainfrom
victorRadu:feat/anim-waiting

Conversation

@victorRadu

@victorRadu victorRadu commented Nov 18, 2026 •

Copy link
Copy Markdown

The repo has a template. I filled it in with what we actually did:

What

New continuous animation waiting: the robot waits impatiently.

  • The torso turns to the robot's left (body +0.8). The right hand parks.
  • The left hand taps the desk in groups of three, at random intervals (2.5–8 s).
  • Every 3–7 s the head eases (1.4–2.3 s) to one of four wide corners, never the same one twice: down at the tapping hand (most often), up-left, up-right, down-right.
  • Classic eyes glance to the same corner about 180 ms before the head gets there, a little wider looking up and a little lower looking down. Kaomoji shows Idle. Kawaii shows the calm smile, and its pupils follow the corners.
  • White LED, no sound. continuous_timeout turns it into attention, as for the other continuous animations.

Claude Code hooks: Notification with notification_type: "idle_prompt" (Claude finished about 60 s ago and the user has not typed) now plays waiting. All other notification types keep attention. So an idle session goes bell → silent waiting → after continuous_timeout, the attention voice.

Also: waiting added to the web UI (Animations and API pages), docs/api.md, the CLI name lists for /anim and /play, the /play 400 text, and the tiny-engineer-play skill.

Checks

  • Title is type(scope): summary
  • Breaking HTTP / pins / NVS / servo defaults / hook CLI called out — N/A, nothing breaking (/anim and /play accept one more name)
  • Firmware: pio run and pio test -e native (146/146)
  • Packages: npm test for tiny-engineer-cli (263/263) and tiny-engineer-claude-code (13/13)
  • HTTP: ui/src/views/ApiReference.tsx + docs/api.md (route list unchanged)
  • Settings: N/A
  • CAD: N/A
  • Pins: N/A
  • Servo ranges not widened (poses stay inside the saved -1..1 range)
  • Hardware tested: robot (tuned on a home-built robot with an ESP32-C3 SuperMini, SG90 servos)
  • No .env, tokens, or Wi-Fi passwords in logs or screenshots

Summary by CodeRabbit

  • New Features
    • Added a continuous “Waiting” animation, featuring a left-handed tapping gesture and shifting gaze.
    • Idle-prompt notifications now trigger the Waiting animation; other notifications continue to use Attention.
    • Waiting is available through animation controls and documented API, CLI, and play interfaces.
    • The animation uses white lighting and is included in continuous-animation timeout guidance.
  • Documentation
    • Updated animation descriptions and behavior details across the API reference and hardware documentation.

Victor Radu and others added 2 commits November 18, 2026 00:26
Continuous. The torso turns to the robot's left, the left hand taps the
desk in groups of three at random times, and the head drifts slowly
between four wide corners. Classic eyes lead the head to each corner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Map the Notification hook with notification_type idle_prompt (Claude
finished about a minute ago and the user has not typed) to the new
waiting animation. Other notification types keep attention. Add waiting
to the CLI name lists for /anim and /play.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request adds a continuous waiting animation with coordinated body, hand, head, neck, and eye movement. It registers the animation in the runtime, exposes it through control interfaces, and maps Claude Code idle-prompt notifications to it.

Changes: Waiting animation

Layer / File(s) Summary
Animation state machine
src/animation.h, src/animation/waiting.*, docs/api.md
The new continuous animation turns the body left, moves the head and neck between gaze corners, and taps the left hand in groups of three. The animation exposes gaze coordinates and a timestamp. The API documentation describes its behavior and continuous-timeout coverage.
Waiting eyes and runtime registration
src/display/eyes.*, src/display/eyes/modes/waiting.*, src/display/eyes/styles/*, src/animation/registry.cpp, src/hardware/rgb.cpp, docs/api.md, docs/hardware/*, docs/hooks.md
The registry connects the waiting animation and eye handlers. The eyes follow the animation’s gaze updates. The eye styles map waiting to idle and content expressions, and the RGB mapping assigns it white. The hardware documentation includes waiting in the white-animation list; the hooks documentation adds talking to that list.
Animation controls and accepted names
src/http/play_handlers.cpp, src/serial/play.cpp, packages/tiny-engineer-cli/src/robot/client.js, packages/tiny-engineer-cli/test/client.test.js, ui/src/..., skills/tiny-engineer-play/*, docs/api.md, docs/integration.md
The HTTP and serial play interfaces, CLI client, and UI include waiting among available animations. Tests check the CLI animation lists. The API and play-skill documentation describe accepted names and play behavior. The integration documentation adds waiting to the REST API pose table.
Claude Code idle-prompt mapping
packages/tiny-engineer-claude-code/*, packages/tiny-engineer-cli/src/integrations/claude-code/map.js, packages/tiny-engineer-cli/test/map-claude-code.test.js
Both Claude Code integrations map Notification events with notification_type set to idle_prompt to waiting. Other notification types map to attention. The tests cover these cases, and the CLI help documents the mapping.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Possibly related PRs

Suggested reviewers: jamro, mechazawa, jtruland

Merge Risk: Minimal · up to f73b4

This adds a continuous waiting animation and maps Claude Code idle-prompt notifications to it. No actionable merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat(anim): add waiting animation" names the main change. The changeset adds a new continuous waiting animation (firmware, API, CLI, UI, docs) and maps Claude Code idle-prompt notificatio…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat(anim): add waiting animation" names the main change. The changeset adds a new continuous waiting animation (firmware, API, CLI, UI, docs) and maps Claude Code idle-prompt notifications to it. The title is specific, concise, and follows a conventional commit style.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 50c3ca21-4d8c-48c3-8cf9-bff3a445e9ce
Commits

Reviewing files that changed from the base of the PR and between baf5d04 and f73b4f9.

Files selected for processing: 29

  • docs/api.md
  • docs/hardware/components.md
  • docs/hardware/testing.md
  • docs/hooks.md
  • docs/integration.md
  • packages/tiny-engineer-claude-code/src/cli.js
  • packages/tiny-engineer-claude-code/src/map.js
  • packages/tiny-engineer-claude-code/test/map.test.js
  • packages/tiny-engineer-cli/src/integrations/claude-code/map.js
  • packages/tiny-engineer-cli/src/robot/client.js
  • packages/tiny-engineer-cli/test/client.test.js
  • packages/tiny-engineer-cli/test/map-claude-code.test.js
  • skills/tiny-engineer-play/SKILL.md
  • skills/tiny-engineer-play/scripts/play
  • src/animation.h
  • src/animation/registry.cpp
  • src/animation/waiting.cpp
  • src/animation/waiting.h
  • src/display/eyes.h
  • src/display/eyes/modes/waiting.cpp
  • src/display/eyes/modes/waiting.h
  • src/display/eyes/styles/kaomoji.cpp
  • src/display/eyes/styles/kawaii.cpp
  • src/hardware/rgb.cpp
  • src/http/play_handlers.cpp
  • src/serial/play.cpp
  • ui/src/config/ConfigForm.tsx
  • ui/src/lib/animations.ts
  • ui/src/views/ApiReference.tsx

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

This branch has not been deployed

No deployments
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