Repository navigation
Export createRef and refresh the browser protocol contract - #2533
Merged
Merged
Conversation
leaf-agent
commented
Oct 12, 2026
leaf-agent
left a comment
Collaborator
Author
There was a problem hiding this comment.
CI currently blocks this head: test stops at check:browser with “Stale protocol contract,” and the dependent lint check fails. The base tree declares event protocol 2 in registry.json, while build/browser/protocol-contract.d.ts still names protocol 1; this PR changes neither file. The createRef export and its focused API test pass review.
leaf-agent
force-pushed
the
fix/ci-38214399140
branch
from
October 12, 2026 07:19
4e5951c to
d38b41b
Compare
max-sixty
added a commit
that referenced
this pull request
Oct 12, 2026
Branch protection now requires `test`, the combined CI gate. Remove the temporary `lint` dependency check used to land the rename while the old requirement was still active. Also regenerate the protocol baseline introduced by [PR #2505](#2505). That change landed a protocol-1 baseline after the registry had already moved to protocol 2, causing the cleanup PR's browser build to fail with `Stale protocol contract`. The canonical build refreshes the baseline for protocol 2; no other generated output changes. Reuse the reviewed correction from [PR #2533](#2533): export `createRef` from the widget API so the website can bundle `lf-trace`, and check that widget imports resolve through the API. That PR was blocked by the same stale protocol baseline; combining the corrections lets the cleanup clear both CI prerequisites. Validation: `pnpm run build:browser`, all 361 runtime tests, the focused widget API test, pinned actionlint, YAML validation and `git diff --check` passed. > _This was written by Codex on behalf of max-sixty_ --------- Co-authored-by: leaf-agent <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 12, 2026
… test #2533 added to the deleted Python test a check that every name a behavior module imports from widget-api.js is exported; tests/runtime/widget-api.test.mjs now holds it, reading package, kernel-widget, example and fixture modules (HTML module scripts included) with acorn. createRef joins the documented Lit exports, and main's first-paint section now names keepView and tabStore. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 12, 2026
…he two agree (#2538) widget-api.js is the helper surface package behavior modules import, and module-authoring.md documents it for package authors; 83 of its exports were named nowhere in that reference. Each export is now one of two kinds, read from the module's source: exports above its `// Internal:` comment are the authoring API and are documented in module-authoring.md, and exports below it serve Leaf's bundled packages and kernel widgets alone. Of the 83, 71 are now documented in the section that owns their topic, 11 moved below the marker (mountSample, dressSamples, wear, landInThread, threadInput, setRuntimeRootStyle, removeRuntimeRootStyle, shownParts, renderRetired, textNodesUnder, isPagePaint), and offerElement left the surface because nothing imported it from there. The new tests/runtime/widget-api.test.mjs parses widget-api.js and the importing modules with acorn and fails when an authoring export is undocumented, an internal export is documented or has no bundled importer, a behavior module imports a name the module does not export, or the reference calls a helper it does not export. It replaces test_every_widget_api_export_has_a_behavior_module_reader, including the import check #2533 added to it. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[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.
Export Lit's
createRefthroughwidget-api.jssolf-tracecan be bundled for the website. The failed publish run stops becauself-trace.jsimportscreateReffrom that API, while the API exports onlyref. The browser runtime already exports both names.The existing widget API test now checks that every name imported by a behavior module is exported. It failed with
['createRef']before the fix and passes after it. The site build produced all 105 pages locally, andpnpm run test:runtimepassed.This PR also refreshes the generated protocol contract. PR CI could not reach the site gate because the earlier contract from #2505 no longer matched #2506's event names;
node build/browser/build.mjs --checkfailed onmainandpnpm run check:browserpasses with the regenerated contract. #2536 carries the same contract refresh alongside its workflow cleanup, but its own site gate failed on the missingcreateRef. Including both repairs here lets the requiredtestcheck verify and land them together.