Repository navigation
Look up any address with elementById(address, from) and any registry entry with layerFact, and take four lookups out of the package API - #6999
Merged
Conversation
leaf-agent
previously approved these changes
Nov 24, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
One wording fix in browser/AGENTS.md, inline. "The element an id an element gives names" stacks two relative clauses with no relative pronoun, so the row parses only on a second read.
leaf-agent
previously approved these changes
Nov 24, 2026
…till counts an obligation in a reply seated in the page
leaf-agent
approved these changes
Nov 24, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 24, 2026
Brings in #6999 (0ff5679). In it, a package module looks up any address with `elementById(address, from)` and any registry entry with `layerFact`, and four lookups leave the package API. One conflict, in browser/runtime/check-api.js's exports from ui-marks.js: - #6999 added `inChrome` beside `uiInside`. - This branch added the line after it, `export { anchoringIsReady } from "./anchor-resolution.js";`, which the readiness tests ask the check API for. The resolution keeps both: `export { inChrome, uiInside } from "./ui-marks.js";` followed by the `anchoringIsReady` export. #6999 also changes the runtime's `elementById` in passages.js to look a root's id up through the root's tree first, under the same contract. This branch's callers, carry.js `restoreCarry` and version.js's arrival filter, pass `pageDocument()` and get the same answers. The merge touches nothing else this branch changed. > _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.
One step of the package-interface redesign: a package finds an element with
elementById(address, from)whether it holds an id, a widget'sid:keyor a fragment, passing the element that wrote the address asfrom, so an address in an agent's message names that message's element first. It reads any registry entry withlayerFact(name), and finds Leaf's chrome by its.lf-chromeclass.authoredScope,fragmentTarget,declarationForandinChromeleave the package API: 105 names become 101.What the diff doesn't show:
phrasingstays: folded intolayerFact, its one caller would restate Leaf's phrasing rule.elementById(id, root)asksgetElementByIdfirst and walksrootonly behind a duplicate id.Max approved the redesign and asked for small steps; he hasn't read this diff, which a fresh agent reviewed.
Tests:
pnpm run check, pre-commit, 63 browser tests and 6 render-gate pages by node id, andleaf-dev probe --baseof comments in lf-diff's shadow tree, Chromium and Firefox: arms alike.