Found while testing crates/catalog/src/query.rs:178 (token_matches, the "date" branch at :215)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Found while testing crates/catalog/src/model.rs:160 (parse_shutter_seconds)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs/parity-checklist.md, docs/ui-parity.md: headers, the KEYC-METADATA and LRC-LIB-KEYWORDS rows carry both sides' changes; revision rows kept from both.
With both set (only via library.filter) they AND, but the chip and the
bar's buttons showed their union. Filter::flags_shown gives the flags
that pass both; the chip names both constraints when none does.
A rule set is now tested cheapest rule first (numbers, choices and yes/no, then lists and
dates, then text and paths, then smart albums), worked out once per prepared filter and per
smart album, not per photo. Photos matched are the same; the editor still shows the user's order.
While a smart album tests itself, or a chain of smart albums reaches the depth limit, rules are
tested as written, since there an answer can depend on which album is asked first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follows main's split of menus.rs into menus/ and of the keyword tests into
keywords/tests.rs: Set Keyword Shortcut moves to menus/ui_commands.rs and
menus/run.rs, its catalog test to keywords/tests.rs, and the docs name the
moved test files.
Session::commit now goes through Catalog::apply_new, which looks at what an op would do to
which album tests which (AlbumGraph, foresee) before doing it, and refuses one that puts a
smart album on a loop: alone, in a batch, or as a new album. Undo, redo, replay and opening a
library still bring back what was, loops included.
Return an error when either file index is zero. Keep the resolved-path fallback for lenient comparisons. Test both unknown-identity orderings and distinguish identity lookup failures from known-original refusals.
Merge main at 662df66f.
The outermost question in smart_album_holds inserted its answer into ANSWERS, and the Forget guard cleared the map as the same call returned, so no question could ever read that entry. Each photo still paid a hash and an insert for it. Only answers worked out by a nested question are kept now; they are shared across the outer question as before.
No behavior change: EVALUATED is counted before the change, nested answers and the depth and cycle limits are untouched.
main split media.rs into media/ and moved render.rs's thumbnail tests to render/thumbnail_tests.rs
(#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
same_file::is_same_file treats two files with the same volume serial
number and file index as one file, also when both report index 0. The
Windows comparison now reads both identities through winapi-util and
accepts a match only when both file indexes are nonzero; otherwise the
resolved paths are compared, as for a volume without file indexes.
same_file_strict returned false when the metadata of either path could not
be read, so a hard link to an original in a folder the process cannot enter
was accepted as a screenshot target. It now returns the error unless the
path does not exist.
On Windows the identity check opens both files to read the volume serial
number and file index. When that open failed (another process holds the
file without sharing it, or the file cannot be read), the hard link was
treated as an ordinary file. The screenshot target check now refuses the
target in that case. A missing original is still not a match, and other
callers of same_file keep the current comparison.
On ReFS two files can share the 64-bit file index that same_file
compares, so same_file now rejects files of different lengths before
it checks the volume serial number and file index.
The hard-link test skips with a recorded reason when the temporary
folder's volume has no hard links (FAT/exFAT, some shares), the same
errors publish_new treats as a volume without hard links.
safe_file::same_file compared length and canonical paths on every
platform other than Unix. On Windows canonicalize returns a hard link's
own path, so a hard link to a library original under another name was
not the same file, and pin_write_target accepted it as a screenshot
destination. For this reason the engine test
write_targets_pin_absent_paths_and_recheck_the_current_library failed
on Windows.
On Windows same_file now first compares the volume serial number and
file index through the same-file crate (already in Cargo.lock through
walkdir), then falls back to the resolved-path comparison. The catalog
crate takes same-file as a Windows-only dependency.
Lightroom Classic's keyboard shortcut page lists Command+Option+Shift+K
(Ctrl+Alt+Shift+K on Windows) for Set a keyword shortcut and Shift+K
for adding or removing the keyword shortcut on the selected photos.
LightCraft had no keyword shortcut.
Set Keyword Shortcut... (dialog.keywordShortcut, Cmd+Alt+Shift+K) asks
for one or more keywords with commas between them and shows the ones
set before. A new name goes inside the default parent, as in the
Keywording box. A keyword's Use This as Keyword Shortcut in the Keyword
List sets that keyword alone, and the list shows a + after each keyword
of the keyword shortcut. Shift+K (keyword.toggleShortcut) adds the
keywords to the selected photos, or removes them when every selected
photo has them all. The help pages do not say what Shift+K does when
only some selected photos have the keywords; adding them unless every
photo has them all is LightCraft's own rule. A photo's context menu
offers Add Keyword with the keyword shortcut's keywords.
The keyword shortcut is a mark on its keywords in the catalog's keyword
list (KeywordInfo::keyword_shortcut), as Put New Keywords Inside This
Keyword is: a new name is listed, the mark moves with a renamed, moved
or merged keyword and goes with a deleted one, and setting it
(keyword.setShortcut) is one undo step.
The new labels have rows in every catalog. The KEYC-METADATA and
LRC-LIB-KEYWORDS rows, docs/ui-parity.md and docs/library-shortcuts.md
list the keys.
`rating:>=3`, `iso:<=400`, `f:>=2.8` read the `=` as part of the number, the
parse failed, and the token silently matched no photo. Parse the two-character
operators first and compare inclusively; `>`, `<`, `=` and bare numbers are
unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqKgSkHi5MfTQFrZvDKBjm
Preserve current main, adapt frame/input and IME handling, and keep library
check results stable across layout passes. Include the matching Nix font lock
and reviewed attribution changes.
Saving a sidecar wrote each keyword's path into dc:subject. A photo
keyworded Places|Italy|Rome got "Places|Italy|Rome" there instead of
"Places", "Italy" and "Rome", after any change with auto-write on, even a
rating. dc:subject is the flat list Lightroom, darktable, digiKam and
exiftool-based tools search, so the photo stopped turning up for "Rome"
in a library shared with them.
keywords::to_file is the inverse of from_file: every level of every
keyword goes to dc:subject, and when any keyword has levels, every
keyword goes to lr:hierarchicalSubject as its path. It applies no export
options (a sidecar is the photo's own record), so from_file reads the
pair back as the same keywords. lr:hierarchicalSubject is now owned, so
it is replaced on save and removed when the photo has no keywords, which
also ends the documented limit where a keyword removed here stayed in
another app's hierarchical list. Sidecars from 0.13 and older (paths in
dc:subject) still read as paths and are written the new way on the next
save.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>