Skip to content

Let axe read the first screen's words, and give authored controls Leaf's type - #2613

Merged
max-sixty merged 4 commits into
mainfrom
ui-review-skills
Oct 12, 2026
Merged

max-sixty merged 4 commits into
mainfrom
ui-review-skills

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Trying lintapple on Leaf's pages (#2559) turned up mostly noise, but its unmeasured contrast readings traced back to Leaf: the auxiliary envelope, a transparent <dialog> the size of the window, stood over the first screen. axe hit-tests text to find its background, so it answered every word under the envelope as "incomplete", and the suite's axe sweep, which keeps violations only, passed words it never measured. This has been the case since the envelope landed in #2006.

Envelope. .lf-auxiliary-envelope is now an empty box at the document's origin. Everything it holds positions against the window or that origin, and the stylesheet comment states the rule a future child must keep. A reviewer compared every visible envelope descendant between main and this branch on review-a-plan, at 1440×900 and 390×844, in 15 chrome states (panels, hints, menus, command reference, page search, design mode, page comment). Every rect matched. On triage-board, axe's overlap incompletes at rest went from 42 to 8; the remaining 8 are gradients and short text.

Sweeps. A new overlapped_words reading fails the feature-gallery axe sweep on any word axe reads no contrast for because boxes that paint nothing stand over it. Painted covers the layer puts there on purpose, such as a scroller's edge fade or a margin pin, hide words from the reader too, so they don't count. With the old envelope the check fails on the gallery's title, lede and start section in all four views. The chrome sweep now waits for the thread panel's slide: mid-slide, the panel's words stood past the window's edge and went unread. That sweep can't take the overlap check yet, because .lf-thread-controls is a transparent box over the first message's author and time. TODO.md files that under the Threads redesign.

Authored controls. A <button> or <input> a page writes in main without a class drew in the browser's 13.33px Arial. It now takes Leaf's control type from the weightless face rule in surfaces.css, so any page rule still wins. Measured over the corpus page's 515 controls, only the gallery's bare buttons changed. page-authoring.md now names .button, .button.primary and .field, which give an authored control Leaf's full face, and the feature gallery's six bare controls use them.

Review stable. developing-leaf's "External UI skills" table adds Emil Kowalski's skills: review-animations for motion and break-ui for worst-case content.

Tests: the gallery and chrome axe sweeps, a new authored-controls test (each checked by reintroducing the bug, which made it fail), 11 envelope-sensitive browser tests, and the corpus test.

Closes #2559

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 3 commits October 12, 2026 09:12
…f's type

Trying lintapple on Leaf's pages (#2559) found its contrast readings unmeasured,
and the cause was ours: the auxiliary envelope, a transparent dialog the size of
the window, stood over the first screen. axe hit-tests text to find its
background, so it answered every word under the envelope as "incomplete", and the
suite's axe sweep, keeping violations only, passed words it never read. The
envelope now has an empty box at the origin; everything in it positions against
the window. The feature-gallery sweep also fails on any word axe reads no
contrast for because a box stands over it, and the chrome sweep waits for the
thread panel's slide, since mid-slide its words stood past the window's edge.

A button or field a page writes without Leaf's class drew in the browser's
13.33px Arial. It now takes Leaf's control type from the weightless face rule, so
any page rule still wins. page-authoring.md names `.button`, `.button.primary`
and `.field`, which give an authored control Leaf's full face, and the feature
gallery's three bare controls use them.

The developing-leaf skill lists Emil Kowalski's review-animations and break-ui
skills beside the other external UI reviews.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…lope's child rule

The envelope's comment now names what a child may not do against its empty box.
The authored-controls test overrides with element selectors alone, and the thread
header's transparent controls box, which still hides two words from axe, joins the
Threads redesign item in TODO.md.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty max-sixty mentioned this pull request Oct 12, 2026

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new overlapped_words assertion fails on this head at 420px in both light and dark mode. uv run pytest tests/journeys/test_render_controls.py::test_the_feature_gallery_has_no_serious_wcag_a_or_aa_violations -q reports span[aria-controls="bg-view-data"] > .lf-tab-name and #bg-replace > lf-new as words with no contrast reading. The gallery's own phone-width sweep therefore cannot pass. Please trace those two hits and clear the coverage, or narrow the check if axe is reporting content that is not actually visible to a reader.

