Repository navigation
Read the reading line inside holdPlace, and take readingAt out of the package API - #7002
Merged
Merged
Conversation
…-dial's Skim and lf-diff's redraws ported
… package API The trial of one hold for focus and place (the commit before this one) did not hold, so this keeps the part that shares one rule. holdPlace(column, standIn) now reads what stands at the reading line itself and picks what to hold, the block there where its top shows, else its words, which lf-dial did by hand with readingAt and its own list of blocks. The runtime keeps the node-level hold as holdPlaceOf, and holdFocus stays as it was.
holdPlace now holds the words at the reading line and reads, once the change has drawn, which box around them the change hid: the stand-in lands where the outermost one began, or where the words stood if it began above the window. That is the rule lf-dial applied to its own blocks, without a list of blocks or a reading of display. The stand-in is asked of a node in the column's own tree, so words a widget drew in its shadow tree find their stand-in too.
…node-level hold A box with no box of its own, as one that is display: contents, counted as hidden by the change and landed a stand-in at the window's top. holdPlaceOf's stand-in had no caller left, so holdPlace alone carries it. The journey gains the case of words a widget draws in its own tree, which main does not hold.
…ey case reads A range's words can lose their box while every box around them still draws, as when a change hides an element with no box of its own; the hold then read a top of zero and scrolled the page by where the words had stood. The journey's Skim change now checks the block its place reads is the one folded.
leaf-agent
approved these changes
Nov 24, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 24, 2026
Brings in two main commits: - #7001 (9fc720c): a widget's walk is said through an `lf-walk` event, and `beginWalk`, `listWalkPosition`, `labelOf` and `saying` leave the package API. - #7002 (097bee4): the reading line is read inside `holdPlace`, which now takes a column; the old one-node hold is `holdPlaceOf`, and `readingAt` leaves the package API. One conflict, in the imports of browser/runtime/floating-panel.js: - This branch added `import { focusByKey, focusKey } from "./carry.js"` above the user-place import. - #7002 renamed that import's `holdPlace` to `holdPlaceOf`. The resolution keeps the carry.js import and main's `import { focusPlace, holdPlaceOf, standsAt } from "./user-place.js"`. main's other floating-panel changes merged cleanly: the press hold calls `holdPlaceOf(node)`, and a tab's preview reads `commandBindingsNow`. Nothing this branch adds or moves calls a name main took out of the package API or the old one-node `holdPlace`. check-api.js, runtime-globals.d.ts and module-scroll-and-motion.md merged cleanly, with both sides' additions: - check-api.js: main's `beginWalk` export and this branch's `anchoringIsReady`. - runtime-globals.d.ts: main's `lf-walk` event and announce words, and this branch's `DocumentInputs` and `lfStorage` members. - module-scroll-and-motion.md: main's `holdPlace(column, standIn)` and `{ words, rows }` text, and this branch's entry-state paragraph. > _This was written by Claude Code on behalf of max-sixty_
This was referenced Nov 24, 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.
One step of the package-interface redesign (step six, group
one-hold). A module that folds what the reader reads now takesholdPlace(column, standIn), and Leaf reads the reading line and decides where the stand-in lands, aslf-dialdid by hand withreadingAtand its own list of blocks.readingAtleaves the package API (97 names to 96 on today'smain); the runtime's node-level hold becomesholdPlaceOf.The planned merge, one
holdUserfor focus and place, was built first (683216e) and did not hold, soholdFocusstays; theuser-place.jsheader records why. Around a diff's redraw it held the reading line for a reader who focused nothing, whombrowser/AGENTS.mdleaves to anchoring, moved a line read higher in the window 100px, and took Expand all on 46 files from 0.7 s to 6.7 s of script.To weigh: the runtime gains about 35 lines of code where
lf-dialloses 10. Dial cases measure as onmainin both engines; words a widget draws in its own shadow tree now find their stand-in on Skim, wheremainloses the place (the new journey case).Ran: 64 of the hold-still journey's 160 cases, dial browser tests,
pnpm run check, pre-commit, probes againstorigin/mainin both engines, and a keystrokeleaf-dev bench.