Repository navigation
Stand a removed block in its own gap, and walk to it on a stand-in - #5322
Merged
Merged
Conversation
In a version comparison, a block removed with nothing in its place stood at the unchanged block after its gap. A paragraph removed from the end of a `details` or a tab was marked outside it and missed from the tab's Δ count; two removals either side of one block both stood on that block, so `h` could not step from one to the other; and `h` focused the unchanged block, which read as if it had changed. - `changedSince` stands each removed block in the part of the page it left: after the unchanged block before the gap where the element it shared with that block (found in this version as many elements up) doesn't hold the block after the gap, else before the block after it, and in an element emptied of every block, found by its id. The element the gap stands beside is that shared element's child, so a paragraph removed just before a `details` stands before the `details`. A change carries `gap: "before" | "after" | "in" | null` in place of `after`, and `gapHolder` names the element a gap is in, which grouping and `comparisonChanges(owner)` read. - Each gap has a stand-in on the details shelf (control-faces.js, `proxy`), named by what the change did, whose press opens its card. `h` lands on it; its focus opens what folds the gap away, scrolls the gap with a line either side into view within the scroller holding it, and rings the gap. The shelf's `presents: false` leaves that to the note's owner. A gap's far edge is the nearest box across it, climbing past a parent that leaves no room. - A gap's outline keeps to the gap, and the ring gives way to an open card. Hovering one of several Change readings in a margin cluster outlines its own change. Behavior change: `h` on a removal focuses the gap's stand-in, not the block after the gap; `test_a_paragraph_removed_is_a_change_at_its_gap` now asserts that, and `test_a_removal_stands_in_the_part_of_the_page_it_left` covers the placements.
# Conflicts: # dist/kernel/kernel.json # dist/kernel/leaf.js # dist/kernel/runtime/bundle-annotation-overlay.js # dist/kernel/runtime/bundle-box-motion.js # dist/kernel/runtime/bundle-data.js # dist/kernel/runtime/bundle-page-layout.js
leaf-agent
previously approved these changes
Nov 4, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
One non-blocking wording fix to the shipped reference, inline.
leaf-agent
approved these changes
Nov 4, 2026
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.
In a version comparison, a block removed with nothing in its place stood at the unchanged block after its gap (#5249). That caused three problems. A paragraph removed from the end of a
detailsor a tab was marked outside it and missed from the tab's Δ count. Two removals on either side of one block both stood on that block, sohcould not step from one to the other. Andhfocused the unchanged block, which read as if it had changed.changedSinceputs each removed block after the unchanged block before its gap, unless the element the two shared (found in this version as many levels up as in the base) also holds the block after the gap; then it goes before that next block. A block whose element lost every block stands in that element, found by its id. The element the gap stands beside is the shared element's child, so a paragraph removed just before adetailsstands before thedetails, not inside it. A change carriesgap: "before" | "after" | "in" | nullin place ofafter, andgapHolder(change)names the element a gap is in, which run grouping andcomparisonChanges(owner)read.hlands on a stand-in for the gap. Each gap has a focusable stand-in on the details shelf (control-faces.js,proxy), named by what the change did ("1 paragraph removed since v1"); pressing it opens the change's card. Focusing it opens any fold that hides the gap, scrolls the gap into view with a line of text on either side within the scroller that holds it, and rings the gap. The shelf's newpresents: falseleaves revealing, scrolling and ringing to the note's owner, so a closeddetailsjust after a gap stays closed. A gap bar's far edge is the nearest box across the gap, climbing past a parent that leaves no room.Behavior change:
hon a removal focuses the gap's stand-in, not the block after the gap.test_a_paragraph_removed_is_a_change_at_its_gapnow asserts that, andtest_a_removal_stands_in_the_part_of_the_page_it_leftcovers the placements on one page: a removal at the end of a fold, removals on both sides of one block, an emptied tab counted in its Δ, a rewritten block after a fold, a fold wrapped in a new element, a gap below a block taller than the window, a gap inside a scrolling box, and a closed fold left closed.Review: two rounds of Codex review found six cases beyond the three reported (the emptied tab, the rewritten next block, a new wrapper, the tall block, the scroller and the closed fold); each is fixed and in the test above. Each of 14 mutations that undo one part of the fix fails a test.
Costs and limits:
version.jsand its stand-in, ring and geometry inmargin-bars.js.<div>without one, whose only paragraph went, marks its removal beside the next block outside it.