Skip to content

Give the panel's leaf a gesture at each moment: walk, error, On Me, the agent's news, pickup and away - #5771

Merged
max-sixty merged 5 commits into
mainfrom
on-me-all-done
Nov 10, 2026
Merged

max-sixty merged 5 commits into
mainfrom
on-me-all-done

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Follows #5738, which made the panel's leaf nod at each notice of the user's own key. The user liked the nod and asked to use the leaf's motion for personality. They then picked a gesture for each of Leaf's other moments from a playground that showed each one live:

Moment Gesture Comes from
A notice of the user's own command nod (from #5738) notifications.js showNotice
A walk step (m, t, h, n, and every other walk) nod walk-position.js, on lf-walk
An error about no field, which the panel says shake errors.js raise
On Me empties twirl semantic-news.js newsMoment
Something new on On Me beckon semantic-news.js newsMoment
The agent's new words sway semantic-news.js newsMoment
A new version sway version.js
The tone turns to working perk page-status.js
The agent is away droop, a held pose floating-panel.css, on data-lf-tone="away"
While the agent works none

One channel, one table. Each producer calls gesture(moment) in notifications.js, which counts the moments. paintNow plays the motion GESTURES names for the newest one, once (floating-panel.js, MOTIONS, through playMotion), and a newer gesture cancels one still playing. News gestures once per reading, as it arrives with the badge and dots, choosing its most pressing moment (On Me emptying, else something new on it, else the agent's words). The notice's beat from #5738 goes, since the gesture count replaces it. Each motion's length is a --lf-motion-leaf-* property on the panel's sheet. The droop is set in rotate and scale, which the gestures' transform plays over. Under reduced motion no gesture plays and the pose stands without moving into place.

Still evolving. browser/AGENTS.md ("Motion is brief and keeps the user oriented") now says the leaf has a personality the user is still evolving, so a change that adds a moment the user notices asks whether the leaf answers it. The MOTIONS comment says why every gesture moves the whole mark (the panel draws it as icon.svg masking a square) and what giving it parts, such as a blade flexing on its stem, would take: icon.svg drawn as named shapes rather than one path, and the panel drawing the mark from them.

Fixes from a fresh review, in the second commit: the leaf perked again when the page reconnected to work already in progress, because a failed read's blocked tone was counted (page-status.js now skips it, and counts a pickup only from a tone a reading gave, in the third commit). News timed to its notice could twirl twice or twirl over "New On Me". A newer gesture let an older one snap back when it ended.

Tests:

  • A runtime test checks which moment a reading's news gives and that notices and errors give theirs.
  • test_the_leaf_answers_each_moment_with_its_gesture reads the leaf's motions through m, m again over the one item, the answer that empties On Me, and m over the empty list.
  • test_the_leaf_perks_as_the_agent_takes_up_work_not_as_the_page_reconnects counts two perks under the old rule.

Calls for the reviewer (left as built):

  • Every walk nods, including the arrow keys through a panel list or a chart's points, as the user's chosen signal (beginWalk) does.
  • The shake plays when the error is raised, also when the folded panel or a draft keeps the field from saying it.

This was written by Claude Code on behalf of max-sixty

After the nod at the user's own key, the user picked a gesture for each
other moment from a playground of them: a nod at each walk step, a shake
at an error the panel says, a twirl when On Me empties, a perk when the
agent takes up work, a sway at a new version or the agent's new words, a
beckon at something new on On Me, and a drooped pose while the agent is
away, with the leaf still while the agent works.

Every moment passes through notifications.js (`gesture`), each with its
own beat, so the panel plays once per moment from one table
(floating-panel.js, `GESTURES`, `MOTIONS`), its lengths on the panel's
sheet (`--lf-motion-leaf-*`). Shown news gives its moment when it shows,
once, not again after a command it waited behind; producers name it
(`moment`, semantic-news.js `newsMoment`). The walk, error and pickup
moments come from walk-position.js, errors.js and page-status.js. The
droop is a pose in the transform's own parts, which the gestures play
over, and reduced motion stills every gesture and the pose's travel.

The notice's `beat` goes: the gesture's replaces it.
…takes up

From a fresh review of the leaf's gestures:

- The leaf perked again when the page reconnected to work in progress: a
  failed read shows the blocked tone, and the next reading's working
  looked like a pickup. page-status.js now passes over a failed read's
  tone. A new browser test cuts the page's reads off mid-work and
  restores them; it counts two perks with the old rule.
- News gestured when its notice showed, which needed a moment on each
  queued notice and a WeakSet to keep a returning one still, and still
  played the twirl twice when queued news combined, or over "New On Me".
  News now gestures once per reading as it arrives, with the badge and
  dots (semantic-news.js newsMoment: On Me emptying, else something new
  on it, else the agent's words), and version.js beside its own notice.
  The moment plumbing in the notice queue goes.
- A gesture now cancels one still playing, which otherwise reappeared
  where it stood once the newer one ended.
- The droop no longer sets translate, which the panel's box motion also
  writes inline.
leaf-agent
leaf-agent previously approved these changes Nov 9, 2026
…would take

browser/AGENTS.md now says the panel's leaf has a personality the user is still
evolving, so a change adding a moment the user notices asks whether the leaf answers
it. The MOTIONS comment says why each gesture moves the whole mark (the panel draws
it as icon.svg masking a square) and what a mark in parts would take.
@max-sixty
max-sixty merged commit dc30fde into main Nov 10, 2026
5 checks passed
@max-sixty
max-sixty deleted the on-me-all-done branch November 10, 2026 18:07
leaf-agent added a commit that referenced this pull request Nov 11, 2026
…away_rather_than_vanishing (#5828)

#5771 made the panel's leaf twirl when On Me empties (its gesture table:
"On Me empties → twirl"). Accepting the only suggestion on
`SHORT_SUGGESTION` empties On Me, so the press now plays two motions
that `HOLD_MOTION` holds: the slot's 220 ms fold on `lf-old` and the
leaf's 420 ms twirl on its `svg`. The test treated every held motion as
the fold, so its first check failed in both engines on every push run on
main since `e74d07dd5`. The twirl is what #5771 intended, so this
changes the test, not the runtime. The test now selects the held motions
whose target is inside `#sug` and runs every later fold check against
that list. Nothing it asserts about the fold changed: where the fold
starts, its midpoint, its filled endpoint, the room given back, and undo
during a second fold.

The issue reported that once the list was filtered, the fold's midpoint
still left `lf-old` at full height. That doesn't happen here. With the
leaf's gesture held at the same time, setting the fold to half its
duration takes `lf-old` from 31.19px to 6.14px in Chromium. The test as
changed passes three runs out of three in Chromium and Firefox
(Playwright 1.65) and fails on main with the original `['lf-old', 'svg']
== ['lf-old']` assertion.

Closes #5825 — automated triage

Co-authored-by: leaf-agent <[email protected]>
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