Repository navigation
Seat a widget's comment box through threadOutlets alone, and drop x-thread-seat - #6105
Merged
Merged
Conversation
A widget had two routes for showing a comment box and its threads inside itself. A widget declaring `x-thread-surface` answers `threadOutlets`, which served `lf-diff` and `lf-visual-review`, for threads on their data. The `x-thread-seat` registry key with `threadBox` served only the Command Hub example and test fixtures, for threads on the widget itself. This folds the second route into the first and deletes it. The protocol number and the comment event are unchanged. ## What threadOutlets gains `threadOutlets` also receives the widget's own target: a thread anchored to the widget's element and nothing inside it (`thread.seat`), and the comment box opened on the widget. A target with no `anchor.datum` is that one, and `lf-diff` and `lf-visual-review` return `null` for it. `threadSurface(owner).open(owner)` opens the box there. `lf-atlas-task` and the test fixtures declare `x-thread-surface` where they declared `x-thread-seat`. An export registers no surface, so a widget offers no comment box in one, which `threadBox` used to refuse for itself; without that, an exported Command Hub showed its Comment control. ## The hold The hold moves from the registry to the outlet. `outlet.lfHold = "Send & pause"` gives the comment box standing in that outlet a second send, whose comment carries `holds` as before. Tab keeps its native order in a box that offers one, so Tab reaches it past Send as it did in the seat's box; in every other comment box Tab still opens the other responses. `wireInput`'s `altLabel` takes a function, and `altSend` is gone: the second send calls `send` with `alternate` true. Admission of `holds` can no longer read a declaration. It now requires that `holds` names the widget the comment is anchored to, with no passage, datum or part. Before, it also required that the widget's entry declared a hold and that the widget matched its `when`, so a comment may now hold a widget whose module offers no hold. ## Removed The `x-thread-seat` key with its schema, lint (`seat-written`), instance check and render gate (`missing-thread-seat`, `missingThreads`); `threadBox` and `thread/box.js`; the page-seat drawing in `thread/inline.js` (`renderSeats`, `pageSeatThread`); the `seat` kind of message draft (`seatContext`, kept under `say:`), since the comment box keeps its draft under its anchor as it does on any element; and the `.lf-thread-seat` and `.lf-say` styles. ## What changes for a Command Hub user - A `talk` task shows a Comment control at its foot where a field stood at rest. The control, or `c` on the task, opens the comment box in its place. - The box gives way to the thread it starts and leaves the user on that thread, after Send & pause as after Send. The seat's box stayed, with the user in it. - A thread on the task has no margin entry beside the task, since the task draws it, as a diff does for a thread on a line. - One comment box is open at a time. A draft left on a task returns when its box opens there again, and Threads lists it under Drafts as it did. - An empty box the user opened stays when a thread arrives on its task. The seat's empty box gave way to the thread. ## Protocol No bump (`layer-registry.md`, "Page protocol"). The comment event keeps its shape, and the build's comparison with `protocol-baseline.json` passes. Each reader of a logged `holds` (the held mark on the widget, and the refusal to move or detach such a thread) reads the field and no declaration, and only the append door checks one, so a Leaf at this number reads a hold admitted under either rule alike. Words left unsent in a seat's box were kept in browser storage under `say:<widget id>`, which nothing reads now: they are neither listed nor offered again. A page's own package that still declares `x-thread-seat` or imports `threadBox` fails `package check`, as any change to the package API may (root `AGENTS.md`, "Pages across Leaf updates"). ## Tests The fixtures (`lf-test-task`, `lf-verdict`) seat their threads through `threadOutlets`, and tests that typed into the seat's box open the comment box by the fixture's Comment control. `test_a_widget_seats_the_thread_about_itself_and_none_inside_it` covers the new target. The cross-tab draft tests in `tests/browser/drafts/test_shared_drafts.py`, and one in `tests/journeys/test_render_drafts.py`, used the seat's box as a field that stands in every tab. They now use the reply box of a seated thread, which stands the same way, so they cover replies where they covered first comments. `test_a_harness_failure_receipt_does_not_read_as_an_answer` read a seated thread's turn off its margin entry and now reads it off its row in Threads. The journeys in `tests/journeys/test_thread_response_continuity.py` consumed the moves of the seat's box under a reply field that mirrored words resized; they now consume the moves in the frames that move the task's Comment control, which stands there instead. The hold-still matrix's `typing-pin` place parked the pointer on the seated thread's margin pin while the user typed a reply; the margin holds no pin for that thread now, so the place parks the pointer on the thread's Resolve (`typing-on-resolve`), still a control above the box that a typed field must outrank. Deleted with their subject: `test_command_goal_thread_follows_its_declaration_not_talk` (a seat followed its declared `when`, not the `talk` attribute), `test_a_thread_predicate_cannot_follow_replayed_value_state` (`seat-written`: a seat's `when` could not name an attribute a value record writes), `test_init_allows_to_drop_the_contract_of_a_held_comment` (a hold stayed readable after its declaration went), and the missing-seat half of the render gate journey (`missing-thread-seat`: a declared seat whose module placed no box). `notes/browser-support.md` records that Chromium keeps `:hover` on a node moved while hovered, which the comment box's move between an outlet and its home brings to a diff's rows and now to the outlet in a Command Hub task. Firefox 159 keeps it on neither.
leaf-agent
reviewed
Nov 16, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
I found nothing to change. This moves Leaf toward one canonical API: threadOutlets now covers the widget-itself case, and a registry key, an export, a module and their checks go. The holds admission relaxation is sound to me, since only a user gesture can set it and its effects (data-lf-held, a stopped goal, a pinned thread) stay with the widget the comment is anchored to. I'm holding the approval only because the description says an independent review's findings will land here before the merge.
…et, and give Command Hub's comment box its gap and measure Fixes from the review of the fold that seats a widget's comment box through `threadOutlets` alone. ## A thread surface with no id A thread names its widget by id, so an instance of a widget that shows threads without one could seat nothing, and a press on its Comment control threw where only a console showed it; `page check` passed with and without `--render`. The fold had removed the checks that caught this for a seat (`needs-id`, `addressable-id`). The runtime now reports the instance as a failure of its widget when it would have registered (`reportFailure`), and registers no surface for it, so its opener stays null and a control offered by it never shows. `page check` and `page check --render` fail on such a page with the page's report: "<lf-note-card> failed: a widget that shows threads needs an id on each instance, and this one has none". The check stands where an element registers, not on the `x-thread-surface` key. `module-annotations.md` says a widget that shows threads needs an id on each instance and should require it. ## A hold's notice The second send said "Replied — goal paused" for every widget, which are Command Hub's words and wrong for a first comment. It says "Commented — held until this thread is resolved": the comment, and that the hold lasts until the thread is resolved. What being held means is the widget's to say, as it labels the press. ## Command Hub's outlet Under a conversation, the task's comment box stood 3px below the conversation's own reply box and ended 61px short of it. The task's outlet now gives its conversations the comment box's measure, as `lf-diff` does in its outlet, and stands the box a gap under them (13px in Firefox), so the two fields meet at both edges and read apart. ## Tab in a box that offers a second send `keyboard/AGENTS.md` said Tab opens Other responses from every comment box. It now states the exception the fold made and why: a box that offers a second send leaves Tab its native order, since Tab is that press's keyboard route. ## Residue - `talk` on `lf-atlas-task` has a description, which the deleted `x-thread-seat` declaration used to give. - `thread/inline.js`'s header no longer names a first-message editor. - `test_a_hold_comment_can_only_hold_the_widget_it_is_about` also asserts the case the fold newly admits: a hold on a widget whose entry says nothing of threads or holds. - The stills helper `held_news` read the thread notice's `title`, which Leaf no longer writes, so `hub-seat-held-news` and `plan-card-held-news` failed; it reads the notice's count. `hub-seat-comment` is a new state for a task row's open comment box. ## Tests `test_a_thread_surface_without_an_id_reports_its_failure` holds the report, the log's error and the null opener in the browser, where the registration runs: the Node test document answers `:defined` false for every element, so no surface registers there. `test_atlas_send_and_pause_is_one_thread_fold` reads the notice's words.
leaf-agent
previously approved these changes
Nov 16, 2026
… descriptions At 390px the bar cut "Commented — held until this thread is resolved" before the part that says how the hold ends. "Held until resolved" fits, and the thread the comment started already shows it was sent. `talk`'s description had the Comment control above the conversations it stands under, and the no-id test's docstring named page state where `page check` is what reports the failure.
leaf-agent
approved these changes
Nov 16, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 16, 2026
Main gained #6105, which folds the `x-thread-seat` route into `threadOutlets` and deletes it. This branch had already dropped the `x-thread-surface` key, so the fold lands here as it did on main with one difference: a widget declares nothing. An upgraded element with a `threadOutlets` method is a thread surface, and `lf-atlas-task`, `lf-test-task` and `lf-verdict` say nothing of it in their entries. ## Conflicts - `browser/registry.json`: this branch's `$keys` and `$awaits`, less the `x-thread-seat` member and the seat's mention in `answered` ("A thread about the widget is not an answer."). Main's `x-thread-surface` description is not taken, since the key is gone here. `$keys` holds 32 `x-` keys. - `browser/runtime/thread/surfaces.js`: registration stays by method, over every tag a module upgrades. Main's two additions go around it: an export registers nothing, and an instance with `threadOutlets` and no `id` is reported as its widget's failure and not registered. - `browser/styles/components/surfaces.css`: main's side, the `.lf-thread-seat` and `.lf-say` rules deleted. - `browser/types/contract.d.ts`: regenerated by `pnpm run build:browser`. - `examples/command-hub.page/registry.json`, `tests/fixtures/packages/work/registry.json`: the `x-thread-seat` declaration deleted and nothing put in its place; `x-content` and `x-upgrade` stay out, as this branch has them. - `examples/command-hub.page/widgets/lf-atlas-task.js`, `tests/fixtures/packages/work/widgets/lf-test-task.js`: main's modules, with `nothing` imported from `/vendor/lit.js`. - `skills/leaf/references/module-annotations.md`: main's text, opening on "A widget whose element has a `threadOutlets` method" and keeping "The method is the declaration, and the registry says nothing." - `src/leaf/registry/state.py`: neither thread key among a created child's owner keys. - `src/leaf/registry/widgets.py`: this branch's `require_module` call; `x-thread-seat` leaves its list in `registry/contract.py`. - `src/leaf/render-checks/widgets.js`: `matchesWhen` leaves the import, and `TEXT_BOX` stays in the `check-api.js` import where this branch reads it. - `tests/model/interact_contract/test_registry_door.py`: `required` kept where main writes `choose`; the seat's malformed-extension row deleted; the seat's module row becomes `("lf-note", "x-shadow", True)`. ## Main's other lines, in this branch's terms - `tests/browser/startup/test_thread_surfaces.py`: the new no-id test's entry declares no `x-content`, `x-upgrade` or `x-thread-surface`, and its module imports `nothing` from `/vendor/lit.js`. - `tests/render_cases_interaction.py`: `lf-verdict` declares no `x-thread-surface`. - `tests/browser/controls/test_command_routes.py`: takes `lf-verdict`'s entry as it stands, since there is no thread key to filter out for a module that seats nothing. - `skills/leaf/references/package-data.md`: a created child is refused for declaring state, obligations, work, history, data or visual parts; a thread surface is no longer something an entry declares.
max-sixty
added a commit
that referenced
this pull request
Nov 16, 2026
…ebuild a renamed set `page check` lets any widget open with its name before its members or its data, and a module that drew its own content by replacing its children took that name with it: a code block, chart, draft, diagram or diff opened with a `<strong>` passed the check, and the user never saw the title. Each now keeps the name where it draws. The four light-DOM modules put `openingTitle`'s holder back first when they replace their children, and `shadowStage`, the runtime's helper for a shadow-DOM widget, keeps the holder in the light tree and slots it alone at the top of the stage, so lf-diff, the file tree and the file editor keep theirs with no change of their own. The draft and the diagram place it over the reading and the drawing. For any module that still drops one, a third-party package's included, `page check --render` reports the name it drew over (`dropped-name`). No per-widget key: which widgets take a name is what their modules keep, which the gate reads. A tab renamed in a revision did not reach its strip. A members-patched widget was replaced only when its own attributes or its members' changed, and a rename now sits in the markup a member opens with, so the tab set was patched in place and the strip kept the old name; a pane's region name, set on connect, likewise. The patch shell now holds the widget's own opening name and each member's whole, so a rename replaces the widget as a `label` change did. The revision test renames a tab and a pane; both failed before. The seated-threads fixture from #6105 names its plan by markup.
max-sixty
added a commit
that referenced
this pull request
Nov 21, 2026
Main holds everything this branch changed: the registry and API cuts landed as #6134, the comment-box fold as #6105, and #6234 carried the rename to `required` and `selected` with the pick scan that counts only Leaf elements, and let an option group ask with no attribute. The merge therefore takes main's tree whole.
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.
A widget had two routes for showing Leaf's comment box and its threads inside itself: a
threadOutletsmethod (withx-thread-surface), whichlf-diffandlf-visual-reviewuse, and thex-thread-seatregistry key with thethreadBoxexport, which only the Command Hub example and a test fixture used. This folds the second into the first and deletes it.threadOutletsis now also offered the widget's own target,outlet.lfHoldgives the box in that outlet its second send, andthreadSurface(owner).open(owner)opens it. One registry key and one export go, and 137 lines outside tests.What a Command Hub user sees: a
talktask ends in a Comment control where a field stood at rest, opened by a press orcon the task. After Send & pause the box gives way to its thread and focus is on it, and a thread on a task has no margin entry, since the task draws it.To weigh:
holdsno longer reads a declaration. It requires thatholdsnames the widget the comment is anchored to, with no passage, datum or part, so a comment may hold a widget whose module offers no hold. Only Leaf's box where a module setlfHold, a page's own script or a raw POST can send one, and every reader takes the field alone.say:<widget id>) are no longer offered in the row;g imoves them into the page's comment field.mainfloats a box beside the title; a half-typed reply in a task's thread has no margin entry, though Threads and On Me list it; and Tab keeps its native order in a box that offers a second send (keyboard/AGENTS.mdnow says so).lf-atlas-taskregisters as a thread surface, 25 on the hub page where none did. Measured there with five threads open: the thread pass takes 0.04 to 0.08 ms longer and a place lookup about 0.5 µs longer.module-annotations.mdchanges how a package author seats a thread about the widget itself. It has not been scored with the authoring evals.Max asked for this after comparing both rows on the page for #5968 (its Decision 4), where it was first built; this is that change moved onto
main. An independent reviewer used the rows cold in Firefox besidemain, wrote a self-seating widget from the reference, and read the code. The second commit is its findings: a thread surface with noidshowed a dead Comment control that no check reported, and now reports the missing id; the hold's notice used Command Hub's words on the public route; and a second comment box sat flush under a thread's reply box.Tests:
pnpm run check; the model and process tests for the changed modules; and 534 browser and journey cases by node id (every test the fold edits, every test naming the fixture task widgets, a seat, Send & pause or Command Hub, the diff and visual-review comment-box tests, and the hold-still matrix in both engines), of which the 4 that fail also fail onmain.lf-diff's comment box is pixel-identical tomain's in seven states.