Repository navigation
Give playgrounds one working state across inline and shared controls - #3000
Merged
Merged
Conversation
# Conflicts: # examples/corpus.html # examples/data-explorer.html # skills/leaf/assets/registry.json # skills/leaf/assets/styles/components/controls.css # skills/leaf/packages/playground/initial.js # skills/leaf/packages/playground/instructions/author.md # skills/leaf/packages/playground/registry.json # skills/leaf/packages/playground/theme.css # skills/leaf/packages/playground/vendor/lf-playground-initial.js # skills/leaf/packages/playground/widgets/lf-playground.js # skills/leaf/references/page-authoring.md # tests/model/test_interact_product.py # tests/runtime/initial-render.test.mjs
Replace contributor read/apply/notifier models with immutable slice handles and synchronous retained views. Cut every maintained consumer over together, keep the initial drawing pass, and preserve canonical choice identity and native editor state. Adapt existing state and example journeys instead of adding an API test matrix. Add one required-view failure contrast, exercise a genuine reconnect and native undo across reordering, remove redundant event-count probes, and repair the prepared-install helper to re-export the current widget API.
leaf-agent
previously approved these changes
Oct 15, 2026
leaf-agent
approved these changes
Oct 15, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 15, 2026
#3000 intentionally holds projected values until contributors register. The old browser case seeded an admitted `choose` action with an extra value in a page using the generic playground registry, then expected the browser to reject that value. Its expectation is obsolete: the value can belong to a contributor that joins after projection. Remove the case. `test_playground_keeps_contributor_drafts_until_reset_or_a_new_choice` already checks an admitted choice before contributor registration and the pending slice through undo; `test_notification_playground_admits_only_its_exact_page_configuration` checks that a page with an exact value schema refuses extra fields. Both focused cases pass locally. The obsolete assertion failed in the [main CI run](https://github.com/max-sixty/leaf/actions/runs/38708320180). #3012 separately repaired the shared control-styling cause behind 16 failures there. 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.
Playground editors previously kept private configuration models alongside the playground's aggregate. An unrelated control change could restore an older value over an unfinished edit. Give the playground one immutable working configuration: structured contributors replace named slices through
get()/set(), and synchronous subscribers draw through its existing LeafElement lifecycle. Reset and canonical choice changes restore complete configurations; acknowledgement of the same choice preserves later drafts.Cut every maintained consumer over together, including the undo simulator, and update the package's authoring contract. Keep native editor nodes during filter reordering. Preserve inline/shared composition, remove the empty rail for all-inline previews, and allow long button labels to wrap. The early drawing pass stays; clipboard permissions remain deferred.
Validation covers the runtime suite and focused browser journeys for native editing, late registration, reconnect, acknowledgement, refusal, Reset/Undo, required-view failure, early drawing, constrained layouts, and prepared install/export. Independent code review found no actionable issues; independent screen review covered desktop light/dark and phone. Existing journeys carry the state contrasts, with one added required-view failure case. No broader authoring-efficiency improvement is claimed.