Repository navigation
Document synchronous template rendering for package widgets - #2377
Merged
Merged
Conversation
Use public render for same-turn paints and keep package widgets on HTMLElement with widgetController. Retain the repeat iframe/editor restriction because the native Lit adaptation was skipped in #2324. Paired Codex widget-list-keeps-focus eval: base and candidate each passed one sample; both used synchronous render and keyed focus recovery. No success-rate improvement claimed. Focused hooks and independent integration review passed.
leaf-agent
approved these changes
Oct 11, 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.
The module-authoring reference now states which renderer fits Leaf's timing contract: public
render()for a paint that must land in the current turn,LitElementonly for runtime faces that permit a microtask delay. Package widgets remainHTMLElementconsumers ofwidgetControllerrather than keeping a reactive semantic-state copy. The same section owns template container and native-node retention guidance, and runtime maintainer instructions point to it.Survey item #6. Runtime implementation is unchanged. The restriction on
repeatrows holding iframes or editors remains: sibling #2324 landed Leaf and Sortable native moves but explicitly skipped the Lit adaptation after stability failures. Lit still uses ordinary insertion; the guidance describes that current boundary.Measured source lines:
Validation: paired Codex authoring evaluation of an immediate receipt after list removal passed on both base and candidate (one sample per arm). Both traces loaded module-authoring.md and both answers used synchronous public render with keyed focus recovery. This validates the documented route; it does not establish an improvement in agent success rate. The existing eval now grades that receipt and drops a stale file-read assertion whose referenced helper no longer exists, consistent with the evals' behavior-only contract. Focused instruction and eval checks passed; independent review found no remaining issues.