Commit Graph
2392 Commits
Author SHA1 Message Date
FredApps 041c8db2f7 Merge pull request #3482 from dotCooCoo/fix/keyword-names-no-trailing-asterisk
LRC-LIB-KEYWORDS: a new keyword name cannot end in an asterisk
2026-11-20 21:04:02 +07:00
FredApps d501e3c5d4 Merge pull request #3469 from dotCooCoo/feat/keywording-enter-keywords
LRC-LIB-KEYWORDS: the Keywording panel's Enter Keywords view edits keywords as text
2026-11-20 21:03:57 +07:00
FredApps 9b6a264304 Merge pull request #2110 from helgehelge123/hebrew-glyph-fallback
LR-BEHAV-LOCALIZE: Hebrew file and folder names get glyphs (part of #1915)
2026-11-20 21:03:47 +07:00
FredApps fd93a14654 Merge pull request #2020 from nledford/album-counts-background
LR-LIB-SMARTALBUM: creating or giving a keyword no longer freezes the window while albums are counted
2026-11-20 21:03:42 +07:00
.CooCoo 7db608d694 Dependencies: take craft-libs main at 23acc70493 (#4127)
* Updates: take craft-update from craft-libs main at 6e03f65bf

craft-update moves from storytold/craft-libs at 1b34eba41 to 6e03f65bf,
craft-libs main with the update fixes from #763 and #803. Cargo.lock
records the new revision. The other craft-libs pins are unchanged.

* Updates: take craft-update from craft-libs main at e98299546

craft-libs e98299546 includes #923: the check of whether the copy can install itself now runs on the update-check thread instead of in Updater::tick on the UI thread.

* Dependencies: take craft-libs main at 3af2280ee3

Every craft-libs crate in the workspace moves to craft-libs main at
3af2280ee3, so the app builds against one craft-libs commit.

- crates/codecs: the separate craft-avif-encode alias of
  craft-image-codecs is removed. With both on one commit, cargo refuses
  the same package under two names. On native targets the avif feature
  now enables craft-image-codecs' avif and threads features, so a build
  without avif, and the wasm32 build, still leave the AV1 encoder out.
- crates/ui-egui: GroupLocation has two new fields, flyout_width and
  flyout_offset (storytold/craft-libs#627); the default dock location
  sets both to None, as craft-ui does for a new group.

* Dependencies: take craft-libs main at 3af718585c

Every craft-libs crate moves from 3af2280ee3 to craft-libs main at
3af718585c. craft-image-codecs now depends on the new craft-dds crate.

* Flatpak: regenerate cargo sources for craft-libs at 3af718585c

cargo-sources.json now lists the craft-libs git sources that Cargo.lock locks: one
commit, 3af718585c, for every craft-libs crate, and the new craft-dds crate. It
was generated with ./packaging/linux/flatpak/generate-cargo-sources.py.

* Dependencies: take craft-libs main at 453b0da782

Every craft-libs crate moves from 3af718585c to craft-libs main at
453b0da782. Cargo.lock changes only the craft-libs source lines, and
packaging/linux/flatpak/cargo-sources.json is regenerated with
generate-cargo-sources.py for the new commit.

craft-update now reads the installed files for a release the app offers
on a thread of its own, and the prompt opens at a later tick
(storytold/craft-libs#1149). startup_prompt_shows_and_closes offered a
release and checked the prompt after one frame, so it failed when that
thread had not answered yet. The test now waits for the thread's repaint
request and ticks until the prompt opens.

* Updates: startup prompt test fails instead of waiting forever

The offer's thread sends its answer before it asks for a repaint, so the
tick after that repaint reads the answer. The helper now ticks once after
the repaint and asserts that the prompt is open, instead of waiting for
another repaint that never comes when the answer opens no prompt.

The test also gives its updater a pins file that does not exist, so a
launcher choice on the machine running the tests does not stop the offer.
2026-11-18 11:43:24 -06:00
FredApps b971b3bfe5 Merge branch 'main' into fix/keyword-names-no-trailing-asterisk 2026-11-18 21:07:51 +07:00
Dylan M. Taylor d5382f20b4 Merge pull request #4340 from storytold/refactor/shared-dng-writer
raw: cut DNG wire writing over to craft-raw
2026-11-18 08:33:34 -05:00
FredApps 5dde053259 Merge branch 'main' into fix/keyword-names-no-trailing-asterisk 2026-11-18 19:41:17 +07:00
Dylan M. Taylor 216739da8c test: await GPU warm-up after failed similar-photo search 2026-11-18 06:09:14 -05:00
FredApps 664974a820 Merge branch 'main' into hebrew-glyph-fallback 2026-11-18 16:22:39 +07:00
FredApps 32b6768a58 Merge branch 'main' into album-counts-background 2026-11-18 16:22:35 +07:00
FredApps a22949d9b7 Merge branch 'main' into fix/keyword-names-no-trailing-asterisk 2026-11-18 16:22:27 +07:00
FredApps d89322240d Merge branch 'main' into mac-menu-layout-language 2026-11-18 16:22:23 +07:00
dotCooCoo 494116a381 Merge main into feat/keywording-enter-keywords 2026-11-17 18:25:35 -08:00
dotCooCoo 98d24480dd Keywording: reading Enter Keywords text reads > and < only in names that have them
A name without > or < reads the same with them taken as hierarchy marks, so matching it against the selection's keywords no longer makes that second spelling for every keyword it is compared with.
2026-11-17 18:25:35 -08:00
Dylan M. Taylor aa08a77060 Merge pull request #3824 from Bruno-Alumn/fix/flaky-find-similar-3823
Find Similar test: photos measured from memory aren't missing reads (#3823)
2026-11-16 12:02:45 -05:00
Dylan M. Taylor 3a616261e3 Allow instrumented preview decoders to finish before reporting failure 2026-11-16 05:13:38 -05:00
Dylan M. Taylor fd1faf45bb Use established async completion budgets for remaining UI waits 2026-11-16 04:51:11 -05:00
Dylan M. Taylor b08bbae18e Use coverage settle budget for asynchronous UI checks 2026-11-15 19:12:44 +00:00
Dylan M. Taylor e87f92fefb Merge pull request #4027 from THEtheChad/fix/3822-folder-drop-windows-move
Tests: the second folder drop waits for the Missing Photos count (#3822)
2026-11-15 13:57:41 -05:00
Dylan M. Taylor 0857ef7898 Wait for GPU warm-up in welcome test 2026-11-15 11:15:37 +00:00
Dylan M. Taylor d8701ff064 test: bound coverage-only import waits 2026-11-15 05:15:41 +00:00
Dylan M. Taylor 1f65ae6bed test: keep import preview wait budgets 2026-11-15 04:07:48 +00:00
Dylan M. Taylor f1221deb56 Use coverage-aware wait in manual slideshow test 2026-11-14 14:20:56 +00:00
Dylan M. Taylor 81d10df318 Merge remote-tracking branch 'origin/main' into codex/local-coverage-review-fix 2026-11-14 11:43:23 +00:00
Dylan M. Taylor ff5126e5c1 test: preserve normal import preview timeout 2026-11-14 10:44:28 +00:00
Dylan M. Taylor babb568585 test: allow coverage-aware import preview setup 2026-11-14 10:06:45 +00:00
Dylan M. Taylor 05174da49c test: keep unrelated import waits bounded 2026-11-14 09:37:28 +00:00
Dylan M. Taylor 599dc4f550 test: limit thumbnail coverage waits to slow cases 2026-11-14 03:44:57 +00:00
Dylan M. Taylor 523f4418be test: fix timeout helper imports 2026-11-14 03:37:42 +00:00
Dylan M. Taylor 0ee8704a29 test: extend coverage-only wait budgets 2026-11-14 03:29:32 +00:00
Dylan M. Taylor 091031ae45 test: allow slower settle under LLVM coverage 2026-11-14 01:42:22 +00:00
FredApps 039fbdc645 Merge branch 'main' into fix/artcraft-feature-names-20261108 2026-11-13 20:43:08 +01:00
dotCooCoo 9524bea7c5 Keywording: an Enter Keywords edit saved only in memory counts as applied
When photo.setMeta applies the edit but cannot write it to disk, the box
now gives up the edit and the cursor, as for any applied edit, and still
shows the error. Before, it kept the edit and the cursor as for a refused
edit, although the photos already had the new keywords.
2026-11-13 07:42:10 -08:00
skylar fbdf4f5760 chore(ui): simplify render request boolean for clippy 2026-11-12 17:28:08 -06:00
dotCooCoo 33c63bc566 Keywording: quote names holding > or < in Enter Keywords text
entered_text now writes a keyword whose name holds `>` or `<` in double
quotes, so the text pasted into the box of other photos reads as the
name as written instead of as a hierarchy. The test pastes such text
into another selection, and checks that an empty level next to a mark
gives the other level.

The Enter Keywords box no longer builds its edit on every frame. With
no edit held it makes only the shown text, and the edit is built once
the box is edited or applied. The edit shares the selection's keywords
with the keyword chip cache and holds its photo ids in an Arc, so a
held edit is no longer deep-copied each frame.
2026-11-12 09:11:34 -08:00
Dylan M. Taylor 5a96dfc295 Fix Flatpak updates and bump to 0.21.1 (#4151)
* fix(flatpak): allow release checks and self-update helpers

* test: keep Flatpak permission parsing within strict Clippy rules

* chore: bump version to 0.20.1 for the Flatpak update fix

* test: map Flatpak manifests embedded by permission regression

* docs: explain the repaired Flatpak update path
2026-11-11 21:30:32 -05:00
cezar 1a301fc2d8 LR-EDIT-LENSBLUR: camera-like Lens Blur with AI subject focus and per-mask bokeh
Part of the Lens Blur row (`LR-EDIT-LENSBLUR`, ⬜ → 🟡: no depth map yet). Related: #377 (SAM 3 subject selection, used here for the Lens Blur focus).

## Problem

Lens Blur settings existed but nothing rendered them: there was no way to add a shallow depth of field, keep the subject sharp while the rest falls out of focus, or blur only part of a photo through a mask.

## Change

**Edit → Lens Blur** (`section.lensBlur`, ⌘6)
- **Apply**, **Amount**, **Boost** (brighter bokeh highlights) and **Transition** (how gradually the blur grows away from what is in focus, so the subject doesn't look cut out).
- **In Focus**: *Subject* (a mask) or a fixed shape: **Auto / Round / Horizontal / Vertical**, buttons drawn in code that work on the light themes.
  - **Move & Resize** (tool `lensBlurShape`) drags the ellipse on the photo and stretches it by its handles. Each drag is one undo step; a shape button puts the ellipse back in the middle.
- **Find Subject** (`lensBlur.findSubject`) runs only when clicked, never automatically on Apply.
  - It starts from the focus point the camera recorded, when the file has one (Sony ILCE-1 and ILCE-7SM3, the models `lightcraft_meta` reads today). Otherwise it starts from the subject estimate.
  - SAM 3 keeps the prominent people and animals: those at the focus point and those of a similar size. When the focus point falls on neither, it falls back to an object click at that point.
  - The result is a normal Object mask ("Lens Blur Subject") that can be refined in Masking.
  - It runs on the background segment worker, and on remote SAM 3 too (`Operation::Subject`). While the mask is pending, the UI shows a spinner and the render keeps the subject estimate in focus, so the photo is never blurred whole.
  - Without the model, it returns the model-missing error, changes nothing, and the UI offers the SAM 3 download.
- **Brush Refinement**: Focus and Blur brushes painted on the photo (`lensBlur.brushStroke`, `lensBlur.brushReset`), with Size, Feather, Flow, Amount and Auto Mask.
- While Apply is off, In Focus, the shapes, Move & Resize and Find Subject are disabled.

**Masking: a Lens Blur block in every mask** (`section:maskLensBlur`, under Refine Edges)
- **Blur: Selection / Outside**. Outside blurs what the mask leaves out, without inverting the mask's other adjustments.
- **Amount**, **Boost** and **Transition**, per mask. The header's eye switches the block off and keeps its values; the header folds the block.
- Stored as `lens_blur`, `lens_blur_outside`, `lens_blur_boost`, `lens_blur_transition` and `lens_blur_off` on `LocalAdjustments`, set through `mask.adjust`.

**Rendering** (`crates/pipeline/src/lens_blur.rs`)
- Runs in the scene-linear stage after denoise; its settings are part of `pre_nr_key`.
- Disc (bokeh) kernel at four levels on coarse grids, with a normalized convolution weighted by the circle of confusion, so sharp areas don't bleed halos into the blur. Transition uses a chamfer distance to the in-focus area.
- The radius is relative to the long edge, so the blur doesn't depend on resolution. The work stays bounded on large exports: the disc kernel has a fixed size, and each level's coarse grid stays within a cell budget.
- Zoomed windows, both 8-bit and deep (16-bit/float), read around them and are cut back to the request. The grids follow the whole output's origin, and the automatic subject estimate is made once from the whole photo. A window therefore matches the whole render.
- GPU path: read back, apply on the CPU, upload (`crates/gpu/src/render.rs`).
- Hostile values (NaN or infinite sizes, out-of-range areas and focus points, oversized stroke lists) are sanitized or rejected, never a panic.

All new strings are in the 17 locales.

**Not in this PR:**
- Real depth. The falloff is the image distance from the focus, not scene depth; a depth model (e.g. Depth Anything V2 Small on candle) would be a separate PR.
- Rotating the ellipse.
- Aperture shapes.
- Focus points for more camera makes and models.
- Find Subject doesn't resume by itself after the SAM 3 download (the Masking tools do). Like the existing Object / Describe jobs, it shows no row in the activity stack.

## How it was checked

- [x] Full `cargo xtask ci` on Windows 11 x86_64 after the latest merge of `main` (465c8722):
  - fmt, clippy, heif, parity, layers, assets and wasm pass;
  - every Lens Blur test passes;
  - the only failures are five tests outside this change that fail on Windows on `main` too: `export::tests::sixteen_bit_zip_tiff_is_never_larger_than_uncompressed`, the two GPU out-of-memory tests in `gpu::ctx`, `dialog_role::settings_is_a_dialog_too` (needs craft-fonts) and `folder_drop::dont_ask_again_moves_the_next_drop_at_once`.
- [x] Tests that fail without the change:
  - **pipeline**:
    - the `lens_blur` tests: shapes and moved or hostile areas, blur growth away from the focus, the fallback while an AI mask is pending, brushes, masks blurring their selection or outside with Transition, hostile input;
    - `large_image_blur_work_is_bounded`: on a 60 MP export with the strongest global and per-mask settings, the disc kernel stays a fixed size and every level's coarse grid stays within its cell budget, including an offset render window;
    - window/full-render parity at U8 and U16, including the automatic subject.
  - **engine**: brushes with undo; Find Subject without the model changes nothing; deleting the focus mask clears the focus; a partial effect preset sets `lens_blur`; with the `sam` feature, Find Subject fills the waiting mask.
  - **segment**: `prominent_subjects`, and remote `Subject` validation.
  - **catalog**: `op_variants_are_versioned` with the new format version.
  - **ui-egui**: the brushes painting on the photo, the shape buttons, the controls disabled while Apply is off, Move & Resize with undo and redo, the mask block (side, sliders, eye, folding).
- [x] User-visible change: ran the app and looked at the result (dark and light themes).

## Screenshots

**Before / after**

<img width="1402" height="952" alt="before" src="https://github.com/user-attachments/assets/8baceb99-7708-4c25-990c-8da29b6bc1b4" />
<img width="1320" height="937" alt="after" src="https://github.com/user-attachments/assets/a1476510-558a-4460-8766-b25bda0dfd3d" />

**Edit → Lens Blur** and **the mask's Lens Blur block**

<img width="457" height="626" alt="main painel" src="https://github.com/user-attachments/assets/47a19637-29a8-4446-a003-2eef416975b7" />
<img width="463" height="333" alt="mask painel" src="https://github.com/user-attachments/assets/345ffc14-66d2-4adc-af3c-b756727201de" />

## Merging

- **Overlap:** #1713 (Clearfall; a draft since 2026-10-14 that conflicts with main) implements the same row on the CPU. It has aperture shapes and XMP roundtrip, which this PR lacks. This PR adds the per-mask block, SAM 3 Find Subject from the camera's focus point, the GPU path and window parity. Only one should land; happy to port what #1713 has that this lacks.
- **Existing edits and libraries:** unchanged. Lens Blur is off by default and every new field is omitted from the JSON at its default, so existing settings keep their JSON and hashes.
- **Shared numbers taken:** catalog format `VERSION` 12 (`crates/catalog/src/journal.rs`). main already uses 10 (`Mask.on_photo`) and 11 (`EmbeddedLens.source`), so Lens Blur takes one past them. If another pull request lands with 12 first, I'll take the next one when I merge main. No render-cache, look or process version change.
- **Where it came from:** own implementation; nothing derived from GPL code or Adobe data. The camera focus point comes from the existing `lightcraft_meta` reader; subject selection uses SAM 3 through the existing segment crate.
- **New dependencies, `unsafe`, build scripts, network access, spawned processes, deleted files, CI or `xtask` gate changes:** none. The remote SAM 3 protocol gains one request (`Operation::Subject`). An older worker rejects it with an error, as `docs/ai-masks.md` notes.

## Checklist

- [x] No new panic path in non-test code
- [x] New text on screen goes through `tr()` with keys in all `locales/*.json`; ⌘6 opens the new section (KEY-SECTIONS)
- [x] `docs/parity-checklist.md` rows updated (LR-EDIT-LENSBLUR 🟡, LR-MASK-SLIDERS, KEY-SECTIONS); `docs/gaps.md` has no Lens Blur entry
- [x] New code has a caller
- [x] No new assets (the shape icons are drawn in code)
- [x] Ready to merge

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
  * Added Lens Blur with adjustable strength, highlight boost, and transition controls, plus Round, Wide, and Tall focus shapes.
  * Keep a subject or selected mask in focus, find people or animals automatically, and refine focus or blur with brushes. Move and resize the focus area directly on the photo.
  * Apply Lens Blur to individual masks, including selections or areas outside them.
* **Bug Fixes**
  * Improved Lens Blur rendering for cropped views and preserved focus-mask assignments correctly when masks are edited.
* **Documentation**
  * Updated feature and control guides, with Lens Blur interface translations added across multiple languages.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-11 08:02:05 +01:00
dotCooCoo ee8ecc9abf Merge main into fix/keyword-names-no-trailing-asterisk 2026-11-10 20:31:14 -08:00
dotCooCoo 4856e293f4 Merge main into feat/keywording-enter-keywords 2026-11-10 19:11:45 -08:00
THEtheChadandClaude Opus 5.5 c1fa91c389 test(ui-egui): #3822 say what the slow count in the folder-drop test catches
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:37:43 -06:00
Fridtjof MichelsandClaude Opus 5.5 e2d45b8818 LR-VIEW-SURVEY: merge main (#3842: photo_tile also returns the painted rect; the survey ignores it)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 16:03:14 +01:00
THEtheChad 96c0ca4db2 test(ui-egui): #3822 the second folder drop waits for the Missing Photos count
dont_ask_again_moves_the_next_drop_at_once read the home row's rect one
frame after the first move. The move changes the Missing Photos count,
which a worker takes: a count already running when beach.png moved finds
its old path empty and adds the Missing Photos row, and the recount takes
it away. Each shifts every folder row below it by one row, so on a busy
machine the second drop, aimed at the rect read before the count landed,
went to the folder above (dunes.png moved into the parent folder) or to
trip ("Already in"). Waiting longer for home/dunes.png could not help.

The test now settles the sidebar before reading the row, as other
sidebar tests do, and runs with a slow count so the race happens on
every run: it checks that the row stays put for longer than the count
takes. Without the settle it fails every time ("home stays where the
drop aims"). The move is synchronous, so the 20 s wait from #3834 is
replaced by an immediate check that prints the toast, and the drag
checks the drop hint before releasing.
2026-11-09 17:18:45 -06:00
FredApps 4ecbd194fd LRC-LIB-CATALOG-IMPORT: reconcile backup import with main
Preserve collection ownership, check extraction space, and resolve the upstream merge.
2026-11-09 22:14:17 +01:00
dotCooCoo 9e8a7b7c88 Updates: the updater reports installing, ready, installed and failed, and installs at exit
craft-update moves from a231e517 to the head of storytold/craft-libs#696.
The check result window now shows for every status but idle, so the first
start after an update reports that it installed or why it failed. Restart
to Update on a ready update asks the app to close.

The install helper now starts when the app exits. on_exit calls
Updater::start_pending_update through LightcraftApp on macOS, because the
process ends there without dropping the app.
2026-11-08 18:26:40 -08:00
FredApps c137ffea8b test(naming): guard neutral display labels 2026-11-08 22:36:42 +01:00
FredApps fa47f5b81e Naming: distinguish perspective controls from external feature names 2026-11-08 21:25:55 +01:00
FredApps 7e2b8a6b27 Merge pull request #3833 from ZIDAN44/fix/3776-one-selected-count
Issue #3776: one selected photo shows "1 selected" in the header
2026-11-08 17:06:27 +01:00
FredAppsandFredApps 097dac4566 Stabilize sidebar month-name test fixture (#3859)
Inject an empty local folder list so asynchronous host discovery cannot move rows between queued clicks. Preserve both clicks and all accessibility assertions.

Fixes #3858

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-06 17:03:17 +01:00
92adb04782 Issue #3768: dialog_role tests draw glyphs only craft-fonts has as boxes when built without it (#3769)
Settings lists each language by its own name, and Georgian has glyphs only in
the craft-fonts faces, so egui_kittest's missing-glyph panic failed
settings_is_a_dialog_too in every build without CRAFT_FONTS_DIR. Allow missing
glyphs there, as tests/it/accessibility.rs does: these tests check roles and
titles, not glyphs.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-06 16:17:31 +01:00