Skip to content

Remove the fact unique: a board column two options name takes no drop - #6760

Merged
max-sixty merged 50 commits into
mainfrom
agent-af8aae45f226f8ce4
Nov 23, 2026
Merged

max-sixty merged 50 commits into
mainfrom
agent-af8aae45f226f8ce4

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

unique stops being a declared fact, the second removal under the rule #6759 states.

After #6759, which took shows out of the server, the only code that acted on unique was the page check refusal of two members of one owner sharing a value. A trial at the base showed what a repeat does. With a board card showing a question's options, dropping the card on the column two options name recorded a pick of both, in a single-pick set too. Nothing else reads an option's value, and two playground settings for one field apply in order, the later winning. So the board now answers a drop only where exactly one member carries the column's value. A column two options name takes no drop of that card by keyboard, button or pointer, a card no column takes has its grip disabled, and a pick in the question still moves the card. A column answers Sortable's put with its board's group name, so a card still can't be dragged into another board. The unreachable keyed-reference branch in references.js goes with the fact. That leaves 26 facts and 70 fewer lines of production code.

The cost: an author who repeats a value by mistake no longer hears of it from page check or page check --render. The card draws in the shared column, which takes no drop, and the board's instructions say why. The board doesn't report a shared value because two options may share one on purpose.

Max asked for this as a trial and hasn't read the diff. A reviewer that hadn't seen the work ran pages with repeated values and found no wrong record; the pointer and grip changes above are its findings.

Tests: a browser test of the shared column by keyboard, button and pointer, which fails on the old rule; a two-board pointer test, which fails when put answers true; the board, option and preset tests by node id; 215 model tests; and pnpm run check.

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

A package example could carry sample values for the sources it binds, for
package check --render to serve. No bundled, example or site declaration
wrote one in the three weeks since #3997 added it, so the key, its
validation and the render check's per-page data store go.

Behavior changed: a worked example's bound source is always unset in the
render check, as every shipped example's already was.
Every declaration had to write x-upgrade, and in each of the tree's 76
entries it only repeated whether widgets/<tag>.js existed. Composition now
derives that from the files it composes and writes it into the vocabulary
as $modules, tag to module path: the layer's widgets/<tag>.js, or a
page's own page/widgets/<tag>.js, which wins. Readers ask upgraded() in
Python and upgrades() in the browser.

A declaration and its module can no longer disagree, so the two refusals
for that go (missing-module, and compose_vocabulary's check). What only a
module provides is still refused without one, as needs-module, wherever a
composed vocabulary is validated.

Behavior changed: a registry.json writing x-upgrade is refused as an
unknown key; a tag whose module file exists is upgraded.
A widget entry is a JSON Schema over its attributes. With x-upgrade
derived, x-content was the one Leaf key every entry still had to write,
and 28 of the tree's entries wrote the value HTML gives any element: the
author's markup. Composition now writes that default into each entry
(complete_declarations), so readers still read a complete declaration, and
an entry names x-content only for members, data or empty.

Behavior changed: a declaration without x-content is valid and holds
markup.
…-name, x-language and x-tone

Three keys each mapped a widget's own attribute name onto a meaning Leaf
supplies: the element's title, a code language, a tint. Every declaration
in the tree named the same attribute for each (label 16 times, language
twice, tone once), so the names are now fixed, as HTML's global attributes
are, and documented in the registry's $attributes: a widget that takes
label is named by it, and one that takes language or tone is held to the
layer's list by declaring the attribute.

Behavior changed: lf-trace, which takes label without having declared
x-name, is now named by it. A package can no longer use label, language or
tone for another meaning.
…d-surface

The key was a constant true that said the module defines threadOutlets,
which the element itself says. Leaf now watches every tag a module
upgrades and registers the elements that have the method, over the same
arrival lifetime as before.

Behavior changed: a widget needs no registry key to seat threads beside
its data. The refusal for a declaration without the method goes with the
declaration; the widget-thread-outlets eval's rubric is reworded to match
and has not been rerun.
Removed from widget-api.js and portable-api.js, none with a consumer in packages, examples or docs: PRESSABLE, TEXT_BOX, actionName, afterScript, alignText, clockValue, dataBody, foldBlock, fragmentUrl, holdAuthoredBody, iconElement, notice, openLayer, openerOf, projectedDatum, quietSince, regionScrollBehavior, relabel, reportsPresented, revisionLabel, saidAt, shortAgo, watchReadingRegionTransitions, whenLeft, CONTRIBUTION_ENTRY_SCHEMA. Their references documentation went with them.

Implementation deleted: relabel (generatedElement plus keepsText covers it) and reportsPresented. Every other implementation stays, used by the runtime. holdAuthoredBody stays too, because authoredBody's readers in version.js and the framing render check, and the registry's x-patch text, still rest on it; with no package calling it, that mechanism is now unreachable.

Render checks and browser tests that read TEXT_BOX, regionScrollBehavior, watchReadingRegionTransitions, alignText, clockValue and the contribution grammar now read them through check-api.js; lf-suggestion imports its helpers from their owners; the work fixture's worker row reads quiet and heard from readWork, so its roster's running states now include waiting.

consumeAnnotations, placePageThreads and contributionItemKey stay exported: they are the whole surface of data-annotations=page, and removing them kills that mode.
A composition that reused the validation of unchanged declarations skipped
the needs-module refusal, so removing page/widgets/<tag>.js from under a
stateful declaration served a widget with nothing to draw it. That part of
validation depends on files, not declarations, so every composition now
asks it (validate_modules).

openLayer and openerOf return to the widget API with their reference
paragraph. No package calls them, but the widget-list-keeps-focus eval
scores an author for using them and fails one who keeps the opener in a
variable, which is what the reference said after the cut.
html, render, nothing and ten more of Lit's names were public twice: from
Lit's own module, which a package may import, and re-exported by the
widget API. Ten package and example modules already imported the first and
eighteen the second. The re-exports go, and every module, inline script
and test fixture that used them imports /vendor/lit.js.

Behavior changed: a module importing a Lit name from widget-api.js or
portable-api.js fails to load, which package check --render reports.
x-word took either a fixed word or the value module, which said the
element has an lfWord method. The method says that itself, as
threadOutlets does for a thread surface, so the three declarations that
wrote module drop the key and x-word is only a fixed word.

Behavior changed: an upgraded element with lfWord or lfSays is asked
whether or not its entry declares x-word.
A composition that reuses a validation runs in a harness hook, which loads
no schema validator, and the check it now makes there imported
registry/widgets.py and jsonschema with it. The check reads only the
vocabulary, so it lives beside MODULES in registry/contract.py.
An unpinned prettier had reflowed template expressions in seven modules
while the import lines changed. Their bodies return to main's text.
With x-upgrade gone, a module under a mistyped name, or left under its old
name after its tag was renamed, was loaded by nothing and reported
nowhere: the widget drew as plain markup and every check passed. Composing
a layer now refuses a widgets/lf-*.js that no declared tag is named for
and no module imports, and a page's own declarations refuse a
page/widgets/lf-*.js the same way (unnamed-module).

Behavior changed: removing a widget's declaration means removing its
module file too.
A page now writes HTML's names for three attributes that carry HTML's meaning:

- `<lf-options required>` makes a group take the user's pick (was `choose`).
- `<lf-option selected>` marks an option the version carries as picked (was
  `chosen`).
- `<lf-draft required>` makes a draft ask the user for an edit (was `needed`).

Leaf reads no alias: `page check` refuses the old names as undeclared
attributes. No behavior changes. The verb a pick records is still `choose`, in
events, `x-awaits.value`, `x-awaits.answered.choose` and keys such as
`[ship, ship, choose]`; the attribute that verb writes back,
`x-state.choose.record.attr`, is now `selected`. A served gesture's `chosen`
field and the place preview's `data-lf-chosen` keep their names, since a page
writes neither.

Every consumer moves in this change: the registries, the option and draft
styles and modules, the examples, site pages and notes, the shipped
instructions, and the pages the tests write. Two tests named for `choose` take
the new name. Three comments said a pick mark reads "chosen"; they now say
"selected", the mark's word.

The eval fixtures and rubrics name the new attributes. They were reworded and
not rerun.
The browser read a group's authored pick from every descendant with an id that
carries the record's attribute. With the attribute now `selected`, valid HTML
reaches that scan: a native `<option id="m" selected>` inside an option's card
gave the browser a pick the server, which indexes only Leaf elements, never
read. The browser now counts only Leaf elements, as the server does.
The widget API stopped exporting Lit's names (9aaab75) and `notice`
(d59e50c), and sixteen browser and journey tests still read them off
`window.__lfWidgetApi()`. A pull request's test job runs a browser test only
when its own source changed, so one of them ran there and failed, and the rest
would have failed after landing. They now take Lit's names from /vendor/lit.js
and `notice` from check-api.js, which gains that export. No assertion changes.

Main's new allocation test (#5820) asks with `required`, as pages now do.
Three conflicts. In addressable-names.js, main's new `titledElement` block goes
in above `declaredName`, which keeps the branch's reading of `label`. The
feature gallery's wide option group and the option group's instructions take
main's additions under the branch's names (`required`, `selected`).

Three of main's new lines still used names the branch removed: a runtime test
declared `x-name`, module-reading.md named it, and a journey's page asked with
`choose`. They now use `label` and `required`.
A pull request's test job runs a later-tier test only when its own source
changed, so these ran only in a dispatched run of every tier:

- The projected-link test adds `keepsText` to its fixture module's import by
  string replacement, which matched nothing once that import was respaced.
- The portable-element test took Lit's `html` from portable-api.js through a
  dynamic import; it now takes it from /vendor/lit.js.
- The rendering-jobs test read `afterScript` off the widget API by a computed
  name; check-api.js now exports it and the test reads both entries.

No assertion changes.
Nine conflicts. In `addressable-names.js`, main's new function tail goes above the
branch's reading of `label`. In `options.css`, main's `--lf-` tokens stand under the
branch's `[required]` and `[selected]` selectors. Seven test files conflicted because
main moved the tests the branch had edited to `tests/journeys/` (#6038); the moved
copies take the branch's edits, and `test_a_widget_module_under_another_name_is_refused`
stays in `tests/model/`.

Main's new lines move to the branch's names: `choose` and `chosen` in the test,
eval and stills sources main added or moved become `required` and `selected`.

`afterScript` returns to the portable API, since main's `lf-tabs` now imports it, and
leaves `check-api.js`, which had kept it for tests while nothing else read it.
…moved test

The export-documentation test holds every public export to a module reference, and
the branch had removed afterScript's passage with its export.
…x-patch

x-patch: members said that a module builds beside its widget's direct
authored children, so a revision may edit inside them in place. Only the
browser acts on it, when it patches a revision into an open page, and
every declarer has a module. The module now says it as a static field of
its element's class, `static lfPatch = "members"`, which version.js reads
from the tag's defined class as answer.js reads `answerWords`. lf-tabs,
lf-deck, lf-pane, lf-worktree, lf-worktree-diffs and lf-motion declare it,
and lf-parts inherits it from lf-tabs.

The module of every widget standing in the page has run before a patch
asks: startup awaits each import before it starts the state feed, and an
activation awaits the arriving revision's. With lf-tabs.js held back, a
revision stamped meanwhile waited, then edited the open tab in place.

The schema held x-patch to x-content members or markup, and to a tag with
a module. A class field needs no module check. The content rule follows
the fact to its reader: version.js honors the field only where the content
is the author's, so a widget that draws its own data is still replaced by
a revision of that data. Without the rule such a widget kept a drawing of
the old text beside a <pre> holding the new.

Behavior changed: x-patch is refused like any unknown key, and a data or
empty widget whose class declares lfPatch is replaced whole rather than
refused at composition. The registry test of that refusal becomes a
browser test of the replacement.
x-retired-when, on a member, named the outcome of its owner's decision
that removes it, and x-withdrawn-as, on the owner, the outcome that
declines the proposal without closing its thread. Both qualify the
owner's one deciding verb, so they move into that verb's declaration
under x-state, beside `decides`: `retires` maps an outcome to the member
tags it removes, and `withdraws` names the declining outcome. The server
still reads both from the registry. `$decisions`, which the browser
reads, keeps its shape and is now a copy of the verb's `retires`.

    "decide": {
      "decides": true,
      "retires": { "accept": ["lf-old"], "reject": ["lf-new"] },
      "withdraws": "reject",
      ...
    }

Validation keeps what it held. `withdraws` and each `retires` outcome is
a value of the verb's `outcome` field (withdraws-outcome,
retires-outcome, for withdrawn-as and retired-when). Each retired tag
declares the widget among its x-owners (retires-member), where the
schema required x-owners of a member declaring x-retired-when. The
schema admits both fields only on a verb that `decides`. The rule that
every owner of a retiring member decides that outcome goes with the
member's claim: each owner's verb now names what it retires, so no
member can retire under one owner and be undecidable under another.

Behavior changed: x-retired-when and x-withdrawn-as are refused like any
unknown key. A layer that adds a retiring member to a widget another
layer declares restates that widget's entry, where it used to declare the
key on its own member. The test of a parent and its members reporting a
verb without outcomes in one run goes, since one declaration now holds
both. retirement_holders no longer carries `withdrawn_as`, which nothing
read.
x-measured tied a value in authored content to the data run that produced
it by naming an x-data input and the attribute holding that run's
receipt, so the input was named twice. The input now carries the fact
itself: `measured` names the receipt attribute, beside `source`.

    "x-data": {
      "measurement": {
        "contract": "measured-scalar",
        "source": "source",
        "measured": "run"
      }
    }

Validation keeps what it held of the join: the input's source attribute
is required (measured-source), the receipt attribute is required and a
nonempty string (measured-run), and no value record writes it
(run-written). That x-measured names one of the widget's inputs
(measured-input), and that it needs x-data, are now true of every
declaration, so both checks go. A child a `creates` verb adds still
can't be measured, since it can't declare x-data.

Behavior changed: x-measured is refused like any unknown key, and each
input of a widget may be measured, where a widget had one x-measured.
One conflict, in the generated contract types: main changed the served state's line
and the branch the verb's and the declaration's, so each line takes the side that
changed it.
82df91c moved x-retired-when off the member and onto its owner's
deciding verb, as `retires`. A review found what that cost. A layer adds
a member to a widget another layer declares, and an entry replaces the
earlier one whole. So two layers that each restated lf-suggestion to add
a retiring member were both admitted, and the later entry dropped the
earlier layer's member, which then never retired; reversing the order
dropped the other. With x-retired-when on each layer's own member, both
retire in either order. The pair was also stated twice, in the member's
x-owners and the owner's `retires`, with a check (retires-member) to
hold them together, and the move added lines without removing a
mechanism.

This restores x-retired-when as it stood before that commit: its $keys
entry, its schema and x-owners requirement, the retired-when check that
every owner decides the outcome, `$decisions`' derivation from the
members, and the readers in construction.py, passages.py and
projection.py. `retires`, retires-outcome and retires-member go.

`withdraws` stays on the verb with withdraws-outcome, since the outcome
that declines the proposal is the owner's own fact, so x-withdrawn-as
stays gone.

Behavior changed: a member again declares the outcome that retires it,
and a `retires` on a verb is refused like any unknown field. A new test
composes two layers that each add a retiring member, in both orders.
…erence room

The "Revisions" section of module-authoring.md said what Leaf compares
when a class declares lfPatch, but not what follows for an author: a
module that draws from which children it has, or from their attributes,
declares `x-content: members` or `x-views`, or it keeps its first
drawing of a child a revision changed. The First-paint bullet folded
into the section said so, and the section says it again.

The file stood 5 characters under the 30,000 a skill file may hold, so
its next edit would have failed. It now has 383 to spare. What went
repeated its neighbour, another reference or the registry:

- that kernel implementation lives outside the helper surface, beside
  "don't import the runtime's other modules";
- starting later drawing in `updated()`, which module-state.md, "The
  widget controller", owns and "Drawing what a widget reads" now points
  to;
- `PendingTaskEvent` for either host, which "A widget that also runs
  off Leaf" gives;
- how delivery shows a view member before modules load, and what a
  shadow root attached without x-shadow loses, both in the registry's
  entries for those keys;
- how a fold opens, which module-scroll-and-motion.md, "Travel and
  history", owns.
holdAuthoredBody let a module move its widget's authored children into a
wrapper of its own and have a revision patch them there. d59e50c took
it out of the widget API, and since then only a runtime test called it,
so no module could register an authored body and every reader of one saw
none.

What only it reached goes with it: `authoredBody` and its store, the
patch's `body` rule and `holder` in dom-children.js, the authored-body
term in version.js's `reachesMembers`, the check API's re-export, the
allowance the apparatus-among-authored render check made for boxes a
module built around an authored body, and the two runtime tests of the
helper and of the patch writing inside such a body.

Behavior changed: none a page or package could reach. A widget whose
module moves its authored children out of their place is still replaced
whole when a revision changes it, as before.
One conflict, in : main reworded how a question answered in words leaves
On Me, and the branch names a draft's attribute  in the same paragraph. Main's
wording stands, with .
Main now holds this branch's settled cuts, squashed as #6134. Two conflicts, where both
sides made the same cut and the branch also carries the rename: the branch's lines stand.
What separates the branch from main is now the rename alone.
Main holds everything this branch changed: the registry and API cuts landed as
#6134, the comment-box fold as #6105, and #6234 carried the rename to `required`
and `selected` with the pick scan that counts only Leaf elements, and let an
option group ask with no attribute. The merge therefore takes main's tree whole.
A measured trial for a design decision, not a change proposed for main.

A board card with `shows` is a view of another widget's answer. The registry
declared that as a public fact (`shows: {reference, value}` on `lf-card`,
`awaits.key` on `lf-options`), and core Python carried its rules. This trial
makes it the board package's own behavior:

- The `shows` fact and `awaits.key` leave `$keys`, `$awaits`, the declaration
  schema and every Python reader. `lf-card` keeps `shows` as an attribute and
  in `refers`, so `page check` still requires it to name an element.
- `shown_answers.py` is deleted with its findings (`shows-no-answer`,
  `shows-without-open`, `shows-untakeable`, `shown-elsewhere`), as are
  `shows-outside`, the append door's `shown-unit` refusal and the registry
  lint's `shows-reference`, `shows-value` and `awaits-key`.
- `runtime/shown-answer.js` and its `shownAnswer` export move into
  `lf-board.js`, built on the public widget API (`widgetController`,
  `declarationFor`, `elementById`, `authoredScope`). The module reads the
  card's `shows` attribute and the `value` attribute of columns and picked
  members directly.
- Since the door no longer refuses a board move of such a card, the module
  never sends one: a card with `shows` moves only through the answer it
  shows, and one that shows no answer stands where the markup puts it and
  takes no move.

Behavior that changed: `page check` no longer advises on or refuses the five
markup cases above, the door admits a position move of a card with `shows`
(the page still draws the card by its answer, at the move's rank), and the
package references no longer describe views of an answer.

Tests: `test_shown_answers.py` and the registry lint cases for the removed
facts are deleted with the rules they held, and a browser test holds the two
rules the module now keeps alone.
… for what a declaration holds

`shows` is no longer a fact: the board's module alone holds a card to the answer
it shows. The board now reports a card whose `shows` names no element in its page
or message, or a widget whose answer it can't show, with `reportFailure`, once per
card. `page check` no longer refuses that card; `page check --render` fails on the
board's report, and the agent hears it as the page's error when the page is opened.

The registry's description of a fact and packages.md, "A widget", now state the
rule the maintainer picked on 22 November: a fact is declared only where some part
of Leaf must act on it without running the widget's module and the module can't
enforce the same rule itself. `lf-card`'s instructions say what `shows` may name,
which the removed `page check` findings used to say.

Tests: the test of a card whose `shows` names a group now asserts the board's
report reaches the browser and the log once.
…kes no drop

`unique` is no longer a fact. It mapped an attribute to the owner tag within
which the attribute's value had to differ, and `page check` and message markup
refused a repeat (`repeated-key`). Two declarations used it: an option's `value`
within its `lf-options`, and a playground setting's `for` within its preset. The
maintainer's rule keeps a fact only where the server, `page check` or the first
paint must act on it and the widget's module can't enforce the same rule itself.

What a repeat does, run on a scratch page with the check off:

- Two settings of one preset `for` the same field: the later one applies. The
  preset sends one `tune` with that value and reads as pressed. Nothing needs
  enforcing, so the playground's module is unchanged.
- Two options with one `value`: nothing but a board reads an option's `value`,
  for a card that `shows` the options. A pick of either option stood the card in
  that value's column, as the board's header already describes. A drop of the
  card on that column sent `choose` with both options, the server admitted it,
  and a single-pick question recorded two picks the user never made.

The board therefore answers a column's value only where exactly one member
carries it (`detailFor` in `shownAnswer`). A column whose value several members
carry takes no drop of that card and offers no button, as a column the widget
has no answer for already did, and the user picks among those options in their
own section. So two options may now land a card in one column, which `page
check` used to refuse. Answering with the first such option was the
alternative; it would record a pick the user didn't make.

Also removed, dead since #6231 took keyed references out of the `refers` schema:
the keyed branch of `referencedProjection` (`browser/runtime/references.js`),
which read `unique`, with its runtime test, and the `key` test on an input's
reference in `registry/widgets.py`. `member_holders` and `enclosing` in
`validation/instances.py` had no caller left.

A declaration that still holds `unique` is refused as an unknown key.

Tests: the product test of the refusal keeps only the id a preset must carry.
The registry-door test of keys that name attributes trades its `unique` row for
`prepaint`. A board test covers the column two options name, and fails on the
old rule.

> _This was written by Claude Code on behalf of max-sixty_
…ent-af8aae45f226f8ce4

# Conflicts:
#	tests/browser/widgets/test_boards.py
`page check` no longer refuses two options of one `lf-options` that carry the
same `value`, and the board takes no drop of a card on the column they name. An
author who writes that shape has no check finding to learn it from, so the
`lf-board` instructions state it beside the sentence on drops. The sentence
states what the markup does and sets no rule, so it was not scored.

> _This was written by Claude Code on behalf of max-sixty_
leaf-agent
leaf-agent previously approved these changes Nov 22, 2026
…fact rule where a maintainer reads it

A fresh review of the `shows` removal found what the author is no longer told.

The board now also reports a card showing a widget none of whose members
carries a `value`: such a card can follow no pick, and both checks were silent
about it. Both fault texts say what to write instead. An empty `shows` is again
no `shows`, so the board moves that card itself, as on main.

The rule for what a declaration may hold moves to browser/AGENTS.md, "The widget
vocabulary stays open": only Leaf adds a fact, so a package author has no use
for it. `$keys` and packages.md go back to describing why a fact is declared,
and packages.md keeps the package author's half, that a markup rule no fact
states is the module's to check and report. `lf-card`'s instructions now say
that nothing reports a bad card in a message before the user opens its thread,
and the board's header records that the user chose module-only keeping, with
the alternatives.

Scored the AGENTS.md passage on 22 November with a scratch A/B, three runs an
arm on Sonnet: asked where to keep "rows of one ledger have distinct accounts",
both arms chose the module 3 of 3, so the passage shows no effect on a plainly
stated case. Two control runs with the passage kept a logged value's range in
the verb's schema.

Tests: two browser tests, for an answer that names no one column (a value no
column holds, and picks of a `multiple` question that differ) and for the new
report with an empty `shows`.
…ent-af8aae45f226f8ce4

# Conflicts:
#	tests/browser/widgets/test_boards.py
The header said a column the widget has no answer for takes no drop. Since a
column whose value more than one member carries takes none either, the sentence
now names both cases.

> _This was written by Claude Code on behalf of max-sixty_
leaf-agent
leaf-agent previously approved these changes Nov 22, 2026
A review of the rule that a column two options name takes no drop found three
places where the board still offered what it wouldn't accept.

A pointer drag opened a slot in such a column, and on release nothing was sent
and the card flew back. Only the arrows and the destination buttons asked
`#takes`. The columns' Sortable group now has a `put` that asks it too, so a
column opens a slot only for a card it takes. Sortable doesn't ask the column
the drag began in, which always takes its card back, and a card the board places
itself still drops in any column.

A card could have a live grip and nowhere to go, as where each column with a
value is named by two options and the card stands with the undecided: a grab
announced the arrows and no arrow moved it, and on a phone "Move to" stood over
no button. `#movable` now also requires a column other than the card's own that
takes it, so that grip is disabled, and the destinations group hides when every
one of its buttons is hidden.

The `lf-board` instructions' sentences on a shared `value` are replaced with the
reviewer's wording, which says the user picks in the question. The module header
states the rule for a column with a value as "only when exactly one member
carries that value", limited to answers that pick members, since a column
without a value still takes a drop, which clears the pick.

Tests: `test_a_column_two_options_name_takes_no_drop` now also drags the card
over the shared column with the pointer, on a clock the test runs forward past
Sortable's 50 ms drag-over loop, and drops it on the undecided column; and it
holds a second card that no column takes to a disabled grip and hidden
destinations. Each of the three changes fails the test when reverted.

> _This was written by Claude Code on behalf of max-sixty_

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function form of put lets cards cross between two boards on a page. That breaks the "two boards on a page don't cross-drag" guarantee the comment above it still states. Sortable's toFn returns value === true for whatever a function put returns, with no check of the group name (packages/default/vendor/sortable.esm.js, function toFn). Before, the group string board-${this.id} kept boards apart through that name match. Now any board's column accepts a card from another board whenever #takes agrees, which is always true for a card without shows.

I reproduced it with a page holding boards a and b, one card each. A pointer drag of #card-a over #b-todo leaves the card's live parent as b-todo at this head and a-todo at 6116c20. With the suggestion below, it stays in a-todo, and test_a_column_two_options_name_takes_no_drop still passes. Nothing in tests/ covers two boards, so a two-board case beside the new pointer test would pin this.

Comment thread packages/default/widgets/lf-board.js Resolved
@leaf-agent
leaf-agent dismissed their stale review November 22, 2026 22:00

Superseded by the review on a later commit.

The function form of `put` replaced Sortable's group-name match: Sortable
takes `true` from a function as "any board", so a column of board `b` opened
a slot for a card dragged from board `a` whenever `#takes` agreed, which it
always does for a card without `shows`. The reviewer reproduced it with two
boards of one card each.

A column that takes the card now answers with the group's own name, which
Sortable matches against the board the drag began in. A two-board pointer
test pins it; it fails with the `true` answer.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test job is red at this head, and this push caused it: tsc --project browser/types/tsconfig.json rejects the new put at lf-board.js(849,11) with TS2322, because @types/sortablejs declares PutResult = readonly string[] | boolean and the function now returns string | false. Sortable's toFn also matches an array (value.join && value.indexOf(otherGroup) > -1), so returning [group] passes the type check and keeps the same per-board match that test_a_card_stays_in_its_own_board covers.

Comment thread packages/default/widgets/lf-board.js Resolved
@leaf-agent
leaf-agent dismissed their stale review November 22, 2026 22:13

Superseded by the review on a later commit.

Sortable matches a string and a list of group names alike, but its types
take only a list or a boolean, so the string answer failed the runtime's
type check.
leaf-agent
leaf-agent previously approved these changes Nov 22, 2026
Base automatically changed from fable-package-interface to main November 23, 2026 03:38
@max-sixty
max-sixty dismissed leaf-agent’s stale review November 23, 2026 03:38

The base branch was changed.

# Conflicts:
#	browser/types/contract.d.ts
#	packages/default/widgets/lf-board.js
#	src/leaf/validation/instances.py
#	tests/browser/widgets/test_boards.py
@max-sixty
max-sixty merged commit 4f9390d into main Nov 23, 2026
9 of 10 checks passed
@max-sixty
max-sixty deleted the agent-af8aae45f226f8ce4 branch November 23, 2026 04:18
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