Commit Graph

99 Commits

Author SHA1 Message Date
Brandon Thomas af2af2a2f5 LRC-LIB-MISSING: find missing originals and relink them
- library.missing lists photos whose file isn't where the library expects it; photo.relink
  points one at its new location; library.findMissing {folder} relinks every missing photo
  whose file (same name and size) is somewhere in a folder, in one undoable step. New
  Op::Relink: like a rename in the catalog, but undo/redo never move files.
- UI: File → Find Missing Photos…, photo menu → Locate Missing File… (when the file is gone).
- Renderer: a remembered failure is retried once the catalog changes (a relinked file).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 09:07:23 -04:00
Brandon Thomas 71dc30b951 LR-IMP-LOCAL: browse folders on disk without adding them (Local), failed renders aren't retried
- library.browse {path, subfolders}: a folder's photos are read in place as "local" photos
  (catalog flag, SetLocal op) that only folder views list — not All Photos, albums, date
  groups, keyword counts or stats. photo.addToLibrary promotes them; importing the folder for
  real promotes instead of reporting duplicates. The browsed folder persists with the view.
- UI: Local section (Pictures, Desktop, Downloads, Home, the browsed folder, Browse Folder…);
  folder views get a breadcrumb header (each part opens that folder), Include subfolders and
  "Add N to My Photos".
- Renderer: a job that fails (unreadable / missing file) is remembered by slot + key and not
  requested again every frame — the grid re-queued it forever (a render loop per broken
  file). The loupe says "This photo can't be opened" with the reason; grid cells show "!".
  ui.inspect lists pending render slots.
- Headless app.export (MCP, lightcraft-cli run) exports the selection like the desktop app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 08:53:58 -04:00
Brandon Thomas 096aefe698 LR-META-INFO: Info panel in Lightroom's layout with accessibility and place fields
- Metadata gains alt text, extended description, sublocation, city, state/province, country:
  catalog, photo.setMeta, copy/paste metadata, XMP read/write (Iptc4xmpCore AltText /
  ExtDescrAccessibility / Location, photoshop City / State / Country), sidecars and export
  (place fields dropped with "remove location").
- Info panel: camera card (camera, lens, size · file size, format badge, focal length,
  shutter, aperture, ISO), then title, caption, alt text, extended description, copyright,
  creator, file name (rename), file path (reveal), captured (edit), place fields, GPS.
- Text fields keep what is typed across frames and save on focus loss (they were rebound to
  the stored value every frame). New pencil icon (drawn in code); dates::display_time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 07:58:00 -04:00
Brandon Thomas be762c726b LR-META-COPYPASTE + LR-MERGE-HEADLESS: paste from previous, copy/paste metadata, merge with last settings, F1 help
- develop.pastePrevious (⌥⌘V): the previously active photo's settings (copy groups) onto the
  selection; the session tracks the previous active photo.
- photo.copyMetadata / photo.pasteMetadata {fields?}: title, caption, copyright, creator,
  location, keywords.
- Photo Merge with last settings (⇧⌃H, ⇧⌃M, HDR panorama): no dialog, the options of the last
  merge of that kind.
- Help → LightCraft Help (F1) opens the docs; F-keys map to native macOS accelerators.
- Parity: stale rows fixed (pet eye, merge submenu/keys, preset on import, profile favourites).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 07:50:14 -04:00
Brandon Thomas 967bf3d8fb LR-IMP-DEVICE: import from camera / memory card
library.devices lists mounted volumes with a DCIM folder (macOS /Volumes, Linux /media and
/run/media, Windows drive letters; LIGHTCRAFT_DEVICE_ROOTS overrides; cached for 2 s).
File → Add from Device opens the import review of a card's DCIM folder, set to copy into the
library.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 23:53:49 -04:00
Brandon Thomas e7c8adf36e LR-CROP-OVERLAY + KEY-CROP-CONSTRAIN: diagonal / triangle / spiral guides, A locks the aspect
- The Diagonal crop overlay was offered but drew nothing. Guides are now polylines from one
  testable module (panels/crop_overlay.rs): thirds, grid, golden ratio, 45° diagonals, harmonic
  triangle, golden spiral; triangle and spiral mirror (view.cropOverlayOrientation).
- While cropping: O cycles the overlay, ⇧O its orientation, A locks the crop's current shape
  or unlocks it (crop.aspect "current" / "toggle", no refit). Crop panel lists all overlays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 23:42:34 -04:00
