Repository navigation
Conversation
…Leaf's own A widget module that also runs on a page without Leaf imports only `/runtime/portable-api.js`. `module-authoring.md` tells every widget to ask `quoted(element)` before it wires input, and only `widget-api.js` exported `quoted`, which can't load off Leaf. A portable module that followed the rule therefore either imported `quoted` from the portable file, which fails to link on every page, or imported `widget-api.js`, which works on Leaf and throws on a plain page, where `window.lfStorage` is undefined. In November 2026 six agents each wrote a widget package from the shipped references, and three of them wrote portable modules that broke this way, on `quoted` and on the drafting text field. `portable-api.js` now exports `quoted`. leaf-element.js holds the function beside the capabilities Leaf installs for `LeafElement`. On a Leaf page it gives widget-descriptors.js's answer; on a page without Leaf, where no registry declares an exhibit, it is false. `widget-api.js` re-exports the portable file whole, so it exports the names it did and every existing import keeps working. The portable file's import closure gains no module. The drafting text field stays Leaf's own. Its tag's home loads off Leaf, but its element (composing/text-field.js) reaches about 45 runtime modules outside the portable file's closure, `wireInput` belongs to the application, and the page's server keeps the drafts, so off Leaf it would mean nothing. `module-input.md`, "Text entry and drafts", now says that where a portable author meets the field, and that a portable widget's text box is a native control. tests/runtime/exhibit-fence.test.mjs holds the portable `quoted` to false before Leaf installs its capabilities and to Leaf's answer after, and tests/smoke/test_plain_page.py asks it on a page without Leaf.
leaf-agent
previously approved these changes
Nov 23, 2026
…ule lives module-input.md has 38 characters left under the size a skill file may be, so the note that the field loads only on Leaf goes in module-authoring.md, "A widget that also runs off Leaf", which owns what a portable widget may import.
leaf-agent
approved these changes
Nov 23, 2026
This was referenced Nov 24, 2026
Merged
Owner
Author
|
Superseded by #6946, which removed
|
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.
quoted(el)now loads from/runtime/portable-api.js, so a widget written to run off Leaf can follow the rule every widget is given, to checkquoted()before wiring input. Before this it was exported only bywidget-api.js: importing it from the portable file failed to link on every page, and importingwidget-api.jsbroke the module on a page without Leaf. Three of six trial authors writing from the shipped references hit one or the other. Off Leaf nothing declares an exhibit, so it answers false; on Leaf it gives Leaf's answer through the seamLeafElementalready uses for its reading and controller.The drafting text field stays Leaf-only, since its editor and its drafts are Leaf's runtime and server;
module-authoring.md, "A widget that also runs off Leaf", now says so and names a native control as the text box to use instead.To weigh. The portable file gains one export (85 to 86);
widget-api.jsexports the same names as before, and the portable closure gains no module. Three other helpers the references tell every widget to call (says(),named(),motion) are still Leaf-only, and a failed import still shows in the render checks as a 240 s timeout that names no module; both are left for separate changes.Tests. A runtime test holds
quotedto false before Leaf installs its capabilities and to Leaf's answer after, and the plain-page smoke test asks it on a page without Leaf.pnpm run test:runtime(1086),pnpm run check:browser, pre-commit and the focused browser tests pass.