Repository navigation
Take a press in a row's digit column as its mark's, and a click beside selected words as a pick - #7091
Merged
Conversation
… on a card When the user is in an option group by the keyboard, each option and the Add field wear a digit. On a card the digit stands over the option's mark, so a pointer press there is the mark's. In the row form the digit stands in a column of its own, before the mark, and takes no pointer, so a press there landed on the row or on the Add form: - In Chromium, with the row's words selected to the end of a line, the press picked nothing. Chromium keeps a selection through a press beside a line the selection reaches, so the option's click handler (`aimedAt`) read the click as the selection's. - In both engines a pick made there took focus to the body, and the group's digits went with it. - A press on the Add field's digit did nothing. While the digit shows, the mark reaches back over the digit's column (`::after`, the digit's height), and the Add field over the form's leading column (`::before`). The press lands on the mark, which picks the row whatever is selected and keeps the user on the mark, or on the field, which takes a press on its padding as a focus. The reaches paint nothing: the option and hint stills (25 states) and a screenshot of a row group with its digits shown are pixel-identical to main in Chromium and Firefox. They exist only while the digit shows, since each is a positioned box Chromium's hit test visits on every call, and at rest a drag from the leading column should still select the row's words. `test_a_press_on_a_rows_digit_is_a_press_on_its_control` holds all three in both engines; with the mark's reach removed it fails at the pick in Chromium and at focus in Firefox, and with the field's removed at the field's focus in both. Left as on main: in Chromium, with all of a row's words selected, a press on the row's blank end or leading column while no digit shows clears the selection and picks nothing, which is the shared guard's reading of a kept selection, not a digit's.
A key's step on a chart tells Leaf's panel its place, "Point 2 of 12", with the first and last stops of the list it walks, and the panel says nothing while both stand in view. For a point the chart draws no shape for, as a line's vertex or a dot, the chart gave the whole drawing as that end. On a line chart taller than the window, scrolled so the drawing filled it, the drawing counted as shown (a box longer than the window counts as shown where a landing would bring no more of it in), so the panel said nothing, though the series' first point stood below the window and its last above it. Chromium and Firefox agreed. The chart now gives, for each end, what stands at that point: its shape, or the ring it already draws round a point a comment or `c` asks for. The rings come from the same store `#find` keeps (`#standing`), so each end gets one ring for the drawing, unseen, gone with the next drawing. The place itself is still said on the point's shape or the drawing, so it still goes with a redraw. `test_a_line_chart_s_step_says_its_place_while_its_series_runs_past_the_window` holds both sides in both engines: a step on a tall line chart scrolled to fill the window says "Point 2 of 12", and a step on a short line chart in view says nothing. With the drawing given as the ends again it fails at the first; with no ends given, which would say every step, it fails at the second.
An option group without labels lays each option out as a row, a positioned `display: table` box, and the row the keyboard is on wears the focus ring as its own outline, one band inside its edge so the joined group's clip leaves it whole. Firefox paints a positioned table's own ground over its outline wherever the outline stands inside its edge, so in Firefox the focused row showed no ring at all: the computed outline was a 2px solid ring at -2px, and nothing painted. Taking the ground away, making the row static or making it a block each brought the ring back; a stacking context (z-index, isolation) did not. The focused row now draws the ring on its `::after`, laid over the row at its corners, as a ring overlay does (surfaces.css), and drops its own outline. The row's box, its words, mark and digit don't move. In Chromium the ring's pixels are identical to main's. A new stills state, `ship-option-row-keyboard`, puts the keyboard on the open row of ship-review's patch decision; its Firefox pair shows the ring appear, and its Chromium pair is pixel-identical. `test_the_row_the_keyboard_is_on_wears_its_ring_on_every_side` reads the ring's pixels on all four sides in both engines; with the overlay removed it fails in Firefox.
…e selected words as a pick Two presses on an option row did the wrong thing. A press in the leading column of a row several lines tall, above or below its digit, while the keyboard had the user in the group: the digit's reach covered only the digit's own height, so the press landed on the row, which picked it and took focus to the page, and the group's digits went with it. While the digit shows, the row's mark now stands the row's height, its box drawn at the centre as before, so its reach covers the column from top to foot. Chromium and Firefox both took focus to the page; both now keep the user on the mark. A click on a row past the end of its words, with all of those words selected: Chromium keeps a selection through a press beside the lines it spans, so the click guard (`reachedForWords`, widget-elements.js) read the release as ending the selection and the row picked nothing; a second click picked. Firefox collapses the selection there and picked. The guard now records the selection as each press begins, and a selection the press found and left as it was counts as the press's only where the release stands over one of its characters. A press that made or moved the selection, as a drag or a double-click does, is still the selection's, and so is a press on the selected words. The character test is anchor-paint's, moved to geometry.js (`overCharacter`) so both read it. `test_a_press_in_a_rows_digit_column_is_a_press_on_its_control` (it was `test_a_press_on_a_rows_digit_is_a_press_on_its_control`) now presses above the digit of a row three lines tall; with the reach at the digit's height it fails at the mark's focus in both engines. `test_a_click_beside_a_rows_selected_words_picks_it` clicks past a row's selected words; with the guard reading the release as before, it fails in Chromium. The digit-column test no longer selects the row's words, since the new test holds what a selection does to a click on a row.
# Conflicts: # browser/runtime/anchor-paint.js
leaf-agent
approved these changes
Nov 24, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 25, 2026
…eck the layers (#7119) Moves each top-level child of `browser/runtime/` into a directory for its import layer, and rewrites the dependency-cruiser layering check (#7113) to name 11 layers in place of an order of 187 children. A module imports only its own layer and the layers below it. The layering, drawn from today's imports, leaves 2 imports pointing up, against 15 for the best flat order, so the known list drops from 15 entries to 2. No behaviour changes. | # | Layer | Directory | |---|---|---| | 0 | Entry points and diagnostics | top level of `runtime/` | | 1 | Floating panel, page dialogs and page keys | `panel/` | | 2 | Annotation presentation, composing and undo | `annotations/` | | 3 | Application and widget host | `host/` | | 4 | Page features: annotation inventory, contributions, version travel | `features/` | | 5 | Records and history | `records/` | | 6 | Page readings, places and paint | `readings/` | | 7 | Transport, errors and notices | `transport/` | | 8 | DOM, geometry, focus and the key register | `dom/` | | 9 | State and registry | `state/` | | 10 | Primitives and the library | `base/`, and `lib/` where it was | **What stays put.** The entry points (`bootstrap`, `prepaint`, `check-api`, `validation`, `widget-api`, `portable-api`, `stage-integration`, `age`) and `lib/` keep their paths, since pages, packages, the server and the render checks load them by served path. So do the files that aren't modules: `chrome.css`, `marks.css`, `panel-row.html` and `kernel-registry.json`, which the server and Python read at their served paths. A child directory keeps its name inside its layer, as in `dom/keyboard/`. **How the paths moved.** The first commit is the move with `git mv` (all 271 renames detected) and the path rewrites. A script resolved every relative and served-path specifier in the old tree and wrote the target's new path; other references in Python, configs, the build, tests and guidance followed. The primitives' eslint rule now names each primitive's neighbours by the relative path from its own place. Eval fixtures, pinned GitHub permalinks and the example diff in `worktree-diffs.html` keep the paths they recorded. The second commit rewrites the check and adds "Import layers" to `browser/AGENTS.md`. A later commit gives the new path wherever guidance, comments or tests named a moved top-level module by its bare filename (`focus.js` → `dom/focus.js`), which had also been its path under `runtime/`; a sibling in the same directory keeps its bare name, and a basename code compares keeps it too. **The two upward imports** in `.config/dependency-cruiser-known.json`: `host/application.js` → `annotations/undo.js`, and `host/sample-child.js` → `annotations/composing/page-image.js` (a lazy import). **What to check.** - The framework's facade stays excluded from the graph by its served path, now `/runtime/records/framework.js`, as #7113's config already did. Twelve modules below `records/` import it that way, and `state/semantic-state.js` reaches the record folds through its `createSemanticApplication`, so the check doesn't see that route from `state/` up to `records/`. - Open PRs that touch runtime files, #7082 and #7132, need `main` merged in; git's rename detection carries most of their edits to the new paths. - `test_each_sampled_focus_ring_is_shown_whole_in_its_surface` (journeys) runs here because the PR touches its file, and fails as it does on `main`. One of its six faults is real: since #7091, an opened settled decision's mark stands as tall as its row, so its ring runs under the next row. The other five are the check reading a transparent click target as paint over the ring. #7129 fixes both. The move doesn't cause it. Tests: `pnpm run check` (type checks, `test:runtime` 1130 pass, build and worker tests), `pnpm run build:browser` (no generated file changed), the prepared kernel build (same 68 outputs as base), pre-commit on every changed file, `tests/smoke`, the model tests for served runtime modules and public modules (`test_module_url_delivery`, `test_revision_delivery`, `test_distribution`, `test_interact_layer`: 318 pass), `test_owner_index`, the prepared-install journey in `tests/journeys/test_distribution.py`, and `leaf-dev probe alert-review --base`: the page boots, the panel draws the same label, with the same 317 requests and no console output on either arm. > _This was written by Claude Code on behalf of max-sixty_
max-sixty
added a commit
that referenced
this pull request
Nov 25, 2026
… reach over a ring as no cover (#7129) In an opened settled decision whose options are bare rows, with the keyboard in the group so its digits show, the focus ring on an option's mark stood the row's full height: a tall ring round the 11px circle, reaching 5px above and below the row, with its bottom run under the next row's ground. It hugs the mark again, as it did before #7091. **Cause.** #7091 made a row's mark stand the row's height while the digit shows, so that the mark's reach (the transparent `::after` #7075 added) covers the whole digit column. A ring follows the box it is drawn on, so the mark's own ring grew with it. In a live group the row wears the mark's ring and the mark's own is off, so nothing visible changed there, and #7091's stills showed only live groups. An opened settled group is the one place the mark wears its own ring, and no still covered it with the digits showing. **Fix.** The mark stands the row's height only in a live group. In a settled group it keeps its 11px box, and its reach covers the digit's height, as in #7075; one `inset-block: min(0px, (100% - var(--lf-key-badge-size)) / 2)` serves both. A new stills state, `settled-option-row-keyboard`, shows the surface. To weigh: in an opened settled group, a press in the digit column above or below the digit (6px each side on a one-line row) lands on the row again. It picks the row, but focus leaves the group and the digits disappear, which #7091 had fixed. Keeping both would need the ring off the mark's box, for example by having the row wear the ring in a settled group as it does in a live one. That changes how a settled group shows focus, so it is left for you to decide. **The ring check's other five faults.** `test_each_sampled_focus_ring_is_shown_whole_in_its_surface` also reported the left edge of a live row's ring in ship-review and feature-gallery as "under" the row's own mark. That ring is whole: the screenshot shows the ring's colour at each sampled point. The box over the left band is the mark's reach, which takes hits and paints nothing. The check counted a hit on a box inside the control as paint whenever the box's own styles showed a fill or border, and a hit on a pseudo-element is read through its host's styles. These covers now go through the screenshot confirmation that a neighbour's cover already goes through (#4836). The new `test_the_ring_reading_passes_over_a_reach_inside_the_control_that_paints_nothing` fails without that change. The defect surfaced as a failure of that ring test in #7119, the runtime's layer move, which doesn't cause it: the test fails the same way on `main` at 109461e and f9ff587. A pull request runs it only when it edits the test's file. max-sixty asked for refactoring to continue while each change improves the code. Checks: the ring test passes (it failed with 6 faults before); the new ring-reading test and two neighbours; 11 option tests by node id, including the digit-column press test in Chromium and Firefox; `leaf-dev stills --base` in Chromium and Firefox (the settled state changes, `ship-option-row-keyboard` is identical); the stills model tests; pre-commit; `pnpm run check:browser`. > _This was written by Claude Code 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.
Two presses on an option row did the wrong thing, both left over from #7075.
A press in a row's digit column, away from the digit. On a row several lines tall, with the keyboard holding the user in the group, a press in the leading column above or below the digit picked the row but took focus to the page, and the group's digits disappeared, in both engines. The digit's reach covered only the digit's height. While the digit shows, the row's mark now stands the row's height, with its box still drawn at the centre, so the reach covers the whole column and the press keeps the user on the mark. Nothing is drawn differently: 12 option and hint stills show 0 changed pixels in Chromium and Firefox, and only the mark's computed height and margins differ in the two states that show a row's digits.
A click past a row's selected words. In Chromium, with all of a row's words selected, a click on the row's blank end or its leading column picked nothing, and it took a second click to pick. Chromium keeps a selection through a press beside the lines it spans, and the click guard (
reachedForWordsinwidget-elements.js, behindaimedAt) read that release as the end of the selection. The guard now records the selection as each press begins. A selection the press found and left unchanged counts only where the release stands over one of its characters. A press that made or moved the selection, as a drag or a double-click does, still counts as the selection's, and so does a press on the selected words.aimedAtgains no name or option. To do this the guard needs the character test thatanchor-paint.jsalready had, so that test moved togeometry.js(overCharacter) and both files use it.To weigh: the guard decides for every control and container it serves, so a press beside an older selection now acts everywhere, as the module header already says it should.
Max asked for this. Two tests in
tests/browser/test_render_options.pycover the changes in both engines, and each fails once its change is reverted:test_a_press_in_a_rows_digit_column_is_a_press_on_its_control(renamed fromtest_a_press_on_a_rows_digit_is_a_press_on_its_control) presses above the digit of a row three lines tall.test_a_click_beside_a_rows_selected_words_picks_itclicks past a row's selected words.The option, hint, mark, gloss, anchor and preview tests that use the guard pass by node id (62). Pre-commit and
pnpm run checkpass.