Repository navigation
Let a widget be its own position container, so a reorderable list needs two tags - #7007
Merged
Merged
Conversation
…ion container no declaration places in the widget `awaits.answered.<verb>.empty` took its own `within`, which in every use repeated the container its verb's position record already names. It now takes only `when`, and `obligations.container_empty` reads the container from the verb's record, so an author names it once and the two can't disagree. `answering-container` goes, since the record gate already refuses an unknown container. `package check` (and `page init`, `page check`, through `declaration_advice`) now advises a position record whose `within` names no tag the declarations place inside the widget, through `owners` at any depth, with members of its own. Every drop the widget's own structure offers is then refused at admission, and nothing told the agent. It is advice rather than a refusal because such a record can still work: a container outside the declared membership may stand in a member's markup, and another package may declare the membership that places it. The message names the containers the declarations do place there, or says to declare one.
…record positions themselves
A position record's `within` may now name the widget's own tag, so a list the user reorders needs two tags, the list and its item, instead of a wrapper container between them. `package check` refused it (#6781) because the browser looked for containers only among the widget's descendants, so the first drop threw in `rankAt`. The lookup now reads containers at or inside the widget, and both runtimes give a container to the nearest element at or above it whose position record names its tag (`container_owner`, `containerOwner`), which is the widget itself where it orders its own members. The position-container advice counts the widget too. Lifting the refusal is the maintainer's call; this waits for it.
…'s own container once in a move's words A container now belongs to the nearest element at or above it that records positions, the rule a unit's owner follows started one step earlier, so a container and the units in it always answer to one widget. Matching the owner by `within` instead let a board drop its own card into a zone another recorder owned, where it could not be moved back. The browser reads the same rule with `closest` over the selector it already keeps, so `registry.js` needs no index of its own. A move into the widget itself serves no `to`, so an Undo offer and the activity feed say "moved “X” in the list" rather than naming the list twice.
# Conflicts: # skills/leaf/references/package-data.md
# Conflicts: # src/leaf/findings.py # src/leaf/registry/state.py # src/leaf/registry/widgets.py # tests/model/interact_contract/test_recorded_state.py
max-sixty
marked this pull request as ready for review
November 24, 2026 17:45
leaf-agent
approved these changes
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.
A position record's
withinmay now name the widget's own tag, so a list the user reorders needs two tags, the list and its item, instead of a container element between them. The maintainer chose to lift the refusal #6781 added.That refusal guarded a real crash: the browser looked for containers only among the widget's descendants, so the first drop threw in
rankAt. The lookup now reads containers at or inside the widget, and in both runtimes a container belongs to the nearest element at or above it that records positions (projection.container_owner, andclosestinprojection/authored.js). That is the rule a unit's owner already follows, started one step earlier, so a container and its units always have one owner. The position-container advice counts the widget itself, and an Undo offer names such a move's list once ("moved “X” in the list").A ranking that needed
lf-ranking>lf-rank-list>lf-rank-itemis nowlf-ranking(content: "members",movewithinlf-ranking) >lf-rank-item(owners: ["lf-ranking"]).Ran
pnpm run check, pre-commit, the model contract tests (649), and browser tests by node id: a two-tag fixture (tests/fixtures/packages/sortable) records a drag and a key move, keeps them across a reload and undoes the last, in Chromium and Firefox; the board's three-tag moves still pass in both.leaf-dev probereads the same state in both engines.