Repository navigation
Give each playground control, option and preset its own comment target - #5508
Merged
Merged
Conversation
A comment names the nearest element with an authored id. No playground gave its controls, options or presets one (1 of 111 choices in the tree had an id), so a comment on an option, by Alt-click, the picker, `c` or a selection, landed on the whole playground. The authoring guidance already asked for an id on the smallest element a user points at; it wasn't reaching authors. - `lf-playground-control`, `lf-playground-choice` and `lf-playground-preset` now require `id`, as `lf-option`, `lf-tab`, `lf-card` and `lf-part` do, so page check and message markup refuse one without it. They take the words "control", "option" and "preset" in chrome. Every example, fixture, eval draft and test playground gains its ids. - A plain option in the rail fills its line, so the row, not only its words, is what a press, the focus ring and Alt take. - A target-picker letter placed before its target stands level with the target's first line instead of at its top edge, where in a list of short rows it read as the row above's. It keeps the corner where that would cover a neighbouring target, as between two preset buttons. - The probe's hover settle treats a hovered label's control as the same hover, so a capture over a choice row no longer times out. Tests: the browser test that a comment names the playground option it points at now covers a control, a rail option's blank side, a candidate and a preset; the markup test refuses each member without an id; the hint-seating tests expect the level seat. Tests whose fixtures shared a control name across playgrounds on one page give each its own id. Derived addresses (playground id, control name, choice value) were weighed and not built: the browser's lookup, Python's containment reading and revision reanchors all key on authored ids, and the agent couldn't search the source for a path. > _This was written by Claude Code on behalf of max-sixty_
# Conflicts: # tests/browser/widgets/test_playgrounds.py
leaf-agent
approved these changes
Nov 5, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 5, 2026
…an example's (#5527) `leaf-dev corpus` has refused to build since #5508, so every test that opens the corpus (`named_source("corpus")`, in `test_render_gate`, `test_render_controls` and `test_interact_product`) fails on `main`: ``` Error: id 'rate-threshold' is in both alert-thresholds.html and quoted-playground.html; rename one ``` #5508 gave every playground control and choice an id. The fixture `quoted-playground.html` copies part of `examples/alert-thresholds.html`, so nine of its new ids repeat the example's, and `notification-playground.html`'s new `title` control repeats the `h1` id in the fixture `thread-journey-inline.html`. The corpus composes every example and fixture into one document, where an id must be unique. The two fixtures take the new names, since no test names their ids: the quoted playground's controls and choices take the `quoted-` prefix its other ids already carry, and the inline-thread fixture's heading becomes `review-title`. The shipped examples keep theirs. A playground value's `for` names its control's `name`, which is unchanged. `uv run leaf-dev corpus` builds again, and a scan of every corpus input finds no other shared id. The quoted-playground browser tests and `tests/model/test_interact_document.py` pass. > _This was written by Claude Code on behalf of max-sixty_ Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Nov 7, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 7, 2026
…#5551, #5552 and #5566 chose (#5685) Ten of #5658's nightly journey cases still expected behavior that a recent change replaced on purpose. This PR updates those tests to what each change intended. One example page also changes: the feature gallery had lost a face that the server would draw. Each case was bisected locally to the first commit where it fails and checked against that commit's parent, which passes. Each fails on main `02a1e05cb` and passes on this branch. | Case | Since | What changed | | --- | --- | --- | | `test_render_widgets.py::test_notification_configuration_becomes_a_commentable_local_artifact` | #5508 | Every playground choice now has its own id. The receipt's comment anchors on the Banner choice that holds it (`format-banner`), not on `notification-simulator`. | | `test_render_gate.py::test_every_table_the_theme_sets_honestly_passes_the_gate` | #5566 | The fixture's available `<figure>` holds a question whose words start at the figure's edge, and #5566's new `words-off-column` advice flags exactly that. The journey checks tables, so it now leaves that question out. The browser test that measures the question's table inside the figure keeps it. | | `test_render_margin.py::test_margin_card_holds_its_top_as_a_turn_arrives_and_as_a_reply_wraps` | #5537 | Beside its passage, a card now holds its reply's foot while the user writes in it. The test now steps onto the thread with Escape before reading, as #5537's own tests do. It checks that each wrap, a long draft and the answer after a send grow the card upward. It is renamed `…holds_its_top_while_read_and_its_reply_while_written`. | | `test_thread_response_continuity.py::…keep_the_first_line[margin-delete-desktop]` | #5537 | Same rule: Backspace in a margin card's reply keeps the reply's foot still, so the margin case reads the foot. The seat cases are unchanged. | | `navigation/test_key_surfaces.py::test_user_news_interrupts_and_then_restores_background_news` | #5448 | The panel's key now stands with Comment after the field's words, so a notice reads `Agent replied — open Threads · Comment… c`. | | `test_page_holds_still.py::…[message-reply-below-chromium]`, `[…-firefox]` | #5551 | A thread's reply box under the floating panel now counts as unseen. A clicked message therefore stays still as an answer joins below it, the strict xfail passed, and its entries leave `MOVES_ON_MAIN`. | | `test_render_navigation.py::test_the_feature_gallery_exercises_its_core_journeys` | #5552 | `progressFace` reads a workflow's `at_work`, which the server stamps on every served workflow. The gallery's margin atlas builds its sample workflows from a stage alone, so its Working samples had lost the working face. The sample now carries `at_work` as the server would stamp it (`examples/developer/feature-gallery.page/widgets/lf-margin-entry-gallery.js`). | The other #5658 cases are handled elsewhere. #5684 (merged) fixed the fixture-resource case. A separate PR widens `--wide` for #5611's diff gutter. The `message-edit-above` cases of `test_page_holds_still.py` come from a runtime regression in #5551, which has its own cause issue. Refs #5658 — automated triage --------- Co-authored-by: leaf-agent <[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.
A comment names the nearest element with an authored id. No playground gave its controls, options or presets one (1 of 111 choices in the tree had an id), so a comment on an option, made by Alt-click, the
spicker,con its radio or a selection, landed on the whole playground with the control's label as its quote. The authoring guidance already asked for an id on the smallest element a user points at, but it wasn't reaching authors.lf-playground-control,lf-playground-choiceandlf-playground-presetnow requireid, aslf-option,lf-tab,lf-cardandlf-partdo, so page check and message markup refuse a member without one (<lf-playground-choice> (line 11): 'id' is a required property). They take the words "control", "option" and "preset" in chrome, so Threads calls a comment's anchor§ option · Reply, Comment. Every example, fixture, eval draft and test playground gains its ids, andpackages/playground/instructions/author.mdtells authors the id is what a comment records.A page whose playground members lack ids is refused at its next save until its author adds them.
Derived addresses (the playground's id, the control's
name, the choice'svalue) were weighed and not built: the browser's element lookup, Python's containment reading and revision reanchors all key on authored ids, so each would need a second kind of address, and the agent would receive a path it can't search the source for. An id also survives a change to the value.Left as they are:
con a focused preset opens a comment on the question, as on a focusedlf-optioncard (Alt-click andsreach the preset); an option of anappearance="select"control has no element of its own, so Alt takes the control; a mark on a slider's control sits over its value.Tests: the browser test that a comment names the playground member it points at covers an option's words and blank side, a candidate, a control label and a preset, and checks the anchor and that Alt-click leaves the radio unchanged; the markup test refuses each member without an id; the hint-seating tests expect the level seat and the kept corner.
test_a_short_workspace_shows_more_below_its_playground_regions(assert 13 > 100),test_playground_controls_take_focus_from_editors_and_keep_candidate_focusand threetest_render_semantic_selectiontests fail the same way onmain.