Skip to content

Keep a settled decision's focus ring round its mark, and read a clear reach over a ring as no cover - #7129

Merged
max-sixty merged 1 commit into
mainfrom
agent-ab878b59e3c3cd63b
Nov 25, 2026
Merged

max-sixty merged 1 commit into
mainfrom
agent-ab878b59e3c3cd63b

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

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

… reach over a ring as no cover

A row's mark stands the row's height while its digit shows only in a live
group, where the row wears the mark's ring. In an opened settled group the
mark wears its own ring, so it keeps its 11px box and its reach covers the
digit's height; before, the ring stood the row's full height and ran under
the next row. The ring check now confirms a cover by a box inside the
control in the screenshot, as it does a neighbour's, so a transparent reach
over a row's ring no longer reads as covering it.

> _This was written by Claude Code on behalf of max-sixty_
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_
@leaf-agent

Copy link
Copy Markdown
Collaborator

This also fixes #7171's other failing test, tests/journeys/controls/test_rings.py::test_controls_show_keyboard_focus_without_ringing_pointer_activation, which reads rings through the same ring_faults check. Both tests fail on main at 32dc564a8. With this branch merged onto that commit, both pass (2 passed, run with -n0). If you agree, a Closes #7171 in the description would close that issue when this lands.

@max-sixty
max-sixty merged commit e748d1a into main Nov 25, 2026
6 checks passed
@max-sixty
max-sixty deleted the agent-ab878b59e3c3cd63b branch November 25, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants