Skip to content

Declare the playground's control row and standing verb - #366

Merged
max-sixty merged 4 commits into
mainfrom
fix/ci-34065775786
Sep 7, 2026
Merged

max-sixty merged 4 commits into
mainfrom
fix/ci-34065775786

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

Adds the two corpus declarations required by the playground package. The control-stability page now covers its Reset, Copy instruction, and submit row, and the standing-state page exercises the playground's choose action alongside every other declared verb.

The export cleanup from the original branch was removed after review because current main already provides the canonical pass with broader native-control coverage.

Verified with both affected export fixtures, all control-row archetype cases, the corpus archetype check, and the standing-action render gate: 11 passed. Pre-commit also passes.

This was written by Codex on behalf of max-sixty

…clare the playground's row and standing verb

The playground package reached the corpus without the corpus-wide gates,
which run only after main has moved. BAKE removes the preset presses and
the bar's own title, but the bar survives holding the author's emptied
preset wrappers, so a role over no control and a label pointing at a
removed span both reach the copy. A box a widget built to hold controls
now stops calling itself a group once the presses in it have gone, asked
of what the box still holds so a group keeping a native control keeps its
role. The action row gets an archetype and the standing page gets a
playground and its choose, so the corpus declares what the package added.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The two corpus declarations hold up. On the merged tree I ran test_the_composed_corpus_declares_every_control_row_archetype, all ten test_each_control_archetype_holds_its_neighbours_still cases and test_the_render_gate_applies_every_standing_action_a_second_time: 12 passed.

The bake() hunk is the one worth another look — main already carries that pass. #362 added for (const container of all("[data-lf-offer=''][role]")), guarded by keepsBrowserControl and clearing role plus every aria- but aria-hidden, and it runs earlier in the same bake(), before the [data-lf-offer][data-lf-said] loop. Nothing between the two re-adds a role to an empty-marker box — the said loop removes role on what it converts — so by the time the new loop asks, the presets bar has already lost both attributes. Removing the hunk from the merged tree and re-running the two fixtures the description names, [corpus] and [feature-gallery] of test_an_exported_page_fixture_stands_on_its_own, both still pass. The branch was cut before #362 landed, so the seam it names is real but the layer already answered it.

Where the two passes can differ, they differ: the new one inlines input, select, textarea, a[href], button rather than calling keepsBrowserControl, so it drops summary and the label.control association, and a box the earlier pass deliberately kept for a native control the browser still drives would lose its role at the second one — the opposite of what its own comment claims for it. That divergence is worth stating, but it sits between the earlier pass and the copy gate's own pressable reading, which does use the narrow list. One pass with one predicate answers it; a second pass beside the first leaves two readings of the same selector to drift apart.

leaf-agent and others added 2 commits September 6, 2026 19:03
The everyday suite `ci` runs on a pull request deselects every
nightly-marked module, so a pull request whose whole diff is one of
those modules goes green having exercised none of it. That is how #336
landed a rewrite of `tests/test_render_margin.py` and
`tests/test_render_anchors.py` under a green gate and reddened `main`
the moment it merged — #339 is the repair — and #338 is in the same
position right now with `tests/test_render_margin.py` and
`tests/test_render_navigation.py`.

This names the touched modules back. A new pull-request step diffs the
merge commit against its base parent, collects the `tests/test_*.py`
files the diff touches, and runs them with `-m nightly`: `conftest.py`
already runs what an explicit file selection names, `-m nightly` leaves
a mixed module's everyday cases to the step above rather than running
them twice, and pytest's exit 5 is what a pull request that touches no
nightly case gets. The cost is the touched files, not the 22–41 minute
nightly suite, and a pull request that touches no test module pays
nothing. A change to the runtime those modules drive is still the
nightly run's to catch; this reaches the modules themselves.

<details><summary>Verification</summary>

