Skip to content

Say so when a page walk has nothing to step through, and when On me empties - #5597

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

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

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

Follows #5594, which made m over an empty On me list say "Nothing waiting on me" in the panel. This extends the same behavior to the other page walks, and has the panel say it unasked when On me empties.

Page walks over an empty list say so. t says "No open threads", h "No changes marked" and n "No search to repeat", where each used to do nothing. The rule is stated once in browser/runtime/keyboard/AGENTS.md, "Page grammar". Their when gates go, along with change-walk's watcher that repainted the keys as a comparison's marks came and went, so the command reference lists these walks on every page.

Emptiness is claimed only once the list is known. While the server is offline, t and m say their list can't be had, as the Threads view already did. The On me and On views now say that too, or that they're loading, where before the first reading they said "Nothing waiting on …" (queues.js, emptyOnList). h isn't taken while a comparison that v started is still loading, rather than saying nothing is marked.

A reading that empties On me is news. semantic-news.js counts On me the way the badge does. When a reading after the first takes it from some to none, the panel says "Nothing waiting on me" with no press. That happens whatever emptied the list: the user's last answer, another tab, or a revision that removed the last obligation. Like other news, it waits behind the user's own command's words, and it's dropped if the list fills again before it shows.

Known gaps:

  • Holding an empty walk key repeats its notice on every auto-repeat.
  • A news notice already on screen isn't rechecked, so "Nothing waiting on me" can stand for up to 4 s after a new obligation arrives, before "New on me" follows.

Tests: a new key-scopes test presses each walk on a page with nothing to walk, and another presses t and m with the state read refused. The On me panel test now expects the words after the answer with no press, and test_a_key_on_screen_is_a_key_that_works now expects the thread walk to run and say so with no threads, where it asserted the old gate. A runtime test covers the news, including that it's dropped when the list refills.

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

Once every On me item was answered, `m` and Shift+`m` were unavailable and
the press did nothing, so the user couldn't tell a finished list from a key
that missed. The press now shows "Nothing waiting on me" in the panel's
seat for passing words, the On me view's own empty wording, and the live
region hears it. The user asked for words only for now, rather than a
flash of the panel's colour.

The walk's `when` gated it on a non-empty list, a reading the bottom key
line once showed and that now reaches only the command reference and
aria-keyshortcuts. Dropping it makes the walk live on every page, as On me
is, and takes away the watcher that repainted the keys as the list emptied
or filled, with its Node test (tests/runtime/queue-walk.test.mjs), which
protected only that repaint.
…mpties

Every page walk's letter is now live on every page. Over an empty list a press
says so in the panel's seat instead of doing nothing: `t` "No open threads",
`h` "No changes marked", `n` "No search to repeat", as `m` already says
"Nothing waiting on me". The rule is stated once in keyboard/AGENTS.md, "Page
grammar". The `when` gates on thread.walk, change.walk and page.search.repeat
go, with change-walk's watcher that repainted the keys as a comparison's marks
came and went, so the command reference now lists these walks on every page.
`n` over a search the page no longer contains says so in the panel too, rather
than in the live region alone.

An empty list is claimed only once it is known. While the server is offline,
`t` says "Current threads are unavailable while the server is offline", as
the Threads view does, and `m` "On me is unavailable while the server is
offline". The On me and On <agent> views say the same, or that they are
loading, where they said "Nothing waiting on …" before the reading came
(queues.js, `emptyOnList`). `h` isn't taken while a comparison `v` started is
still loading, rather than saying no changes are marked.

A reading that empties On me is now news: the panel says "Nothing waiting on
me" without a press, whoever emptied it (the user's last answer, another tab,
or a revision that took the last obligation away). semantic-news.js counts On
me as the badge does and reports the move from some to none after the first
reading; like other news it waits behind the user's own command's words and
drops out if the list fills again before it shows.

Behavior change in tests: test_a_completed_obligation_stays_reachable_through_on_me
now expects the words after the answer with no `m` press. New key-scopes tests
press each walk on a page with nothing to walk, and `t` and `m` with the
server's reading refused.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests/browser/navigation/test_key_surfaces.py::test_a_key_on_screen_is_a_key_that_works passes on main and fails at this head. Its opening state, a page with no threads, still asserts the walk's old gate:

