Skip to content

Sonny: the welcome's portrait blinks or glances now and then until you type or scroll - #499

Merged
lydakis merged 1 commit into
mainfrom
claude/project-thread-fnwlsh
Oct 31, 2026
Merged

lydakis merged 1 commit into
mainfrom
claude/project-thread-fnwlsh

Conversation

@lydakis

@lydakis lydakis commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

What

Sonny's portrait in the welcome comes alive a little until the person does anything:

  • About 2.5 s after the welcome appears, Sonny blinks. After that, every 8 to 16 s, the eyes make one gesture, picked at random by weight:
    • a blink (9 of 20)
    • a double blink (3 of 20)
    • a slow blink (2 of 20)
    • a glance at the words (3 of 20)
    • a glance away (2 of 20)
    • a look around (1 of 20)
  • A key, a paste or the scroll wheel stops it for good in that window, since it is only a welcome.
  • Every frame uses the portrait's own greys and blues, so there are no new colours. With NO_COLOR there is no portrait, so nothing moves.

How

  • banner::Eyes decides when and which gesture. The rests and the picks come from a hash of the gesture count, so no RNG dependency is needed.
  • banner::draw_eyes paints the eyes' 6 cells (pixel rows 14 and 15, which are one line of the welcome) over the buffer after screen.render. The rows themselves never change, so nothing is laid out again.
  • The welcome's eye line carries a new Tag::Eyes, and Screen::drawn_at finds where it was drawn, if it is on screen.
  • Each step of a gesture lasts at least 100 ms, so the draw tick never skips one.

Cost

Measured in a PTY with the demo model:

  • No extra frames. Sonny already draws every 100 ms.
  • A blink writes about 1.25 KB, once every 8 to 16 s.

For comparison, an idle Sonny already rewrites its link cells on every tick, about 1.4 KB/s. That is separate from this change.

Checks

  • cargo test -p sonny passes, including new tests for the gesture timing, the weights, and where the eyes are.
  • cargo clippy -p sonny --all-targets is clean.
  • George approved the motion from GIFs recorded in the rig.

…u type or scroll

Every 8 to 16 seconds the eyes make one gesture, picked at random by
weight: mostly a blink, sometimes a double or slow blink, a glance at the
words or away, or a look around. Each is the eyes' six cells drawn over
the portrait, on the draws the client already makes every 100 ms. A key,
a paste or the wheel stops it for good.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGG4uKJySB1SvGZWRR3
@lydakis lydakis self-assigned this Oct 31, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T05:42:48.147219Z 1760fc4 PR opened
🔒 Security Review ✅ Completed 2026-10-31T05:42:57.640183Z 1760fc4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

lydakis commented Oct 31, 2026

Copy link
Copy Markdown
Owner Author

One check failed: runtime, in tests.test_approvals ... test_a_sandboxed_bots_commands_run_together_in_its_sandbox. Its elapsed time was 1.17 s against a fixed wall-clock bound of 1.1 s.

It isn't caused by this PR. The diff only touches sonny/ (the welcome portrait), and this test exercises the daemon's sandbox. rust and macos are green.

I can't re-run jobs from this session. The flake is filed as #502, with a proposed fix that makes the test check that the commands overlap instead of using a fixed number of seconds.


Generated by Claude Code

@lydakis
lydakis merged commit 36274e7 into main Oct 31, 2026
3 of 4 checks passed
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