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-IMP-ADD-DIALOG: library.import reports what its folder walk skipped (#4319) - #4321
library.importPreview says what its folder walk left out (skipped: {unreadable, unsupported}), but library.import didn't. A script or MCP client that imports a folder directly had no way to tell a file that was skipped from one that is missing.
Change
ImportJob::prepare now expands with expand_report, the same walk the preview uses. It carries the two counts in Prepared.skipped into ImportReport.skipped. ImportJob::expand returns the same files as before.
The library.import reply now has skipped: {unreadable, unsupported}. It counts the same way as the preview: XMP sidecars aren't counted, and a file named directly in paths is always tried (and lands in failed if it isn't a photo), so it never counts as skipped.
The library.import spec text, the LR-IMP-ADD-DIALOG checklist row and whats-new.md are updated.
The app's own import review already shows these counts (#2944). The UI import task, which expands the folders itself and prepares the files in chunks, is unchanged.
Test tests::import::import_reports_what_the_folder_walk_skipped imports a folder with two PNGs, an XMP sidecar, a .txt and a .md. It checks that the reply reports {"unreadable": 0, "unsupported": 2} and matches the preview, and that a .txt named on its own fails rather than counting as skipped. Before the change, skipped was missing (Null).
fmt, clippy -D warnings, engine (1698) and UI (1935) tests, cargo xtask wasm and cargo xtask parity all pass locally.
Written with AI assistance (Claude), reviewed and tested by me.
Summary by CodeRabbit
Bug Fixes
Folder imports now report counts for unreadable folders and unsupported files that were skipped, consistent with import previews. Directly named unsupported files are still attempted and reported as failed rather than counted as skipped.
Documentation
Updated import command documentation and release notes to describe the skipped-file counts and clarify how these counts are reported.
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.
No actionable comments were generated in the recent review.
Walkthrough
library.import now reports unreadable and unsupported entries omitted during folder walking. The import report receives counts from folder expansion. Documentation describes the response field alongside library.importPreview.
Changes: Import skipped-file reporting
Layer / File(s)
Summary
Capture and return skipped counts crates/engine/src/import/types.rs, crates/engine/src/import.rs, crates/engine/src/import/job.rs, crates/engine/src/import/commit.rs, crates/engine/src/import/files.rs
Prepared records unreadable and unsupported folder-walk counts. commit_prepared copies those counts into ImportReport.skipped, which is publicly re-exported.
Validate and document skipped counts crates/engine/src/tests/import.rs, crates/engine/src/cmd/library/specs.rs, docs/parity-checklist.md, docs/whats-new.md
A regression test compares import skipped counts with preview counts and checks that a directly named unsupported file is reported as failed, not skipped. Command documentation and release notes describe the skipped counts.
sequenceDiagram
participant ImportJob
participant expand_report
participant Prepared
participant commit_prepared
participant ImportReport
ImportJob->>expand_report: Expand folder and collect walk counts
ImportJob->>Prepared: Store files and skipped counts
Prepared->>commit_prepared: Provide prepared import
commit_prepared->>ImportReport: Copy skipped counts
Loading
Suggested reviewers:aiongg, eliets2
Merge Risk: Minimal · previous review dd7b9
library.import replies now include counts of unreadable folders and unsupported files skipped during a folder walk, matching library.importPreview. The change is additive and has regression coverage, and no merge-blocking risk is evident.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the ticket prefix and the behavior change: library.import now reports what its folder walk skipped. The changeset adds skipped counts (unreadable, unsupported) to the import reply, and…
Linked Issues check
Issue #4319 asks that library.import report what its folder walk left out, as library.importPreview does, using skipped: {unreadable, unsupported}. At head dd7b982, ImportJob::prepare in `cra…
Out of Scope Changes check
The raw summary lists changed files: cmd/library/specs.rs (spec text), import.rs (re-export of Skipped), import/commit.rs (copies counts into the report), import/files.rs (test-only `expand_…
Full details: Title check
Explanation
The title names the ticket prefix and the behavior change: library.import now reports what its folder walk skipped. The changeset adds skipped counts (unreadable, unsupported) to the import reply, and the title matches that main change. The ticket prefix LR-IMP-ADD-DIALOG refers to a parity checklist row the PR also updates, so the title is specific and accurate.
Full details: Linked Issues check
Explanation
Issue #4319 asks that library.import report what its folder walk left out, as library.importPreview does, using skipped: {unreadable, unsupported}. At head dd7b982, ImportJob::prepare in crates/engine/src/import/job.rs calls expand_report and sets Prepared.skipped from the walk's unreadable and unsupported counts. ImportJob::expand returns expand_report(paths).files, so the returned file list is unchanged. The raw summary reports that commit_prepared copies prepared.skipped into ImportReport.skipped and that types.rs adds Skipped and ImportReport.skipped. The library.import spec documents the field. The change since the previous review is limited to the head that the previous assessment already covered, and the job.rs content at head matches that assessment. The test import_reports_what_the_folder_walk_skipped could not be verified at head. The file read was truncated before the test, and the whole-PR diff for tests/import.rs was unavailable because changed blobs are missing from the checkout. The author reports the test passes. This review did not run it. The implementation evidence supports the objective and the issue's expected behaviour.
Full details: Out of Scope Changes check
Explanation
The raw summary lists changed files: cmd/library/specs.rs (spec text), import.rs (re-export of Skipped), import/commit.rs (copies counts into the report), import/files.rs (test-only expand_knowing gating and a Default fill-in for Prepared), import/job.rs (carries walk counts through Prepared), import/types.rs (adds Skipped and ImportReport.skipped), tests/import.rs (new test), docs/parity-checklist.md (LR-IMP-ADD-DIALOG row) and docs/whats-new.md. Each file supports the #4319 objective or its documentation. The UI import task is not in the changed-file list, which matches the PR description. The head content of job.rs matches the summary. The text diffs for the other files could not be read because changed blobs are missing, so this verdict rests on the summary and the job.rs head content.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between dfbff20 and dd7b982.
Files selected for processing: 2
docs/parity-checklist.md
docs/whats-new.md
Files skipped from review as they are similar to previous changes: 2
docs/parity-checklist.md
docs/whats-new.md
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
library.import now returns skipped: {unreadable, unsupported}, as
library.importPreview does, so a script can tell a skipped file from a
missing one. ImportJob::prepare walks with expand_report and carries the
counts through Prepared into ImportReport; a file named on its own is
still tried and never counted.
Adapted from upstream #4321 (the fork keeps import in one module and the
tests in tests_import.rs).
Manual: docs/manual/import-export.md (command-line section)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
The skipped-count change is still needed: current main reports it in Preview but not Import. I verified that the preview and import regressions passed on Ubuntu and Windows in the November 19 merge preview. This branch now conflicts with current main, where ImportJob::expand reuses the already-listed folders and files to avoid repeat checks on network shares. When resolving the conflict, keep that path and use its report-returning walker to carry the skipped counts into the direct command result. Please verify both named regressions on the integrated head and retain the existing no-repeat-check behavior. The older passing runs do not cover that combination.
The reason will be displayed to describe this comment to others. Learn more.
Re-reviewed the current head. Direct import now returns the same skipped counts as import preview, while still trying files named explicitly. The shared folder walk preserves reuse of already-listed files and folders, avoiding repeat checks on network shares. Both hosted Ubuntu and Windows gates passed the two skipped-count regressions and the listed-folder reuse tests.
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.
Fixes #4319.
library.importPreviewsays what its folder walk left out (skipped: {unreadable, unsupported}), butlibrary.importdidn't. A script or MCP client that imports a folder directly had no way to tell a file that was skipped from one that is missing.Change
ImportJob::preparenow expands withexpand_report, the same walk the preview uses. It carries the two counts inPrepared.skippedintoImportReport.skipped.ImportJob::expandreturns the same files as before.library.importreply now hasskipped: {unreadable, unsupported}. It counts the same way as the preview: XMP sidecars aren't counted, and a file named directly inpathsis always tried (and lands infailedif it isn't a photo), so it never counts as skipped.library.importspec text, the LR-IMP-ADD-DIALOG checklist row andwhats-new.mdare updated.The app's own import review already shows these counts (#2944). The UI import task, which expands the folders itself and prepares the files in chunks, is unchanged.
Test
tests::import::import_reports_what_the_folder_walk_skippedimports a folder with two PNGs, an XMP sidecar, a.txtand a.md. It checks that the reply reports{"unreadable": 0, "unsupported": 2}and matches the preview, and that a.txtnamed on its own fails rather than counting as skipped. Before the change,skippedwas missing (Null).fmt, clippy
-D warnings, engine (1698) and UI (1935) tests,cargo xtask wasmandcargo xtask parityall pass locally.Written with AI assistance (Claude), reviewed and tested by me.
Summary by CodeRabbit