Skip to content

Measure code Copy geometry after changing its source - #1886

Merged
leaf-agent merged 2 commits into
mainfrom
fix/ci-37410124504-code-copy
Oct 6, 2026
Merged

leaf-agent merged 2 commits into
mainfrom
fix/ci-37410124504-code-copy

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

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.

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.
@leaf-agent
leaf-agent merged commit a2d1070 into main Oct 6, 2026
4 of 5 checks passed
@leaf-agent
leaf-agent deleted the fix/ci-37410124504-code-copy branch October 6, 2026 08:05
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]>
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