feat(copies): matches between this PC and the server, Integrate and merge (owner review 6, v1.2.0) (#74)
CI / Build and test (push) Successful in 13m44s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 16s
Release / Build, test and publish (push) Successful in 26m34s
CI / PostgreSQL 16 integration (push) Failing after 17m36s
CI / PostgreSQL 17 integration (push) Failing after 15m36s
CI / Docker image (push) Successful in 1m12s
Release / Server image (push) Failing after 15s

The same time-lapse on a server and on this PC under different ids, or twice on this PC, is recognised,
compared and settled as the owner asked in owner review 6.

Matches are found after each sync refresh, through the server's new photo lookup, and after the jobs that
change photos. The default is to ask every time. Server › Matches offers:
- Keep apart, which is remembered;
- Link only and Unlink;
- the Compare dialog: photos, details line by line, projects and the plan.

Integrate completes both sides. Photos default to Union, projects are copied across, and a losing version
goes to the trash only after a hash check. Afterwards new photos move by themselves, and deletions wait for
the user.

A merge of two local sequences verifies every photo before the other sequence goes to its archive's trash.
Upload all local skips suspected matches and flags them.

Migration 0012 adds the found_copies and copy_probes tables. Jobs 25 (Integrate) and 26 (MergeSequences) are
new, and so are the server capabilities photo-lookup and upload-into.

Refs #73

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #74.
This commit is contained in:
Alby96andClaude Opus 5.5 authored and Alby96 committed 2026-11-18 15:20:29 +01:00
1 parent 43719bb5c5
commit f33bcac32e
586 files changed
+41546 -280

No files matched your search

+250
View File
@@ -5,6 +5,256 @@ commits follow Conventional Commits (release notes are generated from them by `C
## [Unreleased]
## [1.2.0] — 2026-11-18
Owner review 6 for v1.2.0 (`docs/requests/2026-11-16-owner-review-6.md`; issue #73). Upgrading from 1.1 keeps the
archive, the database and the settings: migration 0012 runs at start and turns every existing link into a linked
match. A 1.1 server works as before, without Integrate; a 1.2 server adds the photo lookup and uploads into a target.
### Added
- **Matches** (R1, R7):
- Chronos finds the same time-lapse on a server and on this PC under different ids, or twice on this PC (this PC's
archive, an adopted folder, a server's originals archive), by shared photos, unhashed photos of the same size and
capture time, session keys and links. Server matches are looked for after each sync refresh; matches on this PC 30 s
after start and 10 s after a scan, verify, import, download, conversion, merge, integration or emptied trash.
- Server › *Matches* lists them, attention first, with their state (*match found*, *kept apart*, *linked*,
*integrating · x of y*, *merging*, *integrated*, *deleted there · n*, *deleted on server*, *kept here*) and the
actions of each state; *Find matches* looks again. Toasts tell new matches ("{n} matches found" · *Review*) and
matches linked by themselves. The Server rail badge counts matches that need attention.
- *Keep apart* is remembered (asked again only when the match becomes identical or grows a lot); *Link only* links
without moving anything; *Unlink* keeps the two apart. Both toast with *Undo*.
- Library cards and list rows show *Also elsewhere* or *Deleted there*, with *Compare…*.
- A folder of sequences kept elsewhere is added with *Adopt folder…* and compared like any archive.
- **Compare** (R2): an in-window dialog with four parts. *Photos* classes every photo (same, same unverified, only
here, only there, different, converted, deleted here, deleted there, two versions) with counts and sizes per side and
lists each class; *Details* puts each differing title, tag, rating, note and setting side by side to choose line by
line; *Projects* shows each side's projects and where they go; *Plan* is the dry run, with every block and its
reason.
- **Integrate** (R3, R4): a local sequence and its server match each receive the photos they lack (*Union* by default:
a differing photo is kept in both versions; *Choose each*; *This PC wins*; *Server wins*), the chosen details are
written to both as one change, the other projects are copied across, then the two stay linked. Losing versions go to
the trash only after the winner is confirmed by hash, and a plan that replaces photos asks first. The *Integrate* job
resumes after a crash at each stage. *Drop…* trashes one of two versions on both sides.
- **Merge sequences** (R3): two matches on this PC are merged into the kept one; the other goes to its archive's trash
only after every one of its photos is verified in the kept one. The confirmation asks to type its photo count; the
*Merge sequences* job resumes after a crash at each stage and moves renders, projects, session keys and links.
- **Two versions…** (owner Q3): a local sequence's Library menu lists the photos it keeps in two versions (a Union
merge leaves them), each version with *Drop…*: a dry run, a confirmation naming the version that stays, then the
archive trash; a merge job's *Open* shows the list.
- Integrate trashes a server photo only for the server sequence's owner or an admin, with Delete; for anyone else the
server's losing version stays, out of the server's Main.
- **Projects across** (R5): an Integrate with *Copy across* (the default) copies each side's projects, with their
histories, to the other home, named "name (PC)" on a clash; with *Leave them* the Edit picker marks the two workspace
copies *Twin*.
- **After integrating** (R6): new photos of an integrated pair move by themselves both ways, paused on metered
connections and never interrupting a running job; three failures in a row read *not sent* and raise a toast. Photos
the other side deleted read *deleted there · n* and go to the trash only through *Review* › *To trash…*. A server
sequence that answers 404 twice reads *deleted on server*, with *Keep here*, *Upload again* and *To trash…*.
- **Settings › Server**: *Link matches* (*Ask always*, *When identical*, *Half shared*), *Integrate photos* and
*Integrate projects*, each option with its tooltip.
- **Server**: `POST /api/v1/photos/lookup` (Read; 200 probes and 20,000 items at most) and `intoTarget` on
`POST /api/v1/uploads`, which files a photo into the target by copying, on the server, a file another sequence of the
served archive holds (`copied` in the answer); `server/info` announces `photo-lookup` and `upload-into`.
- Jobs: *Integrate* (stored as 25) and *Merge sequences* (26), high in the priority queue, with their own detail steps.
### Changed
- A sync refresh no longer links a local sequence to a server one by content by itself: *Link matches* decides, and
*Ask always* is the default (1.1's rule is *Half shared*).
- *Upload all local* skips suspected and kept-apart matches, sequences being integrated or merged, sequences whose
server copy was deleted and sequences of a server's originals archive; each skipped row reads *skipped* with the
reason, and the toast "Queued: {0} · skipped: {1}" · *Show* lists them.
- A linked sequence's photos are uploaded into its server sequence even when the server holds them in another sequence,
so such a pair now reaches *in sync*.
- A job of background priority (automatic transfers) never makes a running job yield.
- Sync rows of a sequence in an unanswered match read *match found* with *Compare…* first; every linked row offers
*Compare…*.
### Fixed
- Found copies, review of owner review 6 (#73):
- A server sequence forgotten on a server known only by its address is found again when it is back.
- A Linked or Integrated pair whose link is gone is asked about again.
- A 404 counts against a pair only on a server known by its id, and at most once every ten minutes.
- Detection compares the server's update times only with the server's own, so a server whose clock is behind still
has its new sequences looked for.
- A server copy not hashed yet is found by the size and capture time of hashed photos.
- The older-server gate no longer compares the same manifests again at every refresh.
- An Integrate that failed resumes only while nobody answered the pair otherwise; a cancel or a stale plan frees the
pair from its job.
- Automatic photos never create or retarget a sequence: the pair must still be Integrated with both sides present.
- A first upload whose first photo the server holds elsewhere files that photo into the new sequence too.
- Unlink keeps the two apart against what they hold now.
- Trash here names only true last copies.
- Drop… on Two versions trashes one version on both sides, after re-checking the other one.
- A merge that keeps the pair's other sequence shows it in the first column and applies the choices to it.
- Upload all reads every pair, not only the ones listed.
- New photos of an integrated pair that failed to move three times in a row are told ("photos not sent" · Show) and
their row reads "not sent" with the reason.
- The "matches found" and "sequences linked" toasts of a detection that ran by itself open the matches from their
Windows notification too.
- The maintenance pass clears the journal of a merge or an integration that ended without deleting it, or whose job
was deleted without a cancel and nothing wrote for as long as the job history keeps jobs.
- A merge retried after the pair was kept apart, or merged again by another job, refuses and trashes nothing.
- A merge verifies the other sequence only while its archive is online and its folder is where the index says; an
unreadable photo stops the job, every photo of the other sequence must be verified before it goes to the trash, and
an unhashed photo that turns out different is kept as a second version instead of going to the trash.
- Before comparing, a merge hashes the other sequence's unhashed photos that match nothing, so different photos with
the same size and time are no longer taken for copies.
- A merge plan lists "Deleted in the other · n" and names the servers it relinks; a merge's second versions are
listed from the Library (*Two versions…* on a card's menu, and a merge job's Open), each with *Drop…*: a dry run,
a confirmation naming the version that stays, then the archive trash while the other version is still verified.
- The Merge and Integrate plans' block lines name the right sequence, archive, server and space; "already linked"
names the server.
- An Integrate retried after a failure before its first stage runs again instead of refusing.
- A sequence back on the server after a 404 stays Linked when its link still holds.
- A local cull (photos deleted on this PC) no longer flags a pair for attention.
- The Library keeps its "Also elsewhere" and "Deleted on server" statuses across a refresh.
- Compare dialog: one Details row per setting (an Auto parameter's members, the frame positions), values worded as the
sync words them; Projects lists each column's owner; Choose on "choose the sequence to keep" moves the keyboard to
the choice; the photo selection holds the photos outside the visible rows; the Replace confirmation lists the losing
versions under the side that loses them; plan lines read as queued; the Italian version choice fits.
- Matches: counts first in the This side and Other side cells, the integrating progress as a share ("x of y" in the
tooltip), counts grouped by thousands, and a match between this PC's archives names the other archive.
- Upload again after the server deleted its sequence removes the old "deleted on server" or "kept here" pair once
the new sequence is linked.
- A linked upload the server refuses into its sequence (an account without the Edit right that does not own it) goes
on as new photos, which the server files by their hash; an Integrate that would add photos to such a sequence is
blocked in its plan instead.
- Automatic photo transfers pause on a metered connection even when the metered option is off; manual transfers
follow the option as before.
- Integrate trashes a server photo only while the server sequence is still the version the winner check read.
- A merge whose other sequence holds a photo Verify found changed or damaged, which nothing else holds, is blocked
in its plan.
- The Plan counts as second versions only those kept beside their pair, a merge plan and its confirmation list the
kept sequence's photos a winning version replaces, and plan lines are drawn in the text colour.
- An integrated pair whose Integrate left photos out says new photos move on Upload and Download; a merging pair reads
"merging" and follows the merge's progress.
- Compare dialog: All server / All other say what they take; the class table shows the size of photos held only on
the other side (both sides in the tooltip), has column headings and tooltips that follow the chosen policy and the
merge; Choose each keeps file names readable; the Details part has column headings that follow the kept sequence.
- Sync table: skipped rows carry the warning glyph and Upload all says how many are left out; a linked or integrated
pair whose match deleted photos reads "deleted there · n" with Review.
- The Edit picker's twin tooltip names the server, not its key; the Library card shows the match status second; a
match whose server sequence was deleted names the server instead of "0 photos"; the match tooltips no longer call a
sequence a "copy".
- Integrate trashes a server photo only for the server sequence's owner or an admin; for anyone else the server's
losing version stays, out of the server's Main, and the plan says it needs the Delete right. Compare offers Delete on
server on the same terms.
- A server title, tags, rating or notes change made while an Integrate runs stops its Details stage where the user kept
this PC's value, instead of being overwritten.
- A merge retried after a stop plans again when work reached the other sequence since (settings, a project, a render)
or when a third sequence no longer holds a photo it was counted on for; a photo flagged missing whose file is back
blocks the merge plan.
- Detection no longer removes a pair answered while it ran.
- The Integrate and merge logs say in the UI language why a losing version was kept, and name the files and projects
they replaced or copied; an unreachable server's projects are named by the server's name.
- Upload all local names where a suspected match lies (another server, or another archive of this PC); a skipped
busy sequence says a job is integrating or merging it.
- A sync row whose match the server deleted offers Keep here, Upload again and To trash….
- Compare dialog: the parts' tooltips say what each shows; the photo list has column headings; the Projects headings
name the lists they head; a merge reads Kept and Other from the start; the Projects part shows where each project
goes as soon as it opens. Matches: the This side and Other side columns take the room the actions leave.
- The Edit picker's Twin chip sits right after the project name.
- An Integrate started by a sequence's owner who is not an admin runs the plan the dialog showed instead of refusing
it as changed.
- A merge copies a project of the other sequence that only shares its head with a kept project, renders included;
one already copied is skipped and its renders name the copy.
- A merge abandoned at its trash checks (work since the plan, unsent work, a stop) leaves the other sequence its link,
session keys and pairs.
- New photos of an integrated pair paused on a metered connection resume after a restart once it is not metered.
- Apply in the Compare dialog plans again when the choices changed in the last moment, so it never confirms the
previous plan.
- The merge confirmation asks for the photo count without separators and says it in the prompt.
- The session keys line's tooltip no longer shows "{0}"; To trash… and Delete on server… say to select photos first.
- Italian: the Main project reads *Principale* in the match tooltips and the Projects part, the twin chip *Gemello*;
the Edit picker's twin tooltip names the other home's Main in the UI language.
- Matches: long archive names are cut in their middle with the whole name in the tooltip; the Projects part trims long
names and shows the whole row in its tooltip.
- Upload again on a match is enabled only for an account that may send sequences (Upload and Edit), as in the sync
table.
- *Pause metered transfers* resumes only the transfers it paused, after a restart too; a transfer the user paused
stays paused.
- Drop… says why it cannot go (archive offline, a job on the sequence) instead of asking first. Dropping the version
Main uses lets Main use the one that stays, with its hero and keyframes; the version Main uses reads *In Main*.
- A merge plan no longer reads the other's photos again on each choice; a resumed merge checks the photos flagged
damaged while it waited; a merge is blocked while the other's folder holds photos the index has not read.
- A merge's *Choose each* asks for *Keep both*, *Kept* or *Other* for each differing photo (no *Leave*) and waits
until each is chosen; its classes read *Only in kept*, *Only in other* and so on; the last column reads *Version*
while a choice is offered, and a screen reader hears *Not chosen* for a choice not made.
- Compare dialog: the photo and Details headings stay over their columns when the scroll bar shows; the Projects part
scrolls when the projects do not fit; each line of a trash or replace confirmation has its own prefix.
- A server sequence's Library card in a match offers Compare… alone.
- Italian: *attività* for job and *spazio di lavoro* for workspace in the match strings; *Quella tenuta*; Settings ›
Server reads *Integrazione foto* and *Integrazione progetti*.
- A merge stopped after the other changed plans again on the next retry instead of failing on the same journal.
- *Unlink* or *Keep apart* of a pair that no longer holds the link leaves the other pair's link and integration
alone; *Link only* waits while an integration of either side runs, and an integration never undoes a link given
to another sequence since.
- A sweep of server sequences no longer found asks the server once, not once per pair.
- *To trash…* on *Deleted in other* of a merge trashes from the kept sequence, after a swap too, and on any trash
stops when a photo became a last copy since the plan; the version Main uses is marked from the kept sequence.
- A linked match whose server deleted photos shows three row buttons (*Compare…*, *Unlink*, *Review*).
- The policy and version choices, and Settings › Server's three match rows, fit in every language; the side of a
version reads whole and Drop… keeps its gap; each choice of a Details line says which value it takes, naming the
server; a long raw value wraps in its tooltip; the Projects headings stay over their lists.
- The Edit picker marks a project as a twin only when the other home holds its sibling (the same name, or the name
Copy across gave it).
- Italian: *Solo in quella tenuta*, *Eliminate in quella tenuta*; the replace tooltips name the kept sequence.
- Hindi: merging sequences reads मर्ज, no longer close to मिलान (match); Croatian: the matching sequence reads
*podudarna sekvenca* in the Compare and skip tooltips; Finnish: the replaced-photos line of a merge confirmation
no longer reads as a count of items.
- The translation glossaries list the match terms (Match, Integrate, Merge sequences, Keep apart, Twin, Link only
and Unlink, Union, Kept and Other) for every language.
- A merge whose kept sequence is not hashed yet hashes its photos that match the other's by size and time: the same
photo is no longer listed as a last copy, and a different one is copied in as a second version instead of going to
the trash with the other.
- A merge trashes a losing version of the kept sequence only while another sequence still holds it, or the plan
listed it as a last copy; otherwise it stops and plans again.
- A merge or an Integrate whose details changed on one side while it ran plans again on the next retry instead of
failing the same way each time.
- A server out of reach while an Integrate copies projects fails the job, and its retry finishes the same copy
instead of leaving a half copy on each side and copying it again under another name.
- A sequence read as deleted on the server is no longer so once the server lists it again or it is linked to it
again: Integrate is offered and new photos move again.
- Upload of a sequence kept apart from (or unlinked from) a server sequence makes a new server sequence instead of
adding the photos to the one kept apart and linking it again.
- A merge resumed after a failed copy of a render no longer replaces a render of the kept sequence made meanwhile
under the same name: the other's render is copied beside it under a free name.
- A photo a merge keeps in two versions because the two only matched by size and time is listed under Two versions,
also at a whole second, and Main renders only the kept version.
- An Integrate no longer trashes a losing version that became the only copy while it ran: it stops and plans again.
- Download originals of a server sequence unlinked or kept apart from its earlier download makes a new local
sequence instead of filling the old one again, re-linking it and overwriting its details.
- An upload retried after its pair was kept apart makes a new server sequence instead of linking the old one again.
- A second version a Union merge copies in is left out of Main at once, so a merge that stops before its details
(an edit meanwhile, a cancel) no longer leaves both versions in Main for good.
- A merge whose other sequence is not hashed lists as a last copy a photo matched by size and time whose content the
kept sequence deleted, instead of failing its verify on every retry.
- Download originals of a server sequence whose link a 404 forgot fills and links its own local copy again instead
of duplicating every photo into a new local sequence.
- A match whose server sequence was deleted, with no local copy linked to it, goes: *Upload all local* sends the
local sequence again and the Library stops reading it as a copy found.
- A merge whose photo held by a third sequence is held nowhere by the time of its verify asks for a new comparison,
which lists it as a last copy, instead of failing with "did not match after copying" on every retry.
- A background sync no longer pushes or pulls the details of a pair being integrated, and the Integrate stops
instead of taking this PC's own value over a line the user decided as the server's.
- A *Keep apart* answer survives a server sequence answering 404 for a moment: it is counted as a linked pair's 404
is, so the pair is neither asked again nor linked by itself; only a confirmed deletion lets *Upload all local*
send the local sequence.
- Download originals into the local copy of a pair asked about again keeps the photos deleted there deleted and
compares its details instead of overwriting them with the server's.
- An upload of a sequence asked about again makes a new server sequence instead of joining, re-linking and
overwriting the one an earlier upload made; one that joins a server sequence this PC already knows compares its
details instead of overwriting them.
- A second version a merge's verify files is left out of Main also when the run stopped right after filing it (a
drive dropping out, project.json held, the app closing): the resumed merge leaves it out then.
- A merge whose verify stopped before filing a second version, and whose photo changed before the retry, files the
photo as it is now instead of failing on every retry; one that had filed it leaves it out of Main and asks for a
new comparison.
- *Upload all local* leaves out again a sequence answered *Keep here* after its server copy was deleted, and the
answer stays; only a *Keep apart* given before the deletion lets it send the sequence.
- An upload that joined a server sequence this PC already knew still compares its details when it is resumed or
retried, instead of overwriting the server's title, tags, rating, notes and settings.
## [1.1.1] — 2026-11-16
The Windows hands-on test of 1.1.0 (#70): import, Reorganize, sharing the library, a client, the tray and Exit were