Skip to content

Test the visual-part reaction after native Space activation - #2582

Merged
leaf-agent merged 1 commit into
mainfrom
fix/ci-38235572771-reaction
Oct 12, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/ci-38235572771-reaction

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

The main CI run also failed the visual-part reaction test's assertion that Space clicks a button on keydown. #2567 intentionally gave a focused button its native Space activation, which clicks on keyup. This PR presses Space normally and keeps the test's checks for the send, announcement, visual anchor, and replay.

The old assertion fails on current main; the corrected test passes with the comparison case in a focused local run (uv run pytest -q -n0 with their two node IDs).

The keyboard register now leaves a focused button's Space press to the browser. The old keydown assertion expected a click before keyup, so it failed despite the reaction working. Press Space normally and keep the send, announcement, event-anchor, and replay assertions.
@leaf-agent
leaf-agent merged commit 9c64b52 into main Oct 12, 2026
2 checks passed
@leaf-agent
leaf-agent deleted the fix/ci-38235572771-reaction branch October 12, 2026 12:08
max-sixty added a commit that referenced this pull request Oct 12, 2026
…parison paint to one report (#2588)

`main`'s push `ci` has not completed green since #2568. The last two
completed runs
([38235572771](https://github.com/max-sixty/leaf/actions/runs/38235572771)
on 1ace63b,
[38244446941](https://github.com/max-sixty/leaf/actions/runs/38244446941)
on e5aca3e) failed three `main`-tier tests. Two are already fixed on
`main`; this PR fixes the third and tightens one of the fixed ones.

## Behaviour that changed

- **`test_an_export_keeps_its_quiet_words_off_screen` runs again.**
#2555 removed the `x-paints` key and the `state` property from
`declared_reading_package`, but this test still wrote `<lf-reading
state="done">`, so `page check` refused the page before the export ran
(`Additional properties are not allowed ('state' was unexpected)`). The
test is `main`-tier and lives in a file #2555 did not edit, so
`--changed-since` never selected it. It now takes its quiet word from a
highlighted `lf-code` line, which the default package draws, and drops
the fixture. With `.lf-quiet`'s clip removed from the theme, the test
fails, as it did before.
- **A failed comparison paint must be reported exactly once.**
`test_a_comparison_mark_that_failed_on_return_keeps_following_the_comparison`
counted only `leaf:` reports, and its comment expected a second,
uncaught record of the throw. Since #2575, `readingPaint` reports the
failure once and nothing escapes. On current `main` the page records one
error, `leaf: paint failed for lf-tabs#views: …`. The test now requires
exactly that error. A paint that also rethrows from a microtask fails
it.

The other two failures need nothing more.
`test_a_reaction_on_a_visual_part_names_that_part` was fixed by #2582,
and the comparison test's arrangement by #2581.

## Evidence

- On `main` 4f81e81, the export test fails with the refusal above.
With this change it passes.
- `leaf-dev flake` (18 copies, six at a time) passed 18/18 for the
export test, the comparison test and the reaction test. A flake run of
`tests/test_render_words_watch.py` also passed 18/18 for every test.
That file's `TypeError: Cannot read properties of null (reading
'present')` did not reproduce on `main` and is not in either failed
run's log.
- The other two `declared_reading_package` tests still pass
(`test_the_render_gate_catches_a_declared_word_that_never_reached_the_page`,
`test_a_word_the_revision_adds_to_a_surviving_element_is_said`).

Hand-written source delta: 0 lines. Test delta: +10 −12
(`tests/test_render_export.py` +8 −10,
`tests/test_render_options_settled.py` +2 −2).

> _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.

1 participant