Repository navigation
Scope a page's stored state to its declared root, and read visual-part admission once - #1218
Merged
Merged
Conversation
…t admission once
A nested page's live root and its version addresses now keep one set of drafts and tab
state. `storage.js` derived `PAGE_SCOPE` by stripping `/versions/vN.html` from the
pathname, so `/ex/foo/` scoped to `/ex/foo/` and `/ex/foo/versions/v2.html` to
`/ex/foo`: on every leaf.page example, a comment typed on the live page was gone on a
version address, against the contract in `drafts.js`. `storage.js` now reads the page
root the server declares in the canonical link it adds to every document, and exports
it as `PAGE_ROOT`; `context.js`'s `pageUrl` resolves against that export instead of
querying the link itself. An interactive export has no server and no link, so its own
address stays its scope, as before. A root-served page still scopes to "", and
`version.js`'s return to the live page now lands on `/ex/foo/` directly instead of
through the redirect from `/ex/foo`. `interaction-log.js` still reads the canonical link
itself; another change is editing it, so it is the one remaining reader. A new site test
types a draft on a nested example's live root and finds it on `versions/v1.html`; it
fails on the old scope rule.
`visual-parts.js` now owns how an `x-visual` declaration admits part ids
(`visualPartAdmission`): the authored `parts` tokens, or any longer id a prefix begins.
`anchor-resolution.js` and the render gate's `render-checks/widgets.js` each parsed the
declaration themselves; both now call the shared reading, and `visualPartProblems` and
`unrevealedVisualParts` take the declaration rather than a pre-parsed token list and
predicate. The unfiltered readers in `visual-parts.js` are renamed `registeredVisualParts`,
`registeredVisualPart`, `registeredVisualPartAt`, `registeredVisualPartLabel` and
`revealRegisteredVisualPart`, so they no longer share names with the admitted readers
`anchor-resolution.js` exports. The gate reports the same problems as before.
`reading-place.js`'s `textBlocks` reads each word's block through `passages.js`'s
`blockAt`, so a reading landmark is chosen by the same block rule every passage reading
uses, including its Markdown-island rule. Option prose parsed as inline Markdown can now
serve as a landmark.
`anchor_capture.py`'s docstrings named the runtime's section rule as `closest("[id]")`
and pointed at "wherever the capture lives"; they now name `selectionAnchor` in
`composing/capture.js`.
Keyboard dispatch's allowed closure in `.dependency-cruiser.mjs` gains `storage.js`,
which `context.js` now imports; it has no imports of its own.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
previously approved these changes
Sep 26, 2026
max-sixty
added a commit
that referenced
this pull request
Sep 26, 2026
…scope (#1231) Five callers rebuilt the landing band from its top inset alone, and the Ask view wrote `aria-keyshortcuts` beside the scope register's own writer. This settles both from the concept survey, plus two small items. **Landing band.** The page step (`d`/`u`, `navigation.js`), anchor travel's centring and readable check (`anchor-travel.js`), an Ask arrival's room and framing (`asks/view.js`) and lf-toc's visible window now read `landingBand` whole (lf-toc reads both `landingInsets` edges, since it works in scroll coordinates). `reading-place.js` still reads the top inset only; it is left for open PR #1218. The survey's inferred page-step gap does not reproduce: in Chrome at 1280×900 a `d` step moves 508px against a 790px landing band, so a line just above the foot band lands about 340px down, nowhere near the banner. The Ask arrival did have a real gap. A region that fit the window below the banner could leave the ask's foot under the shortcut bar, and the new test in `test_render_widgets.py` fails on the base with the foot 28px into a 56px foot band. **Ask shortcuts.** `projectCommandScope(control, projector, capability)` now keeps projected scopes as a list per element, keyed by the projecting owner (margin entries and the Ask view). The Ask projects a run-less row naming the digit and the command's own bindings that still reach the control. No row runs, so dispatch, the shortcut bar and the command reference ignore it. `keyboard/scopes.js` is now the attribute's only writer, and it paints the union of each scope's live bindings. The save/restore in `asks/view.js` is gone. **Also.** `askStep` steps within the list through `clampedRow`. `passages.py` comments name the runtime's `passages.js` and `collapse.js` instead of `leaf.js`, and drop the `restsOn` browser function that no longer exists. The stale "wraps at both ends" comment was already fixed on main by #1222. Behaviour that moved: - `d`/`u` step 60% of the landing band, about 34px less per step on a desktop window. - An Ask arrival's region has to fit above the foot band. - Centred travel centres in the landing band. In the thread panel a widget sits half the list's heading room lower. - While the user stands in an Ask, a decision control's `aria-keyshortcuts` keeps its own scope's bindings, which the Ask view used to strip. Two scopes on one element that name the same press are merged rather than refused, and tokens appear in scope order. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
capturePlace and restorePlace read landingBand(box).top instead of rebuilding it from shownBox and landingInsets, the last such site after #1231. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Sep 26, 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.
A nested page's live root and its version addresses now keep one set of drafts and tab
state.
storage.jsderivedPAGE_SCOPEby stripping/versions/vN.htmlfrom thepathname, so
/ex/foo/scoped to/ex/foo/and/ex/foo/versions/v2.htmlto/ex/foo: on every leaf.page example, a comment typed on the live page was gone on aversion address, against the contract in
drafts.js.storage.jsnow reads the pageroot the server declares in the canonical link it adds to every document, and exports
it as
PAGE_ROOT;context.js'spageUrlresolves against that export instead ofquerying the link itself. An interactive export has no server and no link, so its own
address stays its scope, as before. A root-served page still scopes to "", and
version.js's return to the live page now lands on/ex/foo/directly instead ofthrough the redirect from
/ex/foo.interaction-log.jsstill reads the canonical linkitself; another change is editing it, so it is the one remaining reader. A new site test
types a draft on a nested example's live root and finds it on
versions/v1.html; itfails on the old scope rule.
visual-parts.jsnow owns how anx-visualdeclaration admits part ids(
visualPartAdmission): the authoredpartstokens, or any longer id a prefix begins.anchor-resolution.jsand the render gate'srender-checks/widgets.jseach parsed thedeclaration themselves; both now call the shared reading, and
visualPartProblemsandunrevealedVisualPartstake the declaration rather than a pre-parsed token list andpredicate. The unfiltered readers in
visual-parts.jsare renamedregisteredVisualParts,registeredVisualPart,registeredVisualPartAt,registeredVisualPartLabelandrevealRegisteredVisualPart, so they no longer share names with the admitted readersanchor-resolution.jsexports. The gate reports the same problems as before.reading-place.js'stextBlocksreads each word's block throughpassages.js'sblockAt, so a reading landmark is chosen by the same block rule every passage readinguses, including its Markdown-island rule. Option prose parsed as inline Markdown can now
serve as a landmark.
capturePlaceandrestorePlacemeasure a place from the top oflandingBand(box)rather than rebuilding it from the box's border edge and its topinset, the last such site after #1231; in a bordered reading region a landmark now sits
the border's width lower.
anchor_capture.py's docstrings named the runtime's section rule asclosest("[id]")and pointed at "wherever the capture lives"; they now name
selectionAnchorincomposing/capture.js.Keyboard dispatch's allowed closure in
.dependency-cruiser.mjsgainsstorage.js,which
context.jsnow imports; it has no imports of its own.🤖 Generated with Claude Code