Repository navigation
Expose Lit template helpers through the shared browser facade - #2321
Merged
Merged
Conversation
leaf-agent
reviewed
Oct 11, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The new public ref route exposes a reproducible crash with Leaf's pinned lit-html 3.3.0. The inline suggestion removes it from the widget API; the helper list in module-authoring.md should match.
leaf-agent
approved these changes
Oct 11, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 11, 2026
The banner status view renders one template with refs, classMap, and a native popover target. Approval renders directly into its toolbar button with synchronous attributes, removing the child component that wrote its parent. Publication links remain ordinary links outside the disclosure. Phone notices keep a fixed first-line position when background news changes from two lines to one. Survey item 13. Measured source: banner-status-view.js 171 → 192, banner.js 890 → 899, banner-approval.js 67 → 0; total 1,128 → 1,091 (−37), plus four stylesheet lines for the stable phone notice slot. The survey underestimated formatted template size. The dot export was unused, but its getter serves favicon coloring and is retained. The layout test now protects publication links and keyboard disclosure rather than requiring node identity across the page-lifetime publication branch. Template helpers use the shared facade from #2321. The notice slot reserves two lines and top-aligns news while keeping ordinary status centered. Previously a shorter notice moved down by half a line; retaining its Text node exposed that existing layout defect. The regression reproduces the 8.73px movement before the fix and now passes. Validation: focused status, publication, approval, favicon, phone-notice replacement, and the 390px primary-package browser journeys passed. Independent source review and 323 runtime tests passed. CI runs the complete landing gates. > _This was written by Codex on behalf of max-sixty_
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.
Package and runtime templates can import the Lit helpers they need through the shared facade: nothing, live, ref/createRef, classMap, styleMap, guard, svg/mathml, when, ifDefined, keyed and unsafeHTML. The widget API keeps Leaf’s focus-preserving render wrapper, and the runtime no longer imports Lit directly. This re-exports the existing vendored singleton and keeps the dependency pin. The Lit build backports upstream #5218 so optional ref(undefined) survives disconnect/reconnect; lit-html stays at 3.3.0 to avoid the repeat marker leak. The authoring reference explains when live restores an application-owned native value after a refused gesture.
Survey item 2. Measured source lines: browser/index.ts 12 → 23; widget-api.js 250 → 267; widget-elements.js 595 → 595. These are API additions, not a line reduction; generated facade and build assertions are also updated. The ref backport grows browser/build.mjs from 306 to 326 lines.
Validation: focused browser-build tests (7 passed), runtime tests (313 passed), served base/candidate startup comparison, and optional-ref lifecycle regressions in Node and Chromium.