Skip to content

Pair same-stem edited JPEG+DNG twins - #23

Merged
mauricewipf merged 1 commit into
masterfrom
cursor/pair-edited-jpeg-dng-twins-6143
Sep 6, 2026
Merged

mauricewipf merged 1 commit into
masterfrom
cursor/pair-edited-jpeg-dng-twins-6143

Conversation

@mauricewipf

Copy link
Copy Markdown
Owner

Closes #22

Small follow-up to #4 / PR #21: edited sidecar stems were excluded from JPEG↔DNG pairing entirely, which also blocked valid same-stem edited twins.

Problem

After #4, shot-edited.jpg correctly does not pair with shot.DNG. But shot-edited.jpg + shot-edited.DNG also failed to pair, leaving the edited DNG as its own grid cell.

Fix

Remove the is_edited_sidecar_stem guard from is_jpeg_dng_still and jpeg_dng_still_for_raw. Same-stem matching already prevents cross-stem pairing with the original DNG.

Behavior

Files Result
shot-edited.jpg + shot.DNG Two rows (no pairing)
shot-edited.jpg + shot-edited.DNG One row, raw_relpath set
Lone shot-edited.DNG One row, no self-twin
shot.jpg + shot.DNG One row (unchanged from #4)

Tests

  • media: edited twins pair; edited JPEG does not attach original DNG; lone edited DNG is not a companion
  • index: integration tests for all three edited-sidecar scenarios above

cargo test --locked passes (169 unit + integration tests).

Open in Web Open in Cursor 

Remove the edited-stem blanket exclusion from JPEG↔DNG pairing helpers.
Same-stem matching already prevents shot-edited.jpg from attaching to
shot.DNG; it now allows shot-edited.jpg + shot-edited.DNG to index as
one Photo with raw_relpath set.

Closes #22

Co-authored-by: Maurice Wipf <mauricewipf@users.noreply.github.com>
@mauricewipf
mauricewipf marked this pull request as ready for review September 6, 2026 01:57
@mauricewipf
mauricewipf merged commit 3173303 into master Sep 6, 2026
1 check passed
@cursor
cursor Bot deleted the cursor/pair-edited-jpeg-dng-twins-6143 branch September 6, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pair same-stem edited JPEG+DNG twins (don’t leave shot-edited.DNG as its own cell)

2 participants