Repository navigation
Correct three package references: the widget tag rule, keys in a Thread outlet, and what whenLeft hears - #6103
Merged
Merged
Conversation
…ad outlet, and what whenLeft hears A trial that built a margin widget on the public package interface alone found three places where the shipped references misled its author. `packages.md`, "A widget", now says a registry key declares a widget only when it is `lf-` followed by hyphen-separated lowercase words, and that any other key is read as an idiom's selector. No package reference stated the rule, and a widget declared as `x-margin` is refused with "idiom 'x-margin' registry: Additional properties are not allowed", which doesn't name it. `module-input.md`, "How scopes compose", said a key goes to the widgets around the focused control. A key pressed inside an outlet Leaf fills with a Thread stops at the outlet (`scopesFor` in `keyboard/scopes.js`), so the widget holding the outlet never receives it. The section now says so. `module-input.md` said `whenLeft(element, leave)` runs when focus leaves an element. It listens for the element's own `blur`, which doesn't bubble, so it hears focus leave the focused element or a host whose shadow tree holds focus, and not a control among the element's children. Checked in Chromium with `leaf-dev probe`: a scope declared on the box around a Thread outlet ran 0 times for a key pressed in the Thread and once from a control beside the outlet, a scope on the outlet ran once, and `?` opened the command reference from inside it; `whenLeft` ran 0 times for a box whose child button lost focus, once for the button itself and once for a shadow host. `leaf page check` on a page widget named `x-margin` gave the refusal quoted above. > _This was written by Claude Code on behalf of max-sixty_
leaf-agent
approved these changes
Nov 16, 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.
Corrects three places where the package references misdescribe the code. A trial that built a margin widget against the public package interface alone ran into each of them.
packages.md, "A widget", now says a registry key declares a widget only when it islf-followed by hyphen-separated lowercase words, and that any other key is read as an idiom's selector. A widget declared asx-marginis refused today with "idiom 'x-margin' registry: Additional properties are not allowed", which doesn't name the rule.module-input.md, "How scopes compose": a key pressed inside an outlet Leaf fills with a Thread stops at the outlet, so the widget holding the outlet never receives it.module-input.md,whenLeft: it hears focus leave the focused element or a shadow host, and not a control among the element's children.#5968 edits the same two files. It deletes the
whenLeftsentence, since that export leaves the public interface there, and rewords the paragraph below the new one inpackages.md, so whichever of the two lands second takes a small conflict.Max asked for this on the Leaf page about the margin. No code changes. Each statement was checked by a run:
leaf-dev probein Chromium for the key scopes andwhenLeft, andleaf page checkfor the refusal; the commit message has the readings.