Brandon Thomas b9f7ceb2d7 LR-LIB-BYDATE + LR-META-COPYRIGHT-DEFAULT: By Date day tree, default copyright/creator on import
- By Date: year → month → day rows with counts and disclosure triangles; a row filters by
  that date prefix (catalog date_groups now carries days).
- Settings → Import → Metadata: copyright and creator given to imported photos that don't
  carry their own (library.preferences {import: {copyright, creator}}), saved with the library.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 23:31:48 -04:00
Brandon Thomas 852e8fca45 MENU-EDIT-SELECTBY + LR-PRE-MANAGE: select by flag/rating/label, manage presets and versions
- library.selectBy {flag, rating, ratingOp, label, add}; Edit → Select by submenu.
- preset.rename / preset.update (current settings, same groups) / preset.move; preset row
  menu: update, rename, move to group (existing or new), delete.
- version.rename / version.update; version button menu: restore, update, rename, set as
  before, delete. history.clear (undoable); history row menu: create version from step, clear.
- Keyword chip menu: remove, show photos with keyword, rename / delete keyword.
- A generic one-field dialog (TextPrompt) runs a command with the typed value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 23:22:20 -04:00
Brandon Thomas a418bf163e LR-VIEW-BEFOREAFTER: before = import state, set from history / version / current, copy and swap
The before side used plain defaults, so raws lost their import defaults (sharpening, noise
reduction, import preset) in Before/After. It now shows the photo's import state, or a chosen
history step, version or the current settings (beforeAfter.setBefore); View → Before/After
Settings: Copy After's Settings to Before, Copy Before's Settings to After (undoable), Swap,
Reset; History rows: Copy History Step Settings to Before. Crop and orientation always follow
the current settings so both sides line up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 23:12:00 -04:00
Brandon Thomas cc6c0e457d LR-MASK-PANEL: reorder masks, duplicate and invert, list context menu, overlay colour cycle
- mask.move {to | delta} reorders the list (no-op moves record nothing); mask.duplicate
  {invert} = Duplicate and Invert, the copy placed right after the original.
- Masks list: show/hide eye per row (on hover, always while hidden; new eye-off icon drawn
  in code), double-click to rename in place, right-click menu (duplicate, duplicate and
  invert, invert, show/hide, move up/down, rename, delete).
- View → Cycle Mask Overlay Color (view.maskOverlayColor without params).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 22:49:55 -04:00
Brandon Thomas 8a83f8c6ce LR-BEHAV-BG-TASKS: background export with progress and cancel
- Engine: export split into prepare_export (session thread, cheap) and PreparedExport::run
  (Send: read/decode/render/encode); run_batch with per-photo progress, cancel and collected
  errors; export_batch keeps the stop-at-first-error behaviour for scripted calls.
- Desktop: the Export dialog, Export with Preset (menu and context menu) and Export with
  Previous run their batch on a worker thread (app.export {background: true}); a progress
  panel shows count / file / Cancel; ui.inspect reports export {running, last}.
- Headless: settle waits for a running export; `lightcraft-cli snapshot` finishes it before
  exiting. Web keeps foreground exports (downloads are main-thread).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 22:27:06 -04:00
Brandon Thomas 8548c157ba MENU-EDIT-PASTESELECTED + KEY-SEARCH: paste selected settings, Find, fuller photo context menu
- Edit → Paste Selected Settings… (⇧⌘V): group checklist prefilled with the copied groups;
  develop.paste {groups} pastes only the chosen copied groups.
- Edit → Find… (⌘F, view.focusSearch) focuses the search field.
- Photo context menu: Remove from Album (in an album), Create Version, Paste Selected
  Settings…, Show in Finder, Export…, Export with Preset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 22:00:24 -04:00
Brandon Thomas faa5478966 LR-EXP-DIALOG + MENU-FILE-EXPORTPRESETS: export presets, destination policy, TIFF compression
- Built-in export presets (JPEG Small 2048 px, JPEG Large full size, Original + Settings, DNG)
  and user presets saved with the library (export.presets / savePreset / deletePreset);
  app.export {preset, …overrides} everywhere (desktop, MCP, lightcraft-cli run).
- File → Export with Preset submenu (built-ins, user presets, Custom…); dialog: preset
  picker, Save preset, Choose… folder picker, subfolder, if-file-exists (add number /
  overwrite / skip), start number, TIFF compression (none / LZW / ZIP); {date} naming token.
