Repository navigation
Test the visual-part reaction after native Space activation - #2582
Merged
Merged
Conversation
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.
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 -n0with their two node IDs).