Repository navigation
Description
Found on the windows-latest leg of #1148's CI (run https://github.com/storytold/lightcraft/actions/runs/40637817821/job/122649210982, head 1b7c6db, 2026-10-28). #1148 only adds CI legs, so the test is intermittent on main, not broken by that PR. It was the only failure in the run (1585 passed, 1 failed).
Summary
tests::drop_import::a_queued_photo_drop_survives_the_choosers_new_library_prompt_and_cancel (crates/ui-egui/src/tests/drop_import.rs:326) sometimes clicks New Library… while the launch list is still changing size. The button moves between the press and the release. ui.clickWidget correctly cancels the click, and the test's assert_eq!(r["ok"], true) fails:
panicked at crates\ui-egui\src\tests\drop_import.rs:326:5:
assertion `left == right` failed: {"error":"ui.clickWidget canceled: widget `button:libraryNew` moved before its release; nothing was retargeted","ok":false}
Why the button moves
The test's helper draw_launch_list builds the list with LibraryProblem::choose_later, as the app does at launch. Every recent library's row starts as Checking…, an extra line of text, and library_problem::logic checks each folder on a worker thread (start_checks). When the answer arrives (apply_answers), that line goes away and the row gets shorter. The window is anchor(CENTER_CENTER) and sized to its contents, so it shrinks and the buttons below the list move. app_with_library opens a library, so the list has one row, and that row's answer can arrive at any frame.
The helper only waits for button:libraryOpen to be drawn. On a fast machine the check answers within a few frames, before the test clicks. On a loaded runner it can answer between the click's press and its release. The click helper is right to refuse it.
The other launch-list tests don't have this problem. Those in launch_library.rs and library_problem.rs build the list with LibraryProblem::choose (answers filled in synchronously). Where they use choose_later they wait until no row is checking before they click (e.g. a_failed_open_or_an_unreadable_catalog_doesnt_mark_a_library_missing). Only drop_import.rs's helper skips that wait. Eight tests in that file click a launch-list widget after it. Two of them have a library open, so their list has a row whose answer can land late: this one and a_queued_photo_drop_imports_into_the_library_opened_from_the_list (libraryRecent:1, then button:libraryOpen).
Reproduction
Forced race (a throwaway patch, not committed): the list's check (RecentChecks::with_check) answers only once the click's press has gone in, and a frame hook (set_after_raw_input_hook, made to run every frame) waits 300 ms on the press frame so the answer lands before the release. On main (b2d8989) it fails with the same error as the Windows run:
zz rows=1
zz pressed_hook_fired=true
assertion `left == right` failed: {"error":"ui.clickWidget canceled: widget `button:libraryNew` moved before its release; nothing was retargeted","ok":false}
Without the patch the test passes when the check answers within a few frames, as on the same run's ubuntu-24.04 and macos-latest legs, which both passed.
Proposed fix
In draw_launch_list, wait until every row has its answer, then until the window stops moving (the anchored window takes a frame to re-centre). This is the same wait the launch_library.rs tests use. ui.clickWidget's refusal stays as it is.
Worth a look separately (not part of the fix): a real user sees the same jump. The launch list's buttons shift by half a line when the last Checking… line goes away, so a click aimed as it lands can miss. Reserving the status line's height would stop that, but it changes how the window looks, so that's a design call.
Related
- macOS: a_manual_slideshow_waits_for_the_arrow_keys clicks the Manual checkbox while the Slideshow page is still moving #3229: the same kind of flake (a click while the Settings ▸ Slideshow page is still moving), worked on in LRC-SS-LAYOUT: the Slideshow settings page no longer moves when the slide preview finishes rendering #2848. That fix is in the Slideshow page's layout, so it doesn't cover this test.
Activity
test(ui-egui): drop_import's launch list waits for its library checks…
ticket-craft commentedon Oct 30, 2026
Thanks! This ticket describes several separate problems:
It helps a lot if each one has its own ticket, so they can be tracked and fixed separately.
Possibly related: #2774.
test(ui-egui): drop_import's launch list waits for its library checks…
Merge PR #3369: Issue #3368: drop_import's launch-list tests wait for…