- One export_batch for the desktop app and headless MCP (paths, conflicts, sidecars);
  ExportOptions::to_json is the exact inverse of from_json.
- ⌘E = Export with Previous (alias); parity: Show in Finder row was stale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 21:46:54 -04:00
Brandon Thomas 3ce86032ff LR-EXP-TYPE + LR-EXP-DIM: export size modes, ppi, Original + XMP and DNG export
- Resize modes: long edge, short edge, width, height, W x H (either orientation), megapixels,
  percent; "don't enlarge" (default on); ppi written to JFIF density / PNG pHYs / TIFF tags.
- Full-size export of a cropped photo now renders the crop at native resolution (it was
  upscaled to the uncropped long edge).
- Formats: Original (file copied byte for byte + XMP sidecar with the edits, named after the
  output) and DNG (raw photos re-encoded losslessly, edits in the embedded XMP).
- Export dialog: Resize-to dropdown, values, Don't enlarge, Resolution; DNG/Original hide
  pixel options.
- lightcraft-cli render goes through the shared exporter (colour space, metadata, ppi) and
  takes any app.export option via --opt KEY=VALUE; MCP export schema lists the new params.
- xtask resolves the workspace root at run time (a moved checkout broke ci).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 21:12:43 -04:00
Brandon Thomas 22e4f0fd8c Merge main into worktree-agent-ab72a7623afb95196
# Conflicts:
#	crates/engine/src/import.rs
#	crates/engine/src/lib.rs
#	crates/ui-egui/src/headless.rs
#	crates/ui-egui/src/panels/dialogs.rs
#	crates/ui-egui/src/panels/grid.rs
#	docs/parity.md
2026-10-01 13:33:29 -04:00
Brandon Thomas db89203fb2 Merge branch 'worktree-agent-a27a1456c70c1074d' 2026-10-01 13:27:58 -04:00
Brandon Thomas 93a1fd3bce LR-IMP-ADD-DIALOG + LR-IMP-LOCAL: import review dialog with candidates, destination, album, preset, keywords
library.importPreview scans/probes (probes reused by the import) and marks duplicates;
library.import gains preset, keywords and albumName and is one undo step; File > Add Photos
opens a review grid (thumbnails, checkboxes, duplicates unchecked), add in place or copy into
the dated Originals folders, batched import with progress; engine + headless tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 13:27:13 -04:00
Brandon Thomas 4075b42d85 Merge main into the masking branch (output space / deep finish, presets, parity)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 13:23:58 -04:00
Brandon Thomas 799ecc08bc Merge branch 'worktree-agent-ad641003294616c82'
# Conflicts:
#	crates/engine/src/library.rs
#	crates/ui-egui/src/lib.rs
#	docs/parity.md
2026-10-01 13:21:16 -04:00
Brandon Thomas d91aaa4ca1 LR-REM-SPOT-EDIT + LR-REM-BRUSH-PARAMS: select, move, resize, refresh and delete spots; brush keys
Engine: spot.select / spot.update (move target or source, size, feather, opacity, mode) /
spot.refreshSource (next-best source away from the current one) / spot.delete (selected spot);
spot.add resolves the automatic source (so it has a pin and stays put at every size) and selects
the new spot. Remove tool: pins for targets and the selected spot's source, click to select, drag
to move; Size/Feather/Opacity sliders edit new and selected spots; ⌫ deletes the selected spot
(never the photo), / refreshes its source, [ ] size and Shift+[ ] feather (Masking brush too).
Command tests and headless pointer/keyboard tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 13:20:06 -04:00
Brandon Thomas 5bd1d238c8 Merge main into worktree-agent-ab72a7623afb95196
# Conflicts:
#	docs/parity.md
2026-10-01 13:18:43 -04:00
Brandon Thomas a8ce1d8f13 Merge branch 'worktree-agent-a7cd35d1e288340c6'
# Conflicts:
#	docs/parity.md
2026-10-01 13:18:10 -04:00
Brandon Thomas f471b77800 LR-LIB-LABEL: colour-label menus, Info swatches, grid label dots and editable label names
Op::SetLabelName + catalog label names (undoable, journaled), label.names / label.setNames,
Edit Color Label Names dialog, named label submenu (Photo menu, grid context menu), Info-panel
swatches; engine + headless tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 13:17:57 -04:00
Brandon Thomas 1f3bc9c075 LR-LIB-CAPTURETIME: edit capture time (set, shift, time-zone shift) for a selection
Op::SetCaptured (validated, journaled), photo.setCaptureTime (the active photo gets the time,
others keep their offsets; or each / shift / hours), Edit Capture Time dialog with preview
(Photo menu, Info panel); engine + headless tests incl. op-log replay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 13:11:49 -04:00
Brandon Thomas ff3df3d2c4 Merge main into LR-EXP-COLORSPACE / LR-EXP-BITDEPTH
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 13:11:12 -04:00
Brandon Thomas ef9c6ca38c Merge main into settings branch (memory budget + configurable thumbnail disk cache)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 13:09:06 -04:00
Brandon Thomas 03291d6f83 LR-EXP-BITDEPTH: 16-bit PNG/TIFF, 32-bit float linear TIFF, 10-bit AVIF
RenderRequest gains a sample format (OutputDepth: U8 for previews, U16, F32Linear); deep renders
run the per-pixel stage with the exact sRGB curve and return Rendered::deep alongside the 8-bit
image (GPU stays 8-bit: deep exports render on the CPU). Export encodes deep renders: 16-bit PNG and
TIFF, 32-bit float linear TIFF with a linear ICC profile we generate, 10-bit AVIF (YCbCr planes into
ravif). Output sharpening and watermarks work on deep images. ExportOptions.bitDepth with per-format
defaults (TIFF 16-bit, others 8-bit), export dialog bit depth choice (remembered with the last
export), MCP export schema. Tests: a smooth gradient has 1024 levels in a 16-bit TIFF vs 13 in
8-bit, float TIFF decodes to the same light as 16-bit, per-format depth rules, AVIF 10-bit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 13:07:02 -04:00
Brandon Thomas 53c4b295b9 LR-LIB-RENAME: batch rename with templates, preview, safe on-disk renames and undo
Op::SetFile (catalog only; engine moves files + XMP sidecars first, never overwriting,
rolling back on failure); undo/redo move files back and forth; virtual copies follow;
photo.rename / photo.renamePreview; Rename Photos dialog (Photo menu, grid context menu).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 13:06:33 -04:00
Brandon Thomas 464d4926b9 LR-PREF-GENERAL + LR-IMP-RAWDEFAULT + LR-VIEW-FULLSCREEN/NAVIGATOR/INFOOVERLAY: Settings dialog, import defaults, view modes
Settings (Cmd+, / app menu on macOS, Edit elsewhere) with General, Import,
Performance and Interface tabs. App settings (startup view, delete
confirmation, GPU, preview size, filmstrip/grid badges, last library) live in
UiState.settings (ui.json); library settings (raw / non-raw / per-camera
import presets, XMP, thumbnail cache size) go through library.preferences into
prefs.json. Import applies the matching default preset; the photo remembers it
as its import look (unedited; Reset returns to it). Open Library… switches
libraries at runtime.

