Skip to content

Document synchronous template rendering for package widgets - #2377

Merged
max-sixty merged 1 commit into
mainfrom
lit-foundations
Oct 11, 2026
Merged

max-sixty merged 1 commit into
mainfrom
lit-foundations

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

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, LitElement only for runtime faces that permit a microtask delay. Package widgets remain HTMLElement consumers of widgetController rather 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 repeat rows 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:

  • skills/leaf/references/module-authoring.md: 1,295 → 1,307
  • skills/leaf/assets/AGENTS.md: 558 → 562
  • evals/widget-list-keeps-focus/case.yaml: 54 → 56

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.

This was written by Codex on behalf of max-sixty

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.
@max-sixty
max-sixty merged commit afb4355 into main Oct 11, 2026
6 checks passed
@max-sixty
max-sixty deleted the lit-foundations branch October 11, 2026 08:13
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