Skip to content

Nod the panel's leaf at each notice of the user's own key, and count On lists only once read - #5738

Merged
max-sixty merged 8 commits into
mainfrom
on-me-all-done
Nov 9, 2026
Merged

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

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

Follows #5597, after which m over an empty On Me says "Nothing waiting on me" in the panel's field. Those words are in the field's quiet grey, and a second press changed nothing on screen because they already stood. The user compared three gentle answers to the press (the words brightening, the panel tinting, the leaf nodding) in live samples and picked the nod.

The leaf nods for each notice of the user's own key. It tips back and grows a size, then settles, in 320 ms. A repeated notice nods again, and news nobody asked for, such as On Me emptying after a revision, doesn't. Under reduced motion it doesn't play, through the gate all of Leaf's script motion goes through (motion.js).

  • notifications.js gives each notice from the user's own command a beat, its count among them; a background notice has none.
  • floating-panel.js plays the nod with playMotion once for each new beat (nodLeaf), whatever the field shows meanwhile, so a field that leaves the notice's words and returns doesn't nod again. Its duration is --lf-motion-panel-nod on the panel's sheet, beside the panel's other motion.

An On list's tab gives no count until the server's reading is in. The On Me and On <agent> tabs said 0 while the page was loading or offline, claiming an empty list the page never read. They now show no count until then, as the Threads tab already did.

Tests: test_the_leaf_nods_for_each_notice_of_the_users_own_key records the motions the leaf's mark starts. It sees none for the news after a revision empties On Me, one nod for each of two presses of m, and none more when the field shows selected page words and then the notice again. Keyed on the field showing the notice, as a first version was, it counts three nods. test_an_on_list_the_page_cannot_read_counts_nothing refuses the state read and expects no count on either On tab, and fails without the tab change.

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

On me's and On <agent>'s tabs said 0 while the page was still loading or the
server was offline, beside empty text saying the list couldn't be had. They now
give no count until the reading is in, as the Threads tab already did. Each
collection already carries the reading's phase, so no new state is needed.
A notice the user's key gives now carries its ordinal, and the panel marks
itself with the beat's parity while the notice shows (data-lf-beat). A flash
keyed on it plays again for every press, including one that repeats the words
already standing, which today shows no change at all. News nobody asked for
carries no beat. Nothing in the theme reads it yet: the review page compares
three flashes built on it, and the user's pick decides what the theme adds.
# Conflicts:
#	tests/browser/widgets/test_on_panel.py
The panel says a walk key's words in the field's grey, so a second m over
an empty On me changed nothing on screen: the words already stood. The
user picked a nod of the leaf, from words brightening, the panel tinting
and the nod, as the press's feedback. It plays on the beat's parity
(data-lf-beat), so a repeated notice nods again; news nobody asked for
gives no beat and no nod; reduced motion stills it with the rest of
Leaf's motion (state.css).

The new browser test presses m twice over an empty On me after a
revision emptied it, and reads the leaf's animationstart events: none for
the news, then odd and even for the two presses.
leaf-agent
leaf-agent previously approved these changes Nov 9, 2026
…ibute

The nod was keyed on data-lf-beat, written only while the field said the
notice, so a field that left the notice's words (a selection, the caret)
and came back within its 4 s nodded again with no key pressed. The panel
now plays the nod with playMotion when a new beat arrives, which plays it
once per beat by construction. That removes the attribute, the two
same-motion keyframes the parity needed and their unsalted global names,
and the motion gate stills it under reduced motion.

The test records the leaf's animate calls, and adds the case the review
found: selecting page words and letting them go leaves two nods for two
presses (it gives three with the nod keyed on the field's reading).
@max-sixty
max-sixty merged commit 9e01d38 into main Nov 9, 2026
5 checks passed
@max-sixty
max-sixty deleted the on-me-all-done branch November 9, 2026 09:17
max-sixty added a commit that referenced this pull request Nov 10, 2026
…he agent's news, pickup and away (#5771)

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_
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