Repository navigation
Move Show changes into Versions: g V opens on the version last seen, and v there compares it - #6788
Merged
Merged
Conversation
…and v there compares it `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. `v` in Versions presses the Compare of the version the user stands on, so the same keys take the marks off again. Enter on a row still opens that version. This reverses the choice #5290 and #5388 recorded, a one-key toggle on bare `v`. Max asked for the move on 22 Nov 2026 ("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 it over keeping the toggle; the since-seen.js header states the new decision. Since 1 Oct, `changes.toggle` ran 8 times, all in one session (`leaf-dev logs usage --since 2026-10-01T00:00:00-07:00 --json`). - version.js holds the version the user last saw (`sawLast`, set by since-seen.js at arrival), names its row, and gives the picker model `selection.offered`. since-seen.js keeps the return notice, whose Show changes now runs the comparison itself. - The Annotations list loses its Show changes row; Compare on the last-seen row in Versions is a finger's route. - A notice's press carries a `keys` getter in place of a command id, since `g V v` belongs to no single command. `throughVersions` builds Versions' keys followed by one of its own for Show changes and for Open latest, and offers none while Versions stands open, where `g V` would put it away; Open latest offered `g V l` there before. - A list Tab enters starts at the row the list declares it opens at, so Tab and `v` agree in a Versions opened by a pointer. - New stills state `plan-versions-seen`; the words survey's `v` journey becomes `g V v`, and the survey presses a `Mod` binding as Playwright's ControlOrMeta.
leaf-agent
approved these changes
Nov 23, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 23, 2026
…ions (#6811) Each version older than the one shown now says, before its Compare's word, how many changes a comparison with it would mark: "v1 Earlier draft … 8 changes Compare". The count is part of the Compare press, so pressing it marks those changes, and the counts end one under another. Until a count is in, the press reads Compare with the count's room held, so a count coming in moves nothing beside it. A screen reader hears "8 changes, Compare with v1". **How it counts.** A count runs the same diff Compare runs (`changesSince`), about 15 ms of script on the largest example page and 60–200 ms in all, mostly fetching the older version. While Versions is open it counts only the versions whose Compare shows in the window, newest first and one at a time, and a row scrolled into view gets its count then, so the work opening Versions or a pick sets off follows the rows on screen rather than how many versions the session has stamped (AGENTS.md, "Responsiveness"). Counts are kept per revision being read and per state of the page's widgets (the publisher keeps that object while the state holds), so reopening Versions shows them without asking the server, and a pick or a new revision recounts. `changesSince` now retries when the revision moves, so the return notice's loop in `since-seen.js` shrinks to one call. A comparison with no changes now says "No changes since v2" rather than "No text changes", since the diff counts widget state too. **Shared fix.** A `data-lf-room` element that was a grid or flex item stood about 11 px below the row's baseline, because its zero-height room block gave the item its baseline. The shared rule in `controls.css` now puts the room and the words in one grid cell, with the words giving the baseline and centred as a button's are. Stills of the other room holders (thread news notice, transcript summary, diff progress, playground submit) show no pixel change in Chromium or Firefox. **Placement.** Max picked the count before Compare's word, inside its press, over the count after the version's name. Two placements were out: replacing Compare's word breaks `browser/AGENTS.md`'s one word per action, and a count outside the press opened the version on a click. The press grows about 80 px, which every row's note gives up. Max asked for change counts in Versions as a follow-up to #6788; an independent review's findings are folded in. Tests: a new browser test covers the counts, their names, a reopen that fetches nothing and a recount after a pick, and another that only the rows in view are counted; the three tests that hold a comparison's `/api/view` request now hold only that request; the return-notice tests, `pnpm run check:browser` and `pnpm run test:runtime` pass. > _This was written by Claude Code on behalf of max-sixty_
This was referenced Nov 23, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 23, 2026
…restyle test (#6814) `test_a_page_mode_restyles_only_what_the_pointer_is_over` has failed on every run since #6788 (`f014d63e1`), with one style recalc of 601 elements against its cap of 171 (684 / 4). The test entered Capture area by clicking the row in the annotate menu, so the pointer rested wherever that row happened to stand once the menu closed. #6788 changed the menu's rows and moved the Capture row 30 px lower (y 716 → 746). That spot is in the test page's `<section>`, in the gap between two paragraphs, not on a paragraph. When the pointer rests on a box like that, Chromium restyles everything the box holds. The header of `browser/styles/components/integration.css` already states this cost. Capture area itself behaves as before. The test now focuses the row and presses Enter, with the pointer resting on the words the way it does for each mode before it. So it measures what the pointer is over again, not the menu's layout. - Bisected on CI's failing step: `874e527fc` passes and `f014d63e1` fails, and each commit gave the same result on every run. - On current `main`, the test failed 3 of 3 runs before this change and passes 3 of 3 after it. - The test still catches a crosshair stated on every element: with `:root[data-lf-region-capture] * { cursor: crosshair; }` appended to `integration.css`, it fails at 694. The run's other failure, `test_the_reference_lists_each_of_the_panel_s_keys_once`, was fixed by #6809 and passes on current `main`. Refs #6813 — automated triage Co-authored-by: leaf-agent <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Nov 23, 2026
A key shown for a press is now found through the command that opens the scope holding it. A command row may declare `opens`, the scope its press enters, and `pressNow` (control-keys.js) answers a command's own binding where a key reaches it, else the keys of a command that would open its scope, then its own binding. So `g V l` for Open latest comes through Go-to's `g` and then Versions' `g V`, and the lookup's Go-to case, Versions' `throughVersions` helper with its two key constants, and the Scope field `sequencePrefix` go. Each press at the panel field's end names its command (`NoticePress.command`) and takes its keys from it, and its run unless it brings its own; Open latest becomes such a press. **What the user sees.** Open latest says `l` while Versions has focus, where it showed no keys though `l` worked. While Versions stands, Go-to announces `Shift+V` first, as it does the door to any other standing panel surface, and names it "close Versions"; closed, its name reads "Versions", capitalized as the other doors' are. Show changes still shows no keys while Versions stands, since there `v` compares whichever version the user is on. **Where to look.** The design Max picked had each row name its door; the change has the door command name the scope it opens instead, because Versions' rows live in one element declaration on the panel, which the lookup can't list without a scan that grows with the page. Compare's `when` answers before Versions opens from the version Versions opens at (`offeredVersion`), since its control is drawn only once Versions opens. `pressReading` moved from notifications.js into floating-panel.js, its only reader, because notifications.js can't import the key lookup without a cycle through dispatch.js. Max asked for this as a follow-up to #6788 and picked the design on the handoff page; an independent review's findings are folded in. Tests: a new browser test covers Open latest's keys from the page and inside Versions; the return notice, the ways back from a settlement (the notice's Undo among them), a Resolve's notice standing for that Resolve alone, Open latest's press, the command reference's Go-to destinations, `pnpm run check:browser` and `pnpm run test:runtime` pass. > _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.
g V vnow shows what changed since the user last looked, and the barevpage 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, andvthere 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 wearingg 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; thesince-seen.jsheader 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
keysgetter in place of a command id, sinceg V vbelongs to no single command, andthroughVersions(version.js) composes Versions' keys for both Show changes and Open latest, offering none while Versions stands open, whereg Vwould close it. A deeper fix would teachpressNow(control-keys.js) to reach a panel view's keys through the command that opens the view, and deletethroughVersions. Afterv, Versions closes onto the panel's leaf, as every Versions press does, where barevleft focus on the page. Tab now enters a list at the row the list declares it opens at, so Tab andvagree 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 vprobed in Chromium and Firefox. An independent code review and a fresh look at the captures ran, and their findings are fixed here.