Repository navigation
LR-VIEW-ZOOM: a pinch holds the loupe's fit size, so it no longer renders at every zoom step - #2499
Merged
Merged
Conversation
…ders at every zoom step
Contributor
AlexChambers
added a commit
to AlexChambers/lightcraft
that referenced
this pull request
Oct 22, 2026
Merge current main and retain storytold#2499's production fix exactly. Keep the five controlled headless regressions and adapt the exact-deadline unit test to SizeHold::apply and display_fit. The base-relative diff adds tests only. Co-Authored-By: GPT-6 Astra <noreply@openai.com>
AlexChambers
added a commit
to AlexChambers/lightcraft
that referenced
this pull request
Oct 28, 2026
Merge current main and retain storytold#2499's production fix exactly. Keep the five controlled headless regressions and adapt the exact-deadline unit test to SizeHold::apply and display_fit. The base-relative diff adds tests only. Co-Authored-By: GPT-6 Astra <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Off
main.Problem
tests_preview_limit::in_the_loupe::a_pinch_holds_the_render_sizes_until_it_stopsfails intermittently onmain. Bisected to #2012 (merge a4cbdb4, thanks @ubergeneric): before it the test passed 20/20, at the #2012 merge it failed 8/8, and onmainit failed 17 of 20 runs. The cause isn't in the test: the display fit #2012 added (with_display_fit(drawn width, drawn height)inpanels/detail.rs) isn't held during a pinch.SizeHoldholds onlymain_edgeandwindow_edge, so every frame of a pinch asks for a Main render at a new size (762, 823, … 2560), the stream of renders #323/#351 was meant to prevent. Real users pay for it on every pinch, and the hosted FreeBSD job (which runscargo test --workspace) fails intermittently for every PR.Change
SizeHoldalso holds the display-fit size (display_fit(now, gesturing, fresh)): the size from before the gesture while one runs and forHOLD_SECSafter, then the size it ended at. It's cleared on a photo change like the other held sizes.panels/detail.rstakes that size once per frame and passes it to the Main, Before and (unchanged otherwise) at-rest jobs; the pixel size is clamped before theas usizecast.display_fitis called every frame, so the size is retaken as soon as the hold ends.a_pinch_holds_the_display_fit_size(region.rs), next toa_pinch_holds_the_render_sizes.docs/whats-new.mdentry;LR-VIEW-ZOOMrow and revision line updated.Not in this PR: the hover-preview job keeps its own fit (it only renders while not interacting); no change to the hold time or to what a pinch renders at the end.
How it was checked
cargo xtask ci: all 8 steps passed (before a rebase onto 2 unrelated commits frommain).a_pinch_holds_the_display_fit_sizefails with the hold disabled and passes with it.a_pinch_holds_the_render_sizes_until_it_stopspasses 10/10 with the fix; the othera_pinch_holds*tests pass.Screenshots
None: no visible change at rest.
Merging
panels/detail.rs, but neither touches the display fit orSizeHold.docs/whats-new.md(new2026-10-21heading at the top) and the end of thedocs/parity-checklist.mdrevision table.Checklist
Summary by CodeRabbit
Bug Fixes
Documentation