Repository navigation
Conversation
image_pixels_follow_the_frame_while_a_corner_is_dragged drags before the asynchronous page raster has arrived on a slow runner, and the preview (drawn from that raster) then draws no picture: 'not only at []' on windows-latest for storytold#3070 and storytold#3071 (a deny.toml-only change). With a 300 ms render delay added locally, main's test fails the same way and this one passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RUNQSPVXx3dDBabRZHAnjz
40380b8 to
b15fe91
Compare
|
Thanks for tracking this down and reproducing the timing issue. Sorry I missed your earlier PR before opening #3129. I compared both with current main, and #2812 has already landed a wait before each drag that checks for the visible page raster as well as completed rendering. That covers the extra settling in mine too, so I’m closing #3129 rather than adding redundant waits. I appreciate the work you put into this. |
FredApps
left a comment
There was a problem hiding this comment.
Read the whole diff. It adds a bounded wait (up to 400 steps of 5 ms, one step per pass) for the page raster before the drag, then asserts it arrived, so a slow runner now fails with a clear message instead of an empty drag preview. That addresses the cause you describe and touches only the test. CI is green at this head.
What this changes
image_pixels_follow_the_frame_while_a_corner_is_dragged(crates/ui-egui/tests/editing.rs, from #1677) fails intermittently ontest (windows-latest)with:Two recent examples:
deny.toml.So it isn't the PRs.
Cause. The drag preview draws the picture from the page raster, which arrives asynchronously. The test drags four frames after opening the document and never waits for that raster. On a slow runner it isn't there yet, so the preview draws no picture at all, hence the empty list.
Fix (test only). Before selecting and dragging, wait until
render_pending()is false (up to 2 s), as other tests in this file do. Then assert that the raster arrived. No product code changes.How you verified it
main's test then fails with the CI message (not only at []), and with this change it passes.cargo fmt --all -- --check,cargo clippy -p pdfcraft-ui-egui --tests -- -D warnings🤖 Generated with Claude Code
https://claude.ai/code/session_01RUNQSPVXx3dDBabRZHAnjz