Skip to content

Mark what changed since the latest version with v - #5290

Merged
max-sixty merged 6 commits into
mainfrom
detail-dial
Nov 4, 2026
Merged

max-sixty merged 6 commits into
mainfrom
detail-dial

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

v marks what changed since the newest stamped version older than the one being read, and pressing it again takes the marks off, whichever press started the comparison, a Compare in Versions included. On 3 November the user chose to call the marks up with a key, rather than have a page arrive marked with what changed since their last visit (removed in #5014). Comparing with an older version stays with Versions, which g V already opens, as g T opens Threads and g M On me. Bare v was free, since restoring a selection is g v.

The command lives in version.js beside g V's, since the comparison is its result. In the leaf's menu it is the Annotations row beside Hide annotations, reading "Show changes since v2" or "Hide changes", which is also its touch route. Turning the comparison off also closes an open change card, as a lit Compare does.

Ending a comparison, with v or a lit Compare, now gives the notice "Changes hidden", as o gives "Annotations hidden". Before, a screen reader heard nothing when the marks went, since the live region still held the comparison's count.

The comments in version.js and change-walk.js, and the feature gallery's guide, named Compare in Versions as the only press that starts and stops a comparison, and version.js still described a walk through the Versions rows that re-based it. They now name Compare and v.

Tests: a new browser test stamps v2, revises again, and checks that v marks only what changed since v2, that a second v clears the marks and says so, and that v also clears a comparison a Compare with v1 started.

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

The user chose on 3 November to call the change marks up with a key rather
than have a page arrive marked: `v` marks what changed since the newest
stamped version older than the one being read, and pressing it again takes
the marks off, whichever press started the comparison, a Compare in
Versions included. Picking an older base stays with Versions, which `g V`
already opens beside `g T` Threads and `g M` On me. Bare `v` was free:
restoring a selection is `g v`.

The command lives in version.js beside `g V`'s, since the comparison is
its result. It sits in the Annotations list beside `o`, as "Show changes
since v2" or "Hide changes", which is also its touch route.

version.js's header and comments described a walk through the Versions
rows that re-based the comparison; no such walk remains, so they now name
Compare and `v` as the presses that start and stop one. The feature
gallery's guide starts from `v`.

Tests: a new browser test stamps v2, revises again, and checks that `v`
marks only what changed since v2, that a second `v` clears the marks, and
that `v` also clears a comparison a Compare with v1 started.
# Conflicts:
#	dist/kernel/kernel.json
# Conflicts:
#	browser/runtime/change-walk.js
#	browser/runtime/version.js
#	dist/kernel/kernel.json
leaf-agent
leaf-agent previously approved these changes Nov 4, 2026
# Conflicts:
#	dist/kernel/kernel.json
leaf-agent
leaf-agent previously approved these changes Nov 4, 2026
`o` gives "Annotations hidden" when it hides annotations; ending a
comparison gave no notice, so a screen reader heard nothing when the
marks went, and the live region still held the comparison's count.
`endComparison` now ends it and gives the notice, for `v` and for a lit
Compare in Versions. An activation that drops a comparison stays quiet,
since the user didn't press anything.

Found in a cold live test of `v` in Firefox. The `v` test now checks the
live region reads "Changes hidden" after the second press.
leaf-agent
leaf-agent previously approved these changes Nov 4, 2026
# Conflicts:
#	dist/kernel/kernel.json
#	dist/kernel/runtime/bundle-data.js
@max-sixty
max-sixty merged commit 1940df4 into main Nov 4, 2026
4 checks passed
@max-sixty
max-sixty deleted the detail-dial branch November 4, 2026 07:47
max-sixty added a commit that referenced this pull request Nov 4, 2026
… mark it (#5388)

Coming back to a page the agent revised while the user was away, the
panel now says how much changed since the version they last saw, as "3
changes since v12 — v shows them", and the page still arrives unmarked.
`v` marks those changes; once the user has seen everything, it marks
what changed since the newest older version, as #5290 made it. The user
chose on 3 November to call the marks up with a key rather than find
them waiting, and on 4 November took up being told on return that there
is something to call up, in a notice that passes after a notice's time
like a version's arrival.

### What counts as seen

`since-seen.js` comes back from before #5014 to record what the user
saw, and owns `v`, which moves out of `version.js` (its command id is
now `changes.toggle`).

- A revision counts as seen only while the tab is visible, its window
focused and its reading continuous, so a browser standing beside the
terminal the user types into sees nothing land. The tab posts `seen` as
the user leaves and hands the revision to a reload.
- The version the user last saw is the newest stamped one at or before
the newest revision they saw, found at their arrival. The server never
stopped reading `seen` (`read_state.seen_revision`); the Python side
changes only the prose that said no tab posts one.
- A return to a draft the user watched land says nothing, though it
differs from the version, since nothing in it is news.

### Counting without marking

`applyDiff` splits into `diffWith`, which reads a comparison and touches
nothing, and `commitDiff`, which puts it on the page; `loadBase` takes
the fetch out of `showComparison`, and `changesSince` counts. The count
runs after the document is presented, and starts again if a revision
lands while it runs.

### Startup

`since-seen.js` loads with the runtime, one more source module (about 9
KB) before the page presents, because `v` and the record of the first
presentation have to be there when it does. The count's `/api/view`
request waits until after presentation. A base/head probe of the startup
path didn't finish on a host at load 50, so the request and byte
comparison above is read from the module graph rather than measured.

### Tests

- Coming back after a stamp and a revision says "2 changes since v1 — v
shows them" and marks nothing, and `v` marks both changes, not only the
one since v2.
- A version that lands while the window lacks focus counts on return,
and `v` marks it.
- A return to a draft the user watched land makes no count request,
while a revision landing when they are away gets one and its notice.

Each fails with its rule taken out (focus ignored, `v` ignoring the
version last seen, the unseen rule removed). `pnpm run test:runtime`
(813), `pnpm run check:browser`, pre-commit and the change and
comparison tests in `test_changes_in_place.py` pass. A fresh reviewer
used the return in Firefox; its three findings (a notice repeating on a
watched draft, a stale count, a dropped notice) are fixed here.

> _This was written by Claude Code on behalf of max-sixty_
leaf-agent added a commit that referenced this pull request Nov 5, 2026
… run (#5528)

#5290 added a row to the leaf menu's Annotations list, which moved
Capture area up by one row to within 7 px of where the Annotations door
had been tapped. `open_capture_area` taps the door and then the row
about 160 ms apart, so Chromium counted the second tap as the second
click of a run (`detail` 2). The floating panel deliberately presses
nothing for a click that continues a run begun on another control
(`runOfClicks` in floating-panel.js), so capture never opened. The
panel's rule and #5290's row are both as intended. The test tapped
faster than a person can.

`press_visible` now waits until 0.5 s have passed since the page's
previous tap. Chromium measured a run window of about 400 ms here. A
mouse press is unchanged, since Playwright states each click's count.


`test_touch_capture_attaches_on_lift_and_a_tap_or_cancel_attaches_nothing`
failed on main and passes with this change. The other touch tests that
go through `press_visible` keep their results.
`test_on_a_phone_held_news_gives_way_before_close` and
`test_on_a_phone_turning_on_s_tabs_moves_nothing` fail the same way with
or without the change.

Closes #5480 — automated triage

Co-authored-by: leaf-agent <[email protected]>
max-sixty added a commit that referenced this pull request Nov 23, 2026
…and v there compares it (#6788)

`g V v` now shows what changed since the user last looked, and the bare
`v` page key is gone. Versions opens on the version the user last saw,
named **(last seen)** while the page has changed since it, else on the
newest version older than the one shown, and `v` there presses the
Compare of the version the user stands on. The same keys take the marks
off again. The return notice keeps Show changes, now wearing `g V v`;
the Annotations list loses its Show changes row, and Compare on the
last-seen row is a finger's route.

Max asked for this in a Leaf thread on 22 Nov ("why isn't changes
integrated into versions? I think that would be better than having it
separate. So it could be something like `g V v`?") and picked the option
that moves Show changes into Versions. It reverses the one-key toggle
#5290 and #5388 chose; the `since-seen.js` header states the new
decision. Since 1 Oct the toggle ran 8 times, all in one session.

Worth weighing: a notice's press now carries a `keys` getter in place of
a command id, since `g V v` belongs to no single command, and
`throughVersions` (version.js) composes Versions' keys for both Show
changes and Open latest, offering none while Versions stands open, where
`g V` would close it. A deeper fix would teach `pressNow`
(control-keys.js) to reach a panel view's keys through the command that
opens the view, and delete `throughVersions`. After `v`, Versions closes
onto the panel's leaf, as every Versions press does, where bare `v` left
focus on the page. Tab now enters a list at the row the list declares it
opens at, so Tab and `v` agree in a Versions opened by a pointer; in
Threads that is the first thread rather than a draft above it.

Tests: `pnpm run test:runtime`, `pnpm run check`, pre-commit, and the
changed browser and journey tests by node id; `g V v` probed in Chromium
and Firefox. An independent code review and a fresh look at the captures
ran, and their findings are fixed here.

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