Repository navigation
Stand the reaction trigger off the resolve control's focus ring, and walk to the pill ring - #367
Conversation
…walk to the pill ring The corpus ring census reports the resolve icon action's focus ring clipped in ship-review: the reaction trigger beside it is painted above the head, turns opaque while the message is focus-within, and cleared only the control's box, so 2px of the ring's outer band stood behind it. Both the chrome sheet's copy and the frozen-conversation copy in theme.css now clear the ring rather than the box. With that fault cleared the census reaches its last assertion for the first time and reports the pill ring painted nowhere the corpus walks. Nothing in the walk opens a message's reaction palette, and the strip's trigger stopped wearing the pill face when it became an icon action, so the chips behind the press are the only boxes left drawing that ring. A reaction-palette walk scope stands on them.
leaf-agent
left a comment
There was a problem hiding this comment.
The two CSS rules and the walk scope read correct to me. I traced the chrome geometry against the census numbers the body quotes: .lf-icon-action is 28px at that floor, .lf-btn:focus-visible is outline-offset: 2px over --here-ring-w: 2px, so the ring's outer edge stands 4px off the box and the old + 2px left the trigger's edge 2px inside it. The mirror's 1px is the offset .lf-conversation-thread :is(.lf-btn, textarea, summary):is(:focus-visible, .lf-focus-visible) names, and that rule outranks the [data-lf-offer] pressable one on specificity, so it is the offset that applies there. --here-ring-w inherits into the shadow slice the same way the neighbouring rules in that block already rely on. The walk scope lands where it says: a message strip's chips carry lf-pill lf-react, .lf-react-strip exists only on agent messages so the .first opener cannot reach the fab bar, and REACT's reaction.move claims Tab, so the walk steps the palette and comes round.
One thing about the evidence rather than the change: the green test check here never ran the census. This branch is based on ac3342a4, which predates 4cbef417 (#340) — the commit that added the step naming a pull request's touched nightly modules back. So the merge ref used the pre-#340 workflow, and the run went green on the everyday suite alone: 898 passed, 6 skipped, with every case in tests/test_render_controls.py deselected. The local run and the bug-back in the body are the only evidence standing behind the claim right now. Updating the branch onto main would put uv run pytest tests/test_render_controls.py -m nightly in front of it, which is the assertion this whole PR is about.
How I checked
$ git log --oneline ac3342a485195d3326288c1e53b4f65bbffcee47..origin/main
4cbef417 Run a pull request's touched nightly test modules in CI (#340)
$ git log --format='%h %p %s' -1 HEAD
6ea97d6d ac3342a4 11385884 Merge 113858848b31646f11929e4eac0b5e7c27f569c6 into ac3342a485195d3326288c1e53b4f65bbffcee47
refs/pull/367/merge therefore carries the base's ci.yaml, whose only pull-request step is uv run pytest tests -v. pytest_collection_modifyitems in tests/conftest.py deselects every nightly-marked item under broad discovery, and the job log ends 898 passed, 6 skipped in 252.78s — the same count the PR body reports for the everyday suite, with no census line in it.
…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]>
Problem
The nightly leg of
cion59d0aa3went 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 onac3342a4and 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: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-wplus 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
pillring painted nowhere the corpus can be walked to. That one is pre-existing and was masked behind the clip: the strip's trigger worelf-pill lf-react-triggeruntil #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. Aa reaction palettewalk scope presses a message's trigger and stands on the chips.Testing
tests/test_render_controls.pyin full on this branch: 81 passed.pre-commit run --all-filespass.1 of the layer's 45 rings are painted nowhere the corpus can be walked to: pill.Scope, and what this deliberately leaves to other PRs
The same run's other two readings are #359's and merged.
test_the_composed_corpus_declares_every_control_row_archetypeis red onmainfor 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.jsandchrome.cssbut neither the trigger's offset rule nor thelf-pillclass on a chip, so the walk scope added here keeps its subject if that lands first.Automated fix for failed run