You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LR-VIEW-PHOTOGRID: the grid asks the image decoders for no thumbnail of a video (#2682) - #2765
Part of #2682 (split from #2678): the "do not queue an image decode for a file the image decoder cannot read" ask. The other half, retrying a failure only when its photo changes, is #2764.
Problem
Four of the six files #2682 lists are healthy MP4 videos. The grid asked the image decoders for their thumbnails, which failed with "unrecognised image format", put a "!" on the cell and were asked again whenever the library changed. Folder import never takes a video, but a Lightroom catalog import does: it keeps each record with Lightroom's format VIDEO and the kind Image (#2021 changes the kind to Video), and no thumbnail code looked at the kind.
Fix
Photo::is_video (crates/catalog/src/model.rs): the kind is Video, or the format is VIDEO, or the extension is one of mp4, mov, m4v, avi, mts, m2ts, 3gp, mkv, webm, wmv, mpg, mpeg. The format and the extension also catch libraries imported before Fix Lightroom catalog video classification and filtering #2021.
Session::thumb_job (crates/engine/src/media.rs) returns None for a video, so the grid, filmstrip, Compare and Build Previews ask for no thumbnail. No decode, no failure, no log line.
The background face search (needs_search in crates/engine/src/cmd/face_recognize.rs) skips videos too. It sent each one to the image decoders, and since a failed search is remembered only in memory (scan_failed), every launch tried each video again, silently. This is not in Six undecodable files are re-rendered 37 times each in 154 s of idle, 222 warnings in one log #2682: I found it while checking what else sends videos to the image decoders, and it uses the same Photo::is_video.
Not changed: opening a video in the loupe still fails with the decoder's message, and Build Previews still counts a video's view render as failed. Showing a frame needs a video decoder (LR-VID-PLAY).
render::thumbnail_tests::a_video_asks_the_decoders_for_no_thumbnail: through grid::request_thumb, a video by kind, by format VIDEO and by extension alone builds no job, queues nothing and has no failure, while a JPEG still gets its job. With the thumb_job check removed it fails (thumb_jobs_built 1 instead of 0).
cmd::face_recognize::imp::tests::a_video_is_not_searched_for_faces, beside a_photo_that_could_not_be_searched_is_left_alone_for_the_session: a video is not searched and is not queued, while a photo still is. Without the skip it fails.
cargo test -p lightcraft-engine --lib: 1248 passed, 1 failed: tests_import::recursive_discovery_includes_sony_sr2_and_srf_case_insensitively, a Windows path-separator failure already on main.
cargo test -p lightcraft-catalog --lib a_video_is_known: passed.
Video files are now recognized by type, format, or filename extension. Grid cells show a placeholder instead of attempting thumbnail decoding, and videos are excluded from background face searches.
…of a video (storytold#2682)
A video in the library (an MP4 or MOV from a Lightroom catalog import) went
to the image decoders for its grid thumbnail, failed with "unrecognised
image format", showed a "!" and was tried again whenever the library
changed (issue storytold#2682: four of its six undecodable files were healthy
videos). Photo::is_video recognises a video by its kind, by the format
VIDEO a Lightroom catalog gives it (its import still keeps them as images),
or by its extension; Session::thumb_job returns None for one, so the grid,
filmstrip, Compare and Build Previews ask for no thumbnail. The cell keeps
its plain placeholder.
Tests: model::edited_tests::a_video_is_known_by_its_kind_format_or_extension,
render::thumbnail_tests::a_video_asks_the_decoders_for_no_thumbnail (fails
on main: a job is built for the video).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
Reviewing files that changed from the base of the PR and between f53d559 and 746917e.
Files selected for processing: 3
crates/engine/src/media/session.rs
crates/ui-egui/src/render/thumbnail_tests.rs
docs/whats-new.md
Files skipped from review as they are similar to previous changes: 1
docs/whats-new.md
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
Walkthrough
The catalog now identifies videos by media kind, format, or filename extension. Thumbnail job creation and background face-search eligibility skip recognized videos. Tests cover video recognition and both exclusions.
Changes: Video handling
Layer / File(s)
Summary
Video identification crates/catalog/src/model.rs
Photo::is_video recognizes videos by media kind, Lightroom’s VIDEO format, or a listed filename extension. Tests cover matching and non-matching examples.
Skip video thumbnail jobs crates/engine/src/media/session.rs, crates/ui-egui/src/render/thumbnail_tests.rs, docs/whats-new.md
Session::thumb_job returns no job for videos. UI tests check repeated requests and confirm that regular photos still build thumbnail jobs. The release note describes the placeholder behavior and video handling.
Exclude videos from face search crates/engine/src/cmd/face_recognize.rs
Background face-search eligibility excludes videos. Tests verify that videos are excluded while regular photos remain eligible.
The supplied evidence identifies no actionable issue that should delay merging after normal checks.
Architecture risk: Low · up to 74691
The change affects 2 systems.
Changed systems:crates, docs
Architecture concerns
No architecture-level concerns identified.
Review details
Systems and components
observed — crates (service) was modified; 4 changed files map to changed impact.
observed — docs (service) was modified; 1 changed file maps to changed impact.
Before / after behavior
observed — Modified behavior in crates/catalog/src/model.rs: Added Photo::is_video, which recognizes videos by kind, VIDEO format, or a case-insensitive match against 12 filename extensions.
observed — Modified behavior in crates/catalog/src/model.rs: Added a test covering recognition by kind, Lightroom format, and video extensions, plus rejection of image formats, extensionless names, and dotfiles.
observed — Modified behavior in crates/engine/src/cmd/face_recognize.rs: needs_search now requires !photo.is_video() as well as library membership, so videos no longer qualify for background face searches.
observed — Modified behavior in crates/engine/src/cmd/face_recognize.rs: Added a test that creates a video photo and asserts it is excluded by needs_search and pending, while a regular photo remains eligible.
Pre-merge checks: 5
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly identifies the main change: preventing the grid from requesting thumbnails from image decoders for videos.
Docstring Coverage
Docstring coverage is inconclusive: files from earlier reviews still need to be rechecked within the check's analysis limits. Not blocking.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
Clippy (1.99.0)
Clippy execution timed out
Comment @coderabbitai help to get the list of available commands.
…id's thumbnails do
needs_search sent each video to the image decoders to look for faces; the
decode failed and the photo was left alone only for the session
(scan_failed is in memory), so every launch tried each video again,
silently. Photo::is_video now keeps videos out of the search, as it keeps
them out of the grid's thumbnails. The face search was not part of the
issue this PR fixes; it follows the same rule.
Test: cmd::face_recognize::imp::tests::a_video_is_not_searched_for_faces
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
Read the whole diff at f53d559. Photo::is_video (kind, VIDEO format, or a listed extension, with dot files and bare names excluded) is used by thumb_job to return None, and by the face scan needs_search to skip videos. Tests cover the helper, the scan and the grid (no jobs built, no failure marker, photos still asked for). gate / gate (ubuntu-24.04) and SonarCloud Scan are green at this head. No defects found.
…me, docs
Address the review at e7f9934:
- A video in a rendered export, print, contact sheet or slideshow is skipped
with a per-file warning instead of failing every other photo with "no such
photo"; Original format still copies the clip. Photo::is_video() is the one
check (kind, a Lightroom catalog's VIDEO format, or an mp4/mov/m4v
extension), used by the engine guards and the UI and ready to share with
storytold#2765.
- The bounded video probe no longer falls back to reading a whole .mp4 when
the file is ISO-BMFF: a clip cut off before its moov (mdat size 0) or a moov
over the cap is an error. The 64 MB cap applies to all metadata boxes
together, and top-level XMP uuid boxes are kept. Only a file whose bytes are
another format is read whole and probed as what it is.
- mvhd UTC times keep their Z offset; Apple's mdta
com.apple.quicktime.creationdate (with make/model/software/location) is
parsed and preferred, so iPhone clips keep their local time. Durations use
the ISO all-ones sentinel and the tkhd matrix entries use checked arithmetic,
with a hostile i32 test.
- Desktop videos get the same XMP titles, captions and keywords as the web
build: the kept boxes go through meta::extract and the container fills only
what is missing (tested with a top-level XMP uuid).
- read_udta_text honours the text length; the 10:00/07:20 comment is fixed;
the new messages are in all 17 catalogs and Duration is filled in ka/pl/vi.
- docs/whats-new and the parity checklist's Last updated/revision explain that
the LR-VID-PLAY partial is import and cataloguing, not playback.
New tests: mdat before moov with a 64-bit size, moov over the cap, a misnamed
.mp4, mdta/XMP metadata, matrix overflow, export/print/contact/slideshow skips
and legacy VIDEO guards. cargo xtask ci: fmt, clippy, heif, test, parity,
layers and assets pass; wasm needs the wasm32 target on this machine.
d-rouge
added a commit
to d-rouge/lightcraft
that referenced
this pull request
Oct 25, 2026
…me, docs
Address the review at e7f9934:
- A video in a rendered export, print, contact sheet or slideshow is skipped
with a per-file warning instead of failing every other photo with "no such
photo"; Original format still copies the clip. Photo::is_video() is the one
check (kind, a Lightroom catalog's VIDEO format, or an mp4/mov/m4v
extension), used by the engine guards and the UI and ready to share with
storytold#2765.
- The bounded video probe no longer falls back to reading a whole .mp4 when
the file is ISO-BMFF: a clip cut off before its moov (mdat size 0) or a moov
over the cap is an error. The 64 MB cap applies to all metadata boxes
together, and top-level XMP uuid boxes are kept. Only a file whose bytes are
another format is read whole and probed as what it is.
- mvhd UTC times keep their Z offset; Apple's mdta
com.apple.quicktime.creationdate (with make/model/software/location) is
parsed and preferred, so iPhone clips keep their local time. Durations use
the ISO all-ones sentinel and the tkhd matrix entries use checked arithmetic,
with a hostile i32 test.
- Desktop videos get the same XMP titles, captions and keywords as the web
build: the kept boxes go through meta::extract and the container fills only
what is missing (tested with a top-level XMP uuid).
- read_udta_text honours the text length; the 10:00/07:20 comment is fixed;
the new messages are in all 17 catalogs and Duration is filled in ka/pl/vi.
- docs/whats-new and the parity checklist's Last updated/revision explain that
the LR-VID-PLAY partial is import and cataloguing, not playback.
New tests: mdat before moov with a 64-bit size, moov over the cap, a misnamed
.mp4, mdta/XMP metadata, matrix overflow, export/print/contact/slideshow skips
and legacy VIDEO guards. cargo xtask ci: fmt, clippy, heif, test, parity,
layers and assets pass; wasm needs the wasm32 target on this machine.
main split media.rs into media/ and moved render.rs's thumbnail tests to render/thumbnail_tests.rs
(storytold#3103): thumb_job's video check moves with it to media/session.rs, the grid test to thumbnail_tests.rs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfjNkJiMUagz3DN3zoV2rV
The reason will be displayed to describe this comment to others. Learn more.
Reviewed current head f53d559 and existing review, including Photo::extension/is_video, thumb_job, grid::request_thumb and background face-scan eligibility. No additional concrete introduced defect found. The video guard returns before thumbnail/quick-thumbnail job creation and excludes the background face search; the image path remains intact. The extension fallback deliberately also identifies older catalog entries whose kind still says Image.
Local validation: all changed Rust files pass rustfmt --edition 2024 --check. I did not execute the new catalog, face-scan or UI tests. Full dependency validation is blocked by client-credential transport failures; I did not repeat the known pinned egui fetch or change security settings. The head's Ubuntu gate and SonarCloud checks report success; those are CI results. The author-reported tests are not independent local verification. COMMENT for the unexecuted thumbnail/scan integration coverage.
The gate failure on 746917e (run 40453832859) is tests::slideshow::a_manual_slideshow_waits_for_the_arrow_keys: its click on Settings ▸ Slideshow ▸ Manual was cancelled because the checkbox moved 21 px before the release ("moved before its release; nothing was retargeted"). That is the Slideshow settings layout shift that @nledford's #2848 fixes. This PR doesn't touch the slideshow or Settings, and the other 1585 ui-egui tests passed.
d-rouge
added a commit
to d-rouge/lightcraft
that referenced
this pull request
Oct 27, 2026
…me, docs
Address the review at e7f9934:
- A video in a rendered export, print, contact sheet or slideshow is skipped
with a per-file warning instead of failing every other photo with "no such
photo"; Original format still copies the clip. Photo::is_video() is the one
check (kind, a Lightroom catalog's VIDEO format, or an mp4/mov/m4v
extension), used by the engine guards and the UI and ready to share with
storytold#2765.
- The bounded video probe no longer falls back to reading a whole .mp4 when
the file is ISO-BMFF: a clip cut off before its moov (mdat size 0) or a moov
over the cap is an error. The 64 MB cap applies to all metadata boxes
together, and top-level XMP uuid boxes are kept. Only a file whose bytes are
another format is read whole and probed as what it is.
- mvhd UTC times keep their Z offset; Apple's mdta
com.apple.quicktime.creationdate (with make/model/software/location) is
parsed and preferred, so iPhone clips keep their local time. Durations use
the ISO all-ones sentinel and the tkhd matrix entries use checked arithmetic,
with a hostile i32 test.
- Desktop videos get the same XMP titles, captions and keywords as the web
build: the kept boxes go through meta::extract and the container fills only
what is missing (tested with a top-level XMP uuid).
- read_udta_text honours the text length; the 10:00/07:20 comment is fixed;
the new messages are in all 17 catalogs and Duration is filled in ka/pl/vi.
- docs/whats-new and the parity checklist's Last updated/revision explain that
the LR-VID-PLAY partial is import and cataloguing, not playback.
New tests: mdat before moov with a 64-bit size, moov over the cap, a misnamed
.mp4, mdta/XMP metadata, matrix overflow, export/print/contact/slideshow skips
and legacy VIDEO guards. cargo xtask ci: fmt, clippy, heif, test, parity,
layers and assets pass; wasm needs the wasm32 target on this machine.
…me, docs
Address the review at e7f9934:
- A video in a rendered export, print, contact sheet or slideshow is skipped
with a per-file warning instead of failing every other photo with "no such
photo"; Original format still copies the clip. Photo::is_video() is the one
check (kind, a Lightroom catalog's VIDEO format, or an mp4/mov/m4v
extension), used by the engine guards and the UI and ready to share with
storytold#2765.
- The bounded video probe no longer falls back to reading a whole .mp4 when
the file is ISO-BMFF: a clip cut off before its moov (mdat size 0) or a moov
over the cap is an error. The 64 MB cap applies to all metadata boxes
together, and top-level XMP uuid boxes are kept. Only a file whose bytes are
another format is read whole and probed as what it is.
- mvhd UTC times keep their Z offset; Apple's mdta
com.apple.quicktime.creationdate (with make/model/software/location) is
parsed and preferred, so iPhone clips keep their local time. Durations use
the ISO all-ones sentinel and the tkhd matrix entries use checked arithmetic,
with a hostile i32 test.
- Desktop videos get the same XMP titles, captions and keywords as the web
build: the kept boxes go through meta::extract and the container fills only
what is missing (tested with a top-level XMP uuid).
- read_udta_text honours the text length; the 10:00/07:20 comment is fixed;
the new messages are in all 17 catalogs and Duration is filled in ka/pl/vi.
- docs/whats-new and the parity checklist's Last updated/revision explain that
the LR-VID-PLAY partial is import and cataloguing, not playback.
New tests: mdat before moov with a 64-bit size, moov over the cap, a misnamed
.mp4, mdta/XMP metadata, matrix overflow, export/print/contact/slideshow skips
and legacy VIDEO guards. cargo xtask ci: fmt, clippy, heif, test, parity,
layers and assets pass; wasm needs the wasm32 target on this machine.
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
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.
Part of #2682 (split from #2678): the "do not queue an image decode for a file the image decoder cannot read" ask. The other half, retrying a failure only when its photo changes, is #2764.
Problem
Four of the six files #2682 lists are healthy MP4 videos. The grid asked the image decoders for their thumbnails, which failed with "unrecognised image format", put a "!" on the cell and were asked again whenever the library changed. Folder import never takes a video, but a Lightroom catalog import does: it keeps each record with Lightroom's format
VIDEOand the kindImage(#2021 changes the kind toVideo), and no thumbnail code looked at the kind.Fix
Photo::is_video(crates/catalog/src/model.rs): the kind isVideo, or the format isVIDEO, or the extension is one of mp4, mov, m4v, avi, mts, m2ts, 3gp, mkv, webm, wmv, mpg, mpeg. The format and the extension also catch libraries imported before Fix Lightroom catalog video classification and filtering #2021.Session::thumb_job(crates/engine/src/media.rs) returnsNonefor a video, so the grid, filmstrip, Compare and Build Previews ask for no thumbnail. No decode, no failure, no log line.needs_searchincrates/engine/src/cmd/face_recognize.rs) skips videos too. It sent each one to the image decoders, and since a failed search is remembered only in memory (scan_failed), every launch tried each video again, silently. This is not in Six undecodable files are re-rendered 37 times each in 154 s of idle, 222 warnings in one log #2682: I found it while checking what else sends videos to the image decoders, and it uses the samePhoto::is_video.grid.rsalone because LR-VIEW-FILMSTRIP: filmstrip and grid thumbnails share one overlay, and it degrades on narrow tiles #2164 rewrites that placeholder; a video tile can follow once it lands.Not changed: opening a video in the loupe still fails with the decoder's message, and Build Previews still counts a video's view render as failed. Showing a frame needs a video decoder (LR-VID-PLAY).
Test
model::edited_tests::a_video_is_known_by_its_kind_format_or_extension.render::thumbnail_tests::a_video_asks_the_decoders_for_no_thumbnail: throughgrid::request_thumb, a video by kind, by formatVIDEOand by extension alone builds no job, queues nothing and has no failure, while a JPEG still gets its job. With thethumb_jobcheck removed it fails (thumb_jobs_built1 instead of 0).cmd::face_recognize::imp::tests::a_video_is_not_searched_for_faces, besidea_photo_that_could_not_be_searched_is_left_alone_for_the_session: a video is not searched and is not queued, while a photo still is. Without the skip it fails.Checks (Windows 11, CPU only:
LIGHTCRAFT_GPU=0)cargo test -p lightcraft-ui-egui --lib: 1225 passed, 6 failed. The six aretests_model_setup::*, which need the engine'sdenoisefeature that a single-crate build leaves off ("this build cannot run denoise models"); the same six fail on LR-VIEW-PHOTOGRID: a thumbnail that can't be read is tried again only when its photo changes (#2682) #2764's branch, which shares only main with this one.cargo test -p lightcraft-engine --lib: 1248 passed, 1 failed:tests_import::recursive_discovery_includes_sony_sr2_and_srf_case_insensitively, a Windows path-separator failure already on main.cargo test -p lightcraft-catalog --lib a_video_is_known: passed.cargo clippy --keep-going -p lightcraft-catalog -p lightcraft-engine -p lightcraft-ui-egui --all-targets -- -D warnings: the only error is the Windowsunused variable: gvfsincrates/engine/src/doc_path.rs:66, which is on main and fixed by Tests: fix the Windows clippy failure in doc_path's GVfs check (unused variable since #2412) #2746.cargo fmt --check,cargo xtask parity,layersandassetspass. Not run: the fullcargo xtask ci.Overlap
render.rs,grid.rs,media.rsor the catalog model. Pair RAW and JPEG files for optional culling #1231 and M12: content search 4/8 — search by contents, Relevance sort, Find Similar Contents #1608–M12: content indexing reads a raw's preview from its planned ranges #1612 skipMediaKind::Videoin their own features, the same rule.🤖 Generated with Claude Code
Summary by CodeRabbit