The step's shell was run locally against real commit ranges, with `uv
run pytest` swapped for the same invocation:

- `83f69563..d10463f` (#339's two nightly modules) — selects both, 155
nightly cases collected.
- `ff580ecb..867c526` (touches `tests/test_render_mcp.py`, which
carries no nightly mark) — selects it, `no tests ran`, exit 5 tolerated,
step exits 0.
- An empty range — `No test module touched.`, exit 0.
- `d10463fd..83f6956` (the same diff reversed, so the range reads as
deletions) — the `[ -f ]` filter drops what is not on disk and the step
still selects correctly.

End-to-end, `uv run pytest tests/test_render_drawing.py -m nightly -q`
is 21 passed, so the invocation drives real browser cases rather than
only collecting them.

Suite and lint on this branch:

- `uv run pytest tests` — 891 passed, 6 skipped.
- `uv run pytest tests/test_interact_layer.py` — 157 passed, 6 skipped
(this is the module that reads `ci.yaml`; the new step declares no
`working-directory`, so the gate-naming test is unaffected).
- `pre-commit run --files .github/workflows/ci.yaml CLAUDE.md
tests/CLAUDE.md` — passed, including actionlint's shellcheck pass over
the new `run:` block.

`fetch-depth: 2` on the `test` job's checkout is what gives the merge
commit its base parent; the default depth of 1 has no `HEAD^1` to diff
against.

</details>

Co-authored-by: leaf-agent <[email protected]>
@max-sixty max-sixty changed the title Take a widget's group role out of a copy that kept no control, and declare the playground's row and standing verb Declare the playground's control row and standing verb Sep 7, 2026
@max-sixty
max-sixty enabled auto-merge (squash) September 7, 2026 02:20
max-sixty pushed a commit that referenced this pull request Sep 7, 2026
…walk to the pill ring (#367)

## Problem

The nightly leg of [`ci` on
`59d0aa3`](https://github.com/max-sixty/leaf/actions/runs/34060060243)
went red on three readings. Two were the interaction gallery and landed
with #359; the third,
`test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus`,
still reproduces on `ac3342a4` and is a different seam — #366 names it
as outstanding and does not reach it.

The census reports the resolve icon action's focus ring clipped in
`ship-review`, in the page and in the comments:

```
in the page of ship-review, the ring on button.lf-btn.lf-resolve.lf-icon-action.lf-ui ""
is not all there: its left edge is under button.lf-react-trigger.lf-ui ""
(ring 1143,466,1179,502 vs 1119,467,1145,493, sampled 1144,484)
```

The reaction trigger is painted above the message head and turns opaque
exactly while the message is focus-within — which is when the resolve
control beside it is wearing a ring. It stood off that control's own box
by 2px, and the ring is 4px wide of it, so two of those pixels were
behind the trigger. Two independent PRs put the rows there: the icon
action (#347) and the trigger's offset (#349), each correct about the
box it measured.

## Solution

Both copies of the rule — the chrome sheet's, and the
frozen-conversation mirror in `theme.css` — now stand the trigger off
the ring rather than off the box, naming the band as `--here-ring-w`
plus the offset each sheet's own focus rule states, and keeping the 2px
gap that was already there measured outwards from the ring.

Clearing that fault makes the census reach its last assertion for the
first time, and it reports the `pill` ring painted nowhere the corpus
can be walked to. That one is pre-existing and was masked behind the
clip: the strip's trigger wore `lf-pill lf-react-trigger` until #349
made it an icon, so the palette chips behind the press are now the only
focusable boxes left drawing that ring — and no walk opens a palette. A
`a reaction palette` walk scope presses a message's trigger and stands
on the chips.

## Testing

- `tests/test_render_controls.py` in full on this branch: 81 passed.
- The everyday suite (898 passed, 6 skipped) and `pre-commit run
--all-files` pass.
- Bug-back for each half, on this branch's own tree: reverting the two
CSS rules returns the 2 clipping faults over 714 stops; reverting the
walk scope alone returns `1 of the layer's 45 rings are painted nowhere
the corpus can be walked to: pill`.

<details><summary>Scope, and what this deliberately leaves to other
PRs</summary>

The same run's other two readings are #359's and merged.
`test_the_composed_corpus_declares_every_control_row_archetype` is red
on `main` for the playground package's Reset / Copy instruction / Apply
card row; #366 declares that archetype, so it is left out of this branch
— an earlier revision of this one carried a second implementation of it
and it was dropped once #366 appeared.

#365 touches `reactions.js` and `chrome.css` but neither the trigger's
offset rule nor the `lf-pill` class on a chip, so the walk scope added
here keeps its subject if that lands first.

</details>

---
Automated fix for [failed
run](https://github.com/max-sixty/leaf/actions/runs/34060060243)

Co-authored-by: leaf-agent <[email protected]>
@max-sixty
max-sixty merged commit c79736e into main Sep 7, 2026
4 checks passed
@max-sixty
max-sixty deleted the fix/ci-34065775786 branch September 7, 2026 02:33
max-sixty pushed a commit that referenced this pull request Sep 7, 2026
…tion and composer readings as the icon actions now draw them (#369)

## Problem

The nightly leg of [`ci` on
`ac3342a4`](https://github.com/max-sixty/leaf/actions/runs/34069973701)
went red on ten readings. Four are already held by open branches —
`test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus`
by #367, and
`test_the_composed_corpus_declares_every_control_row_archetype` plus
`test_the_render_gate_applies_every_standing_action_a_second_time` by
#366 — and this branch leaves them there. The other six all reproduce
deterministically on `4cbef417`, and one of them is the product's.

**A recovered draft loses the control that would send it.**
`test_an_empty_draft_survives_reload_and_blocks_a_version_switch` timed
out waiting for Save. `lf-draft` reserves the width of its engaged Save
+ Cancel pair through `measure`, whose take runs whenever the row is
first drawn — which since #362 is at presentation rather than at
connection. A draft holding an unsent edit opens its editor in
`connectedCallback`, before that. The take then ran
`replaceChildren(this.#pencil)` over an editor that was already open, so
the reader was left with their words in a live textarea, the resting ✎
beside it, and no Save at all.

**Five readings written against shapes #347 replaced.** Its icon actions
moved Send inside its field, gave Resolve the accessible name `Resolve
thread`, withdrew the page-level `x` resolution, and gave a spent submit
a face of its own:

- `test_command_hub_send_and_pause_is_one_thread_fold` —
`get_by_role("button", name="Resolve", exact=True)` no longer matches.
-
`test_a_diff_surface_keeps_the_complete_thread_lifecycle_inline[light,dark]`
— pressed `x` for the inline resolution and no event was sent.
- three `test_render_drafts.py` readings — the response bar is 28px
wider now that its submit sits inside the field, so its left edge
crossed `#p2`'s centre and Playwright's centre-aimed triple-click landed
on the textarea instead of on the passage. It had been clearing that
centre by 9px.
- `test_a_control_a_widget_built_is_told_from_a_label_it_wrote` — the
option group's Add is now `.lf-compose-submit`, whose disabled rule
deliberately keeps `opacity: 1` and swaps the accent disc for a muted
ring on paper, so a field with nothing in it reads quiet rather than
broken. The same design is asserted from the other side in the
diff-surface test above (`assert quiet["opacity"] == "1"`), so the two
readings had come to contradict each other.

## Solution

`lf-draft` gains one `#paintRow`, which states the whole row from
`this.#ta` — the editor itself — and is what the reserve take, `#open`,
and `#close` all call. Read that way the take cannot arrive with a stale
idea of which mode the widget is in.

The five readings are restated at the surfaces the layer now draws.
Resolve is named exactly; the inline resolution goes through the
control's own keyboard route, which is what #347 left it. Passage
selection moves to a `select_words` helper that aims at the passage's
first line rather than at its box, since a short paragraph in a wide
column is mostly empty at the centre and that empty half is where a
float placed to keep *its own* target clear will stand. The spent-face
reading is taken as a change against each control's own live face —
lifting the disabled fact off it and putting it straight back — for the
same reason the wash and the ring in that test are already read as
changes rather than as constants: a control is free to dress its own
state and outrank the floor.

## Testing

- The four touched nightly modules in full (`test_render_drafts.py`,
`test_render_widgets.py`, `test_render_anchors.py`,
`test_render_projection.py`): 362 passed, 1 failed — the remaining
failure is #366's `lf-playground` verb, unchanged on this branch.
- The everyday suite: 898 passed, 6 skipped. `pre-commit` on the changed
files passes.
- Bug-back on the spent-face reading: flattening `.lf-compose-submit`'s
disabled rule to bare `opacity: 1` returns the failure, with the live
and spent faces printed identical.
- The draft repair's own bug-back is the run above: the reading it fixes
is the one that timed out on `ac3342a4`, and it passes here.

<details><summary>How the composer came to cover the passage below
it</summary>

Measured on `NOTED_PAGE` at 1200×900, after selecting `#p1` and typing
into the bar. `#p2` spans `211…931`, so its centre is `x=571`.

| | `.lf-fab-input` left | `elementFromPoint(571, 217)` |
| --- | --- | --- |
| `b03501fa`, before #347 | 580 | `P` |
| `4cbef417` | 552 | `TEXTAREA.lf-fab-input` |

`placeClear` bounds its bands by the viewport, the target, and controls
carrying `data-lf-offer` — not by other passages — and it prefers the
band nearest the target, which on this page is the one directly below
`#p1`. So standing over `#p2` is placement working as stated; what
changed is only how far left the bar reaches. That is left alone here.

</details>

---
Automated fix for [failed
run](https://github.com/max-sixty/leaf/actions/runs/34069973701)

---------

Co-authored-by: leaf-agent <[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.

2 participants