M3: full screen loops after the last page, by preference (#379) #7875
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.52) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #7875"
general
weight: 0.35
mansur-akhmadi
What this changes
This adds Acrobat's Loop after last page full-screen preference. It sits in Preferences ▸ Documents and view, next to "Esc leaves full screen", and is off by default. It's one of the presentation options tracked in #379 (claimed there).
With it on, in full screen:
DocView::step_page, so they all loop./Dur) on the last page also goes on to the first, so a timed document runs as a kiosk loop.The preference is saved with the others (
full_screen_loop). The UI control channel sets it likefull-screen-fillandfull-screen-escape:set key=full-screen-loop value=on|off. Changing it applies to open documents straight away, because Preferences can be opened while in full screen (PdfCraftApp::set_full_screen_loop).!Preferences, light
!Preferences, dark
How you verified it
Commands, on macOS (Apple Silicon):
cargo test -p pdfcraft-ui-egui --lib: 1054 passed. This includes two new unit tests:-
canvas::tests::full_screen_loops_from_the_last_page_or_spread_to_the_first_only_when_askedcovers single page, two-up, two-up with a cover, the preference off, outside full screen, back from the first page, one page and one spread.-
canvas::tests::a_display_time_on_the_last_page_loops_to_the_first_when_askedchecks that with loop off the page stays, with loop on it goes to page 1, and a one-page document doesn't ask for a frame after frame.cargo test -p pdfcraft-ui-egui --test it -- full_screen: 46 passed, including the newview::full_screen_loops_after_the_last_page_when_the_preference_is_on. It checks that:- the preference is off by default, so End then Space stays on the last page;
- a bad value is refused;
- turning it on during full screen takes effect at once, so Space now goes to page 1;
- it survives
persist/restore.- With the
step_pageand presenter changes reverted, all three new tests fail (left: 2, right: 0).- With
set_full_screen_loopno longer updating open views, the integration test fails.--test itsuite: 1934 passed and 10 failed. The failures areocr::×8,comments::the_selection_bar_stays_inside_the_pages_areaandediting::a_custom_property_whose_name_the_tools_refuse_is_listed_and_left_alone. The same 10 fail on a cleanmain(043ccbdf) on this machine: no OCR models, and font and layout differences. They aren't touched by this change.cargo xtask parity: passes.PDFCRAFT_SYSTEM_FONTS=0.cargo fmt --check-D warningson the crates I changed (cargo clippy -p pdfcraft-ui-egui --all-targets -- -D warnings)main, see above)cargo xtask layersandcargo xtask assets: N/A, no crate boundaries or assets touchedNot run locally: the wasm check and the rest of the workspace. CI runs both.
Never-crash
unwrap/expect/panic!/unreachable!/todo!outside testsunsafeProvenance
ATTRIBUTION.tomlentry: N/A, no assetsSecurity
setkeyParity and reach
parity/acrobat-features.tomlis updated:-
view.full-screen-presentationandmisc.prefs-full-screensay loop is done and list what's still missing (advance every N seconds, a default transition, ignoring the document's transitions, a navigation bar, …). The new tests are added as evidence, and both entries staypartial.-
view.full-screenno longer lists loop as missing.docs/ui-parity.mddoesn't list the full-screen preferences one by one.Anything a reviewer should look at first
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Full-screen presentations can loop from the last page or spread back to the first, including during timed playback.
Enable this with the “Loop after last page” preference. It’s off by default, saved between sessions, and applies to open documents.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->