Skip to content

Move el and rove into the library, and write Leaf's text field by its tag - #6998

Merged
max-sixty merged 4 commits into
mainfrom
agent-ae2be70e61d16788d
Nov 24, 2026
Merged

max-sixty merged 4 commits into
mainfrom
agent-ae2be70e61d16788d

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

One step of the package-interface redesign (step six, group lib-dom): shared web code leaves the package API for the library, and a widget writes Leaf's text field by its tag. el moves to lib/elements.js and rove to lib/roving.js, since neither reads anything of Leaf's. A widget builds its text box as offer("leaf-text"), the tag the options package's CSS already writes, in place of the TEXT_FIELD constant; the runtime keeps the constant for its own readers. The package API goes from 112 names to 109.

To weigh:

  • Left: the three child-list helpers. setChildren, setChildLists and setRenderedChildren each place nodes through move (dom-move.js), which keeps focus in a moved node, and setChildLists also puts the page's selection back through dom-move.js. move stays Leaf's, so they stay with it; dom-children.js's header now says why it is not library code.
  • Pages. A page's own widget importing el or rove from widget-api.js fails to load until its import changes; page check --render reports it.
  • References. They name the two library modules where a task needs them; unscored, since no rule changed.

Ran pnpm run check, pre-commit, 13 browser tests and eight hold-still cases by node id, and leaf-dev probe --base origin/main on six pages in Chromium and Firefox, whose arms read the same.

This was written by Claude Code on behalf of max-sixty

… tag

One step of the package-interface redesign (step six, group lib-dom).
`el` moves to lib/elements.js and `rove` to lib/roving.js: neither reads
anything of Leaf's. A widget writes Leaf's text field by its tag,
`leaf-text`, in place of the `TEXT_FIELD` constant; the runtime keeps
the constant for its own readers.

`setChildren`, `setChildLists` and `setRenderedChildren` stay in the
package API: each places nodes through `move` (dom-move.js), which keeps
the user's focus and selection in a moved node through hooks Leaf
installs, and `move` stays Leaf's. dom-children.js's header now says so.
# Conflicts:
#	packages/file-editor/widgets/lf-file-editor.js
# Conflicts:
#	packages/playwright/widgets/lf-trace.js
@max-sixty
max-sixty merged commit e7d5808 into main Nov 24, 2026
6 checks passed
@max-sixty
max-sixty deleted the agent-ae2be70e61d16788d branch November 24, 2026 10:07
max-sixty added a commit that referenced this pull request Nov 24, 2026
Brings in main's six newer commits, through e7d5808 (#6998).

One conflict, in the imports of
browser/runtime/annotation-overlay/margin-projection.js. This branch
imports `focusByKey` and `focusKey` from carry.js, so that Back returns
the user to where they were in a card. #6998 moved `rove` out of
focus.js into lib/roving.js and imports it from there. The resolution
keeps both imports. The rest of the file merged cleanly, as main plus
this branch's card changes.

None of the incoming commits touches history.js, version.js,
prepaint.js, bootstrap.js, carry.js, document-inputs.js or leaf.js.
Their thread changes are these:

- #6995 changes how a widget says its seats changed (`lf-layout`) and
  releases an outlet through the surface handle.
- #6997 changes how a live sample's growth is held.
- #6998 moves `el` and `rove` into the library.

None of them changes thread destinations, the entry's record or the
handoff.

> _This was written by Claude Code on behalf of max-sixty_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants