Repository navigation
Keep generated package members under their authored owner - #2900
Merged
Merged
Conversation
…racts Custom packages and authored widgets retain independent capabilities. Creates targets are presentation members of their parent, with their own semantic services refused at registry validation. Repair authored state ownership and membership rendering, native module delivery, shadow preparation, and asynchronous package-check failures.
Keep main’s global module delivery and read-driven presentation. Preserve parent-owned generated members, publish complete record membership through widget readings, and validate physical attribute ownership in authored and moved compositions. Focused model/runtime/framework and source/compiled lifecycle proofs pass; Astra review has no unresolved findings.
Remove duplicate export coverage and repeated flat-creation history, undo, and capability variants. Reduce shared ownership fixtures and exercise asynchronous render-check rejection through the shared browser fixture. Preserve current-membership admission and repaint regressions; disposable fault controls verify their failure sensitivity.
# Conflicts: # skills/leaf/scripts/leaf/validation/instances.py
Reserve declared LeafElement paints synchronously with controller claims so a late-upgraded position parent moves members before their destination selection renders. Preserve explicit defer and disconnect using coordinator-owned open tickets. Retain one mixed served regression; its selection assertion fails when synchronous reservation is removed.
leaf-agent
approved these changes
Oct 14, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 14, 2026
…claimed update #2900 put LeafElement updates in the parent-ordered presentation queue, which runs every widget before the document-wide renderers, so lf-suggestion's fold measures its slot before the layer retires it without drawing inside the publication. A move draws in that queue again. drawing(work) on an update no move claimed, as lf-diff's retry after a cut rendering and lf-pr-brief's draw after its Markdown loads are, claims the region for the work, so presentation and the data version still wait for it. The two claim sites share one #claim(). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 15, 2026
…Element (#2912) Converts the last four widgets on the controller's `subscribe`/`renderState` route or `watchData` to `LeafElement`: `lf-suggestion` (kernel), `lf-trace` (playwright package), `lf-diff` (diff package; its inline patch stays on `readingPaint`) and `lf-visual-review` (visual-review package). After this, no widget subscribes to its controller or calls `watchData`; a following PR deletes those routes, the tests' inline widgets that still use them, and the module-authoring references. ### `LeafElement` - **`drawing(work)`** holds an update's claim until asynchronous drawing it started lands, as `watchData`'s awaited callback held the data version: `lf-text-document`'s highlighting and preview, `lf-pr-brief`'s Markdown load and highlighting, and `lf-diff`'s patch rendering. An update no move claimed (a retry, a draw after a load) claims the region for the work. This replaces joining the data version on the widget's preparation region (#2898), which waited on anything the widget prepares, held shot images included. - **Failures on a shadow stage.** A `LeafElement` whose render root is its host but that shows a shadow stage shows a failure as that stage, as any shadow widget does; one with a light or nested render root keeps the box beside what it drew (`placesFailure` now answers whether it placed the box). - **One copy a delivery.** `this.data(input)` returns the same copy until the next delivery, so a widget tells a new delivery by identity. - Moves draw in #2900's parent-ordered widget queue, which runs every widget before the document-wide renderers; that is what lets `lf-suggestion` measure the slot it folds before the layer retires it. ### Widgets - `lf-suggestion`: `setup()` holds the once-only build; `connectedCallback`/`disconnectedCallback` re-offer and unregister its margin contribution; `render()` draws the outcome, then refreshes the margin as its subscriber did. A paint fault is now reported as the widget's own (`<lf-suggestion id="…"> failed: …`). - `lf-trace` and `lf-diff` read their data in `render()` and show a new delivery from `updated()`. `lf-diff` forgets a rendering a departure cut short, so the return draws it again, and loses a `renderState` nothing called (it declares no state). - `lf-visual-review` draws its template from `render()` rather than `render(…, this)`, paints its inspection after a draw for the review state as `renderState` did, draws nothing for a failed source until another arrives, and drops the `defer()` its own draws no longer need. ### Tests The widgets' browser selections pass (visual review 38, diff 183, trace 28, documents and PR brief 32, drafts 72, options 52, outbox 27). Runtime tests cover `drawing()` on a claimed and an unclaimed update. Failures in those selections that also fail on `origin/main` at 58f8a06, not caused here: `test_suggestion_controls_stay_out_of_the_column`, `test_widget_controller_owns_presentation_across_values_and_lifetimes`, `test_local_work_chrome_does_not_take_its_holder_gesture`, `test_refused_reply_retains_its_live_foot`, `test_a_large_diff_filters_and_navigates_lazy_files`, `test_file_editor_saves_quietly_and_preserves_inflight_edits`, `test_a_mechanical_revision_failure_leaves_accepted_publication_ready`, `test_a_refused_action_waits_for_a_live_gesture_before_reconciling`, and teardown "unchanged write" errors from main's write watch. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
added a commit
that referenced
this pull request
Oct 15, 2026
The options work-chrome test in [the failed main run](https://github.com/max-sixty/leaf/actions/runs/38662520639) cannot initialize its page: #2900 made an option created by its parent ineligible to own `x-work`. The test had customized that option with `x-work`, so it stopped before exercising the click it meant to protect. The fixture now places a valid work-bearing block inside the option. Its margin entry still sits within the option's interaction context, and the test still verifies that opening the entry does not select the option; the neighboring option's normal pick and the action log remain asserted. The same focused test failed at page initialization before this change and passes with the updated fixture. No test was skipped or removed. --------- Co-authored-by: leaf-agent <[email protected]>
leaf-agent
added a commit
that referenced
this pull request
Oct 15, 2026
Update the action-admission journey to check position ownership by recorded slot. [#2900](#2900) made a column's scalar `tint` record coexist with the board's card-position record, but this test still expected the column's unrelated value to make the board's move fail. The test now expects that move to be admitted and adds a column position recorder that must still reject the board's move. The [scheduled main CI run](https://github.com/max-sixty/leaf/actions/runs/38723388285) failed the old `recording-column` case. Locally, it failed before this edit; all three cases pass afterward (`3 passed`). Co-authored-by: leaf-agent <[email protected]>
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.
User-created members belong to their authored widget: they retain presentation and parent-owned state, while independently authored widgets and custom native JavaScript packages keep the full declared interface. This removes independent generated-owner capabilities from the contract and records extensibility in Leaf's existing core principles.
Unfamiliar package compositions exposed state ownership failures: a member's scalar state could steal an ancestor's selection or placement, moved members could retain the old owner's selection, and newly created IDs could collide across page and frozen thread content. Admission, reconstruction, and rendering now use the declared physical owner and current membership. Conflicting attribute slots are refused at the composition boundary. Both controller and LeafElement renderers join one parent-ordered presentation queue, so a moved card reaches its destination before that destination paints its selection.
Declared creation also prepares shadow rules before the first member exists, and package render checks surface failed asynchronous painting. Public module-state and package-data references describe the simplified contract. Exploratory matrices and duplicate delivery tests were removed; retained coverage protects distinct failures, including one served mixed-renderer regression verified by removing the ordering repair.
Validation: Astra independently reviewed the final repairs and matching 33-stage source/compiled package journeys, including creation, installation, checking, actions, state, revisions, undo, saved reload, export, and shared runtime identity. Focused model, framework, runtime, browser, committed-bundle, and lint checks pass. CI supplies the broader landing gates.