>       assert {"thread.next", "thread.previous"} <= register["dead"]
E       AssertionError: assert {'thread.next...ead.previous'} <= {'changes.tog....target', ...}

PR CI won't show this, since pull requests run only the later-tier tests they edit. It would turn red on main's next run of tests/browser. Dropping when: anyOpenThread is what this PR means to do, so the test's expectation is the part to update. With no threads, the walk is now in register["runs"], and the t / Shift+t presses that follow (which check PANEL_THREAD has count 0) can instead check for "No open threads" with expect_panel_says. The docstring's "a thread walk only once there are threads" goes too. Those lines are outside the diff, so there's no inline suggestion. I can push the change if you'd like.

The new test_key_scopes tests, the modified test_on_panel test and tests/runtime/semantic-news.test.mjs pass locally.

test_a_key_on_screen_is_a_key_that_works asserted the old gate, that t and
Shift+t are dead with no threads. They now run and say "No open threads",
still opening no thread.
@max-sixty
max-sixty merged commit 7d6565b into main Nov 6, 2026
5 checks passed
@max-sixty
max-sixty deleted the on-me-all-done branch November 6, 2026 05:28
leaf-agent added a commit that referenced this pull request Nov 7, 2026
…ept alive (#5660)

After a revision removes the markup a page was served with, four
references kept it in memory for the rest of the session. Each now lets
go, and the three
`test_a_revision_releases_the_served_markup_it_removes` cases, which
fail on main `ec2799b1d`, pass. Nothing a user sees changes.

I found each one by taking a heap snapshot after the test's forced GC
and following the retainer path to `#served-link`. Fixing one exposed
the next.

- **The box at rest, #5428.** #5428 stands the comment box beside a
focused control, so its placement now watches that control. Two holds in
the placement were already there, and they kept the control after the
watch stopped:
- `floating-response.js` cached its observation modes the first time
`watchFabPosition(target, …)` ran. Those closures were built inside that
call, so they kept its `target` alive. A helper now builds them outside
that scope, which is how `arrivals.js` already builds its owner watch.
- `stop()` in `floating.js` didn't reset `stand`, which was still the
last anchored writer, and that writer closes over its anchor element.
`stop()` now resets `stand` to `placedAt`.
- **The "Nothing waiting on me" notice, #5597.** In the test, the
revision empties On me. A background notice then waits behind the user's
focus. Its `format` closure was built inside `receiveState`, whose scope
also holds the activation and the outgoing authored document.
`newsFormat` now builds it outside that scope. It reads the same
`presentedNews` object as before.
- **Previews.** `preview.js` kept the last preview's source (`anchored`)
and its placement (`placed`) after the preview hid. `anchored` is now a
`WeakRef`, because the Firefox re-show workaround compares against it
after a hide. `hide()` sets `placed` to null, since it's only read while
a preview stands for the same target.

Bisect evidence: at `b0aaf9038` the test passes with `restFab` removed
from the repaint and fails with it, and the two placement fixes alone
make it pass there. With `restFab` disabled, `git bisect run` over
`b0aaf9038..ec2799b` lands on #5597 (`7d6565b14`).

This settles the served-markup group of #5641. The other groups there
(the bar visible where tests expect it hidden, the resting box moving
without input, clicks the resting box intercepts, and the other
consumers) are untouched.

<details><summary>Checks run</summary>

-
`tests/browser/projection/test_revision_patches.py::test_a_revision_releases_the_served_markup_it_removes`
(all three cases, `--run-main`): fail on main, pass on this branch. At
`b0aaf9038`, the two placement fixes alone make them pass.
- Preview tests about standing, placement, side, growth, links into the
page, put-away, resize and new aims (`controls/test_previews.py -k …`),
`test_a_press_on_the_box_at_rest_opens_it_beside_its_target`,
`test_a_walk_with_nothing_to_step_through_says_so`: 48 passed.
- Commenting, On me and semantic-news selections: pass.
- `pnpm run test:runtime` (896 pass), `pnpm run check`, and `pre-commit
run --files` on the four files: pass.

</details>

Refs #5641 — automated triage

Co-authored-by: leaf-agent <[email protected]>
max-sixty added a commit that referenced this pull request Nov 9, 2026
…On lists only once read (#5738)

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 &lt;agent&gt; 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_
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