At phone widths on Linux's fonts the gallery sweep failed on a tab name under its
strip's edge fade and on replaced words under a margin pin. Both are painted
covers the layer puts there, which hide the words from the reader as well as from
axe. The check now keeps a word only where every box over it paints nothing, the
blind spot the window-sized envelope was, and resolves axe's targets through the
same frame traversal as serious_axe_violations.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 0b44b6c into main Oct 12, 2026
3 checks passed
@max-sixty
max-sixty deleted the ui-review-skills branch October 12, 2026 17:00
leaf-agent added a commit that referenced this pull request Oct 12, 2026
The [main CI
run](https://github.com/max-sixty/leaf/actions/runs/38283138365) failed
because the Threads naming test asks Playwright to see the dialog
envelope itself. [#2613](#2613)
intentionally made that transparent envelope zero size so it no longer
covers page text. The test now checks that the named dialog is open and
that its visible Threads panel is shown. It still checks the thread
card's accessible name after opening a comment.

The run's other failure, the reaction trigger placement test, was
addressed by merged
[#2625](#2625). Both focused tests
pass on this branch: `uv run pytest -q -n0
tests/browser/test_render_navigation.py::test_the_thread_panel_and_a_page_thread_carry_names
tests/browser/test_render_threads.py::test_a_reaction_list_opens_from_a_trigger_under_the_thread_panel`
(the original naming assertion failed before this change). This PR
changes only the test's reading of the panel.

Co-authored-by: leaf-agent <[email protected]>
max-sixty added a commit that referenced this pull request Oct 13, 2026
… persistent otherwise (#2699)

In the glossary, **Standing** means one thing: the user holding a
destination or a control inside it (a standing target, ending a
standing). Across the tree "standing" was also an ordinary adjective for
things that are in force, current, open or lasting ("the standing log",
"a standing report", `standing_approvals`, `--standing`), which collided
with that term. This rewords every such use and renames the identifiers
with all their callers, leaving "standing" to mean only where the user
is. The glossary gains an **In force** row and a line saying so.

**Replacements, one word per meaning**
- not withdrawn or retracted → **in force** (`InForce`,
`StateProjection.in_force`, `approvals_in_force`, the per-verb
`inForce`); the served field keeps its name `stands`
- the latest value or reading → **current**
- still owed, or a surface on screen → **open** / **active**
- a server or environment that outlives sessions → **persistent** (CLI
`--standing` → `--persistent`, service.json `"lifetime": "persistent"`);
always-present chrome → **fixed**
- a preference → **lasting**; a dispatch → **recurring**; otherwise
**existing**, **present**, **in place**, **permanent**

**Behavior changes**
- `leaf server start --persistent` replaces `--standing`, and refusals
and the lifetime line say "persistent".
- One `server.read_service(page_dir)` now reads `service.json` for every
caller, returning nothing unless the record has its required fields and
a lifetime this Leaf knows. A record an older Leaf wrote with
`"lifetime": "standing"` is therefore no service (root AGENTS.md,
"Stage"), A server that older Leaf started still holds its lease, so
`leaf server stop` and a re-vendor detect it from the lease, delete the
record and wait for it to exit; until then `server start` refuses as
before. A server started persistently before this change is re-served
with `--persistent`.
- Visible wording: "Current text matches this version", the reaction
scope "On a reaction", the margin contribution key `"reactions"`, and
the eval surface `action-in-force` (with its metrics).

**Fixes for journey tests main had broken.** Editing these test files
selects them, and each already failed on main:
- `test_a_comment_box_moves_home_when_a_panel_comes_to_cover_its_seat`
(since #2613 made the Threads dialog's envelope zero-size): it now
checks the dialog is open and its panel visible, as #2639 did for a
sibling.
- `test_each_sampled_focus_ring_is_shown_whole_in_its_surface` (since
#2647): the floating panel's focus rule declares `--lf-focus-ring:
floating-panel`.
-
`test_an_aimed_press_does_only_what_the_outline_promised[release-notes]`
(since #2670 put a Web Awesome Copy control in `lf-draft`):
`elementFromPointAcross` stepped into the control's own shadow tree and
took its internal `id="copy-button"` for a page element, so the aim and
the press both targeted it and no comment landed. The hit test now
enters only shadow roots a widget declares with `x-shadow`, as
`passages.js`'s header already says; the aim takes the `lf-draft`.
-
`test_a_first_complete_read_does_not_repaint_an_already_undone_settlement`
(since #2649 made decision commands wait for the first complete read):
the race it guards moves one read later, so the page takes its first
read before the held Accept and undo; renamed `test_a_complete_read_…`,
assertions unchanged.

The sweep is generated by a script of exact edits plus identifier rules,
so a newer `main` is regenerated rather than conflict-resolved. Root
`AGENTS.md`'s maintainer section ("a standing preference", line 13) is
unchanged.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.

UI skill

2 participants