Repository navigation
Nod the panel's leaf at each notice of the user's own key, and count On lists only once read - #5738
Merged
Merged
Conversation
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
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).
leaf-agent
approved these changes
Nov 9, 2026
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_
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows #5597, after which
mover 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.jsgives each notice from the user's own command abeat, its count among them; a background notice has none.floating-panel.jsplays the nod withplayMotiononce 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-nodon 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_keyrecords 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 ofm, 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_nothingrefuses the state read and expects no count on either On tab, and fails without the tab change.