Skip to content

Waldo: an animated robot buddy for every status surface - #66

Open
Jepson2k wants to merge 3 commits into
mainfrom
claude/loving-hopper-bfttm1
Open

Jepson2k wants to merge 3 commits into
mainfrom
claude/loving-hopper-bfttm1

Conversation

@Jepson2k

Copy link
Copy Markdown
Owner

What

The connection chip's static robot face becomes Waldo, a small animated character that reflects the robot's state everywhere the app shows status.

It's one reusable NiceGUI element, RobotBuddy (components/robot_buddy.vue + .py), replacing the three face SVGs and the global robot-faces.js. Multiple instances can live on a page, each with its own timers and cleanup.

Moods

  • happy (connected), neutral (simulator), sad (disconnected)
  • alarmed (E-STOP: wide eyes, flashing antennae)
  • booting (scanning visor)

Changes between moods animate: it hops when it connects, slumps when it disconnects, and shows relief when an E-STOP clears.

Chip behaviour

  • Busy: focuses on the arm (lowered lids, eyes on the scene, antenna LEDs chasing) while a program runs or the arm moves.
  • Programs: celebrates a clean exit, winces at a crash.
  • Warnings: startled by new warnings/errors and by collision stops.
  • Limits and homing: shrugs when a jog hits a joint limit; nods when a calibration homing completes.
  • Standing lights: the left bulb turns red while the motion recorder runs; both bulbs glow warm while an MCP agent holds the control lease. The tooltip names either.
  • Greeting: waves hello once the page loads.
  • Interaction: follows the pointer when it's near; giggles when clicked, and gets dizzy (X eyes) after a flurry of clicks.
  • Sleep: dozes off after 3 idle minutes, simulator only. On a live or lost hardware connection a sleeping robot would read as "offline".
  • Calm robot (new Settings switch): no idle fidgets, breathing, pointer-following or sleep. Event reactions still play. Honours prefers-reduced-motion too.

Other appearances

  • E-STOP dialog: a large alarmed Waldo, red for the hardware button and amber for the software stop. This replaces the Lottie animation, which loaded from unpkg@latest / lottie.host and so broke offline.
  • Loading overlay: booting Waldo replaces the spinner, and turns sad if the controller never answers.
  • Takeover overlay: the moping Waldo bounces off the real card rect.
  • Welcome dialog: Waldo waves.
  • Quick Start "Connecting Your Robot": the legend shows the three chip moods. The docs legend (docs/index.md) uses matching SVGs.

Fixes found along the way

  • Settings panel clipping: the scroll content grew to its widest description, so every right-aligned control (Theme, Translation RF, …) was cut off. It's now pinned to the panel width.
  • Path preview and sys.exit(): a program calling sys.exit() made SystemExit escape the preview. The preview now stops where the real run would. Regression test included; it fails without the fix.
  • Warnings log on reload: a reloaded page now renders the existing warnings log history instead of an empty log.

Tests

  • tests/test_robot_buddy.py (user fixture, real paths): E-STOP and motion; program outcomes and warnings; limit shrug and homing nod; REC and agent lights (real MCP take_control); simulator-only sleep and the Calm setting. Each was checked to fail with its wiring removed.
  • tests/test_robot_buddy_screen.py (browser): greeting, pointer tracking, click→giggle→dizzy, E-STOP visuals.
  • tests/test_simulation_services.py: the SystemExit regression.

Locally, the affected suites pass (124 tests).

CI note

main has been red since #47 (ImportError: cannot import name 'TickIndex'): it pins waldoctl v0.12.0, and no tagged parol6 pairs with the waldoctl it now needs. Expect the same failures here until new waldoctl/parol6 releases land; nothing in this PR touches that. On a local run with waldoctl v0.13.1 + parol6 v0.7.0, the only failures were test_collision_viz* / test_mcp_world, which fail identically on main.

🤖 Generated with Claude Code

https://claude.ai/code/session_018LkTtn7owaEfndzBhZ3jbE


Generated by Claude Code

The connection chip's robot face grows into a character. It is now one
NiceGUI element (RobotBuddy, a Vue SFC) instead of three static SVGs
driven by a global script, so any number can live on a page, each with
its own timers and cleanup.

Moods: happy (connected), neutral (simulator), sad (disconnected), plus
alarmed (E-STOP: wide eyes, flashing antenna LEDs, shake) and booting
(scanning visor). Moving between moods animates: a hop into happy, a
slump into sad, relief when an E-STOP clears.

While idle it blinks with real eyelids, glances around, hums, gets
suspicious, sighs; follows the pointer when it comes near; blushes when
hovered; giggles when poked and gets dizzy from a flurry of pokes; and
dozes off (Zzz) after three minutes without input, waking on activity.

The chip buddy now reacts to what the robot does:
- focuses on the arm (lowered lids, eyes on the scene, LEDs chasing)
  while a program runs or the arm moves
- celebrates a program that exits cleanly, winces at one that crashes
- is startled by new warnings/errors and by a collision stop
- turns alarmed while an E-STOP is latched
- waves hello once the page has loaded

New appearances:
- the E-STOP dialog: a big alarmed buddy (red for the hardware button,
  amber for the software stop) replaces the Lottie animation, which was
  fetched from unpkg@latest and lottie.host and so broke offline
- the loading overlay: a booting buddy replaces the spinner, and turns
  sad when no controller answers
- the takeover overlay: the moping buddy now bounces off the real card
  rect and goes "bonk" at each wall
- the welcome dialog waves hello, and Quick Start's connection legend
  shows the three chip moods instead of coloured squares

Respects prefers-reduced-motion.

Starting a new page build also resets the warnings log's version, so a
reloaded page renders the existing history instead of an empty log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018LkTtn7owaEfndzBhZ3jbE
Both read as anime rather than as this robot. Celebrating now squints
happily instead of starring, and nothing blushes: the greeting, the
giggle, the happy idle and hovering all keep their other beats.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018LkTtn7owaEfndzBhZ3jbE
The robot buddy — now named Waldo in the docs and help — loses the rest of
its manga shorthand: no pupil glints, sweat drops, tears, sparkles, music
note or cat mouth, and a flurry of pokes gets plain X eyes instead of
spirals. The E-STOP alarm stays serious.

It also behaves better as a status light:
- only the simulator buddy dozes off; on a live or lost hardware
  connection a sleeping robot would read as "offline"
- a Calm robot switch in Settings stills the idle fidgets, breathing,
  pointer-following and sleep everywhere Waldo appears; reactions to the
  robot still play
- the left antenna bulb turns red while the motion recorder runs, and
  both glow warm while an AI agent holds the control lease; the chip
  tooltip names either
- it shrugs when a jog runs a joint into its limit and nods when a
  calibration homing completes

The docs legend shows the three chip moods as SVGs instead of coloured
squares.

Two fixes found along the way:
- the settings scroll content grew to its widest description, clipping
  every right-aligned control (the Theme and frame selectors included);
  it is now pinned to the panel width so descriptions truncate
- the path preview let a program's sys.exit() escape as SystemExit; the
  preview now stops where the real run would, keeping what it planned

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018LkTtn7owaEfndzBhZ3jbE

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.

2 participants