View modes: F full-screen preview (photo on black, arrows step, I cycles the
info overlay, Esc exits), Cmd+Shift+F window full screen, Cmd+I cycles the
loupe info overlay (off / file + date / exposure), Navigator mini map while
zoomed (click/drag pans).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 13:03:33 -04:00
Brandon Thomas 3c644f7faa Merge branch 'main' into worktree-agent-aecd35c3421bad4ae
# Conflicts:
#	crates/ui-egui/src/render.rs
2026-10-01 13:01:41 -04:00
Brandon Thomas 7fd21517ae LR-LIB-KEYWORD: library-wide keyword rename/delete/merge, left-panel keyword tree, suggestions
Catalog keyword ops (one SetMeta batch: undoable, replayed from the op log), hierarchical
a|b|c keywords (tree with counts, parent filters include children), keyword.* commands,
rename/merge dialogs, Keywords-panel suggestions; catalog, engine and headless tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 13:00:15 -04:00
Brandon Thomas 89b8aa3f77 LR-VIEW-PHOTOGRID: group the photo/square grid by date with day/month/year headers
Catalog date runs (stacks never split), Sort.group (auto/day/month/year/none) in the sort
menus, library.groups query, sticky headers, header click selects the group; layout unit
tests and a headless test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 12:52:07 -04:00
Brandon Thomas 7f40a7a7d9 LR-EXP-COLORSPACE: export in sRGB, Display P3, Adobe RGB (1998) compatible, ProPhoto RGB or Rec. 2020
RenderRequest gains an output space (default sRGB; previews stay sRGB). The per-pixel stage converts
scene-linear Rec.2020 to the target primaries, gamut-maps into the target gamut and encodes with the
target curve, on CPU and GPU (WGSL finish kernel reads the matrix, luma weights and curve from its
parameter block). sRGB output is byte-identical to before on the CPU. Export embeds our own
generated ICC profile for the space; AVIF stays sRGB. ExportOptions.colorSpace, export dialog and
MCP export schema. Tests: P3 colour survives a P3 export (decoded through the embedded profile),
every space/format round-trips its profile, GPU equivalence per space.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 12:49:13 -04:00
Brandon Thomas e82d8d0dcd LR-PROF-BROWSER (infra): variant thumbnail jobs (own cache key, thumbnail-level source), Variant slot LRU and loupe hover preview slot
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 11:53:16 -04:00
Brandon Thomas e1b2055897 Merge branch 'main' into worktree-agent-aecd35c3421bad4ae
# Conflicts:
#	crates/ui-egui/src/panels/edit.rs
#	docs/parity.md
2026-10-01 11:47:29 -04:00
Brandon Thomas d6431d0b8a Merge main into M5.6 (memory) branch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 11:36:32 -04:00
Brandon Thomas 7266f4153f M5.6c: one memory budget for caches, decode gate and GPU pool; peak RSS 1.9-2.3 GB -> 0.83-0.99 GB
- memory::budget (default min(25% RAM, 1.5 GiB); LIGHTCRAFT_MEMORY_MB, app.memoryBudget):
  half for engine caches (sources + rendered previews, LRU across them via a global
  use tick; the photo on screen stays), a quarter for decodes in flight (WorkGate:
  thumbnails, prefetch and import probes wait; loupe/export loads never wait), an
  eighth for the GPU free pool.
