Repository navigation
Measure code Copy geometry after changing its source - #1886
Merged
Merged
Conversation
The browser copy test replaced a long source line with a fitting one, then compared the resulting block height with the stale height recorded before the edit. This could fail while the Copy control and focus behavior were correct. Record the frame after the source edit so the assertion still protects geometry through the subsequent touch and keyboard gestures.
This was referenced Oct 6, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 6, 2026
The [main CI run](https://github.com/max-sixty/leaf/actions/runs/37423492016) failed the README media check because #1871 changed three README URLs to asset revision `04db6cf8` while `leaf-assets.json` still pins media revision `1638ca30`. The intervening asset commits changed only thread snapshots, so this restores the README URLs to the existing media pin and keeps the demo images unchanged. `uv run pytest -q -n0 tests/test_site.py::test_the_readme_draws_its_images_from_the_pinned_assets` failed before the change and passes after it. This PR fixes that failure only; the compact comment and focus ring failures in the same run have separate diagnostics. The code Copy failure was already fixed by #1886. Co-authored-by: leaf-agent <[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 failed the code Copy browser test because the test compared a block's height after replacing its source with a measurement taken before the edit. The replacement can change the block's height. This PR measures again after the edit and waits for the block's scroll-state styling to settle before recording that baseline. The existing assertion then checks that touch and keyboard gestures leave the block's geometry intact.
The focused test failed with a 45 px versus 53 px height comparison before the change and passed in three consecutive runs after the complete fix:
uv run pytest -q -n0 tests/test_render_anchors.py::test_code_copy_keeps_source_and_stays_beside_scrolling_and_revised_blocks.This fixes one of that run's six failed cases. The other five passed in focused runs on this checkout; they need separate diagnosis.