Skip to content

Give a thread record its turns, say a seat change with lf-layout, and release an outlet through the surface handle - #6995

Merged
max-sixty merged 9 commits into
mainfrom
agent-a1bac030018d5e5b3
Nov 24, 2026
Merged

max-sixty merged 9 commits into
mainfrom
agent-a1bac030018d5e5b3

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

One group (threads) of step six of the package-interface redesign. A thread's record carries turns, so a package stops importing the turn rule (threadTurns). A widget that seats threads says its seats changed with lf-layout, which already asked for a thread pass, so threadSurface(owner).update() goes and no event name is added. releaseOutlets(node) becomes threadSurface(owner).release(node). The package API goes from 112 names to 110.

To weigh: release answers only for the calling widget's own outlets, where releaseOutlets scanned every surface. lf-diff dispatches lf-layout as a file folds; with sixty open files it asks for as many thread passes as on main, and the event's listeners add under 11 ms across the sixty. threadInput stays: folded into landInThread(node), the option group's Enter row could only ask whether it stands in chrome, which is also true in the On view, where no reply box is drawn, so the command reference would list a dead key there.

Ran pnpm run check, pre-commit, the browser tests that cover this by node id, base-versus-head probes in Chromium and Firefox, and the outlets eval case on both arms. The test job fails on test_a_data_bound_diff_aims_and_selects_one_source_line, which this change edits and which fails at the same line on main.

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

… an outlet through the surface handle

One group of step six of the package-interface redesign. A thread's
record carries `turns`, so a package stops importing the turn rule
(`threadTurns`). A widget that seats threads says its seats changed with
`lf-layout`, which already asks for a thread pass, so
`threadSurface(owner).update()` goes. `releaseOutlets(node)` becomes
`threadSurface(owner).release(node)`, on the handle its caller holds,
and answers for that widget's outlets only.

`threadInput` stays: folded into `landInThread(node)`, the option
group's Enter row can only ask whether it stands in chrome, which is
true in the On view, where the thread draws no reply box.
# Conflicts:
#	skills/leaf/references/module-plain-elements.md
…yout rule once, and check stranding without focusout

The seat rule for `lf-layout` lives in module-annotations.md, and the
event's entry in module-plain-elements.md only names outlets among what
Leaf reads again. The removal test reads focus in the task after the
removal, since Firefox fires no `focusout` for a removed node, and first
shows that the removal dropped focus.
# Conflicts:
#	browser/runtime/widget-api.js
#	examples/developer/feature-gallery.page/widgets/lf-conversation-workspace.js
#	skills/leaf/references/module-annotations.md
#	tests/browser/test_render_application_boundary.py
leaf-agent
leaf-agent previously approved these changes Nov 24, 2026
@max-sixty
max-sixty merged commit e831ed7 into main Nov 24, 2026
4 of 5 checks passed
@max-sixty
max-sixty deleted the agent-a1bac030018d5e5b3 branch November 24, 2026 10:05
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