- GPU: best-fit buffer reuse (<= 25% slack), buffers released outside a render are
  pooled at once (no stranded retired lists), pool trimmed after 3 s idle.
- Decodes drop file bytes and raw samples early, colour/crop/orient in place.
- macOS: apps install malloc_zone_pressure_relief as the release hook (after each
  decode, import and idle trim): freed large blocks no longer stay resident.

14 raws + loupe + 12 steps (M4 Pro): peak RSS 1.9-2.3 GB -> 0.83-0.99 GB, footprint
2.5-2.6 GB -> 0.91-0.96 GB, heap peak 930 -> 656 MB; stepping median ~13 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 11:35:08 -04:00
Brandon Thomas 5720cf333d LR-PROF-DROPDOWN: profile favourites and recent (persisted with the library), grouped profile menu, amount slider
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 11:23:26 -04:00
Brandon Thomas 9c4526129e LR-PROF-CREATIVE: 16 own creative profiles (Film, Cinematic, Muted, B&W) as amount-scaled settings deltas
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 11:16:19 -04:00
Brandon Thomas 59140d8265 Merge branch 'worktree-agent-aada35d252224c5cd'
# Conflicts:
#	crates/engine/src/media.rs
#	crates/ui-egui/src/state.rs
2026-10-01 11:11:49 -04:00
Brandon Thomas 64dfa8adbd Merge edit-panel parity (Point Color, Calibration, curve refine saturation + targeted adjustment, red/pet eye, visualize spots)
Fix-ups: diagnostic overlays never populate the view-preview cache; Photo Merge's RenderRequest gets
the new overlay field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 11:02:11 -04:00
Brandon Thomas ce3dd5e156 Merge main (Photo Merge); M1.14b: stack merge results with their sources
Photo Merge's Create Stack option now puts the merged DNG on top of a
collapsed stack of its sources (Catalog::stack_with_ops), so the grid
shows the result; test in tests_merge (and no stack without the option).
Photo Merge dialogs live in a Photo > Photo Merge submenu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 11:00:51 -04:00
Brandon Thomas 5f401d2eef Merge main (straighten, vignette style) into the polish branch
Also: GPU retired-buffer list leaks its buffers at thread exit instead of
dropping them (wgpu's thread-locals may already be gone; the drop aborted
the test process intermittently), and headless UI tests wait up to 120 s
for renders (they timed out on a loaded machine).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 10:52:17 -04:00
Brandon Thomas c937ff97ee M5.6b: header-only raw probe (lightcraft_raw::probe_info); import no longer decodes pixels
Decoders take a Mode: Header reads everything but the samples (DNG, CR2, ARW,
RAF, RW2; PEF when it has crop tags). NEF/ORF (and PEF without crop tags)
derive geometry/CFA from the samples and still unpack them. decode() stays
bit-exact (debug-hash of every corpus/raw decode identical before/after); the
corpus test asserts probe_info == decode().info() for all 37 files.

Import of 14 corpus raws: 3.4 s -> 1.4-2.0 s; peak RSS through import
1.41-1.49 GB -> 1.12-1.22 GB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 10:46:54 -04:00
Brandon Thomas 06d30a0e59 LR-EYE-PET: pet eye — glow detection, dark pupil, catchlight
Pet eyes are found by brightness (the tapetum glows in any colour) and the disc is replaced by
a dark neutral pupil (Darken scales it); redeye.catchlight {index, on, offset} adds a soft
white catchlight at an offset from the pupil centre in pupil radii. Red Eye panel: Red Eye /
Pet Eye mode for new corrections and an Add Catchlight checkbox. CPU/GPU twins updated
together (equivalence covers both modes and the catchlight).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 10:43:57 -04:00
Brandon Thomas 00efffd372 Merge branch 'worktree-agent-a5bfb1e4b62622bcb'
# Conflicts:
#	crates/engine/src/media.rs
#	crates/ui-egui/src/control.rs
#	crates/ui-egui/src/lib.rs
#	crates/ui-egui/src/shortcuts.rs
2026-10-01 10:37:52 -04:00
Brandon Thomas ebcc41825b LR-EYE-RED: red eye correction with automatic pupil detection
pipeline::redeye: inside the user's ellipse the pupil is found on the source image (a fixed
grid in normalized coordinates, so previews and exports agree): weighted centroid and area of
red-dominant pixels (or, for pet eyes, of the brightest ones). Pupil Size scales the detected
disc; rendering in scene-linear light after white balance neutralizes the red where it is red
(iris and catchlights stay) and darkens it. CPU (lin stage) and GPU kernel redeye_k with an
equivalence test (both the GPU and the CPU scene-linear paths). Indexed controls
redEye.<i>.pupilSize/darken, redeye.add/delete commands, the Red Eye panel (selected eye's
sliders, delete) and the loupe tool (drag an ellipse, click to select).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 10:37:02 -04:00
Brandon Thomas bc2cda97cf M13.2: Photo Merge commands, dialog with live preview, CLI
- engine: `merge.hdr`, `merge.panorama`, `merge.hdrPanorama` (bracket size from
  EXIF); MergeJob (Send) with progress/cancel, preview renders through the develop
  pipeline (deghost overlay, auto-crop frame); finish writes <name>-HDR/-Pano.dng
  next to the first source, imports, selects, applies Auto Settings / auto crop
- ui: Photo Merge dialog (HDR / Panorama / HDR Panorama) with live preview on a
  worker thread, background final merge with progress toast; context menu and
  Ctrl+H / Ctrl+M (Ctrl now means the physical Control key on macOS)
- cli: `merge hdr|panorama|hdr-panorama`, `synth-merge` for synthetic inputs
- merge::synth: procedural brackets (DNG) and panorama views; docs/merge.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 10:30:03 -04:00
Brandon Thomas ce89ab5375 M4.1: Straighten tool (drag along the horizon or a vertical) + Auto straighten (crop.autoStraighten)
Auto uses Upright's consensus level angle as the crop angle; sign verified on a tilted test image
and pinned by a test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 10:28:29 -04:00
Brandon Thomas 78e50b5fc5 M5.6a: memory report (library.memory, ui.inspect memory) and opt-in DHAT heap profile
Per-cache bytes: decoded thumbnail/preview/full sources, rendered previews,
GPU device buffers (allocated/pooled/retired), loupe stage caches (CPU and
GPU) and textures. lightcraft-cli --features dhat-heap adds live/peak heap and
writes dhat-heap.json.

Baseline (14 raws, loupe, 12 steps): peak RSS 1.9-2.3 GB, footprint 2.5-2.6 GB;
heap peak 634 MB after import (probes decode every raw), 930 MB during grid
thumbnails (parallel decodes); GPU free pool grows to 2 GB (exact-size reuse).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 10:28:13 -04:00