feat: owner review 2 phase 4a: Reorganize sequences after import (#12)
CI / Build and test (push) Successful in 9m15s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 6s
Release / Build, test and publish (push) Successful in 15m35s
CI / PostgreSQL 16 integration (push) Successful in 7m26s
CI / PostgreSQL 17 integration (push) Successful in 6m47s
CI / Docker image (push) Successful in 59s
Release / Server image (push) Successful in 1m24s
CI / Build and test (push) Successful in 9m15s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 6s
Release / Build, test and publish (push) Successful in 15m35s
CI / PostgreSQL 16 integration (push) Successful in 7m26s
CI / PostgreSQL 17 integration (push) Successful in 6m47s
CI / Docker image (push) Successful in 59s
Release / Server image (push) Successful in 1m24s
- Reorganize… on the web panel and the desktop: folder, file and title templates applied to existing sequences, with a dry run and an explicit Apply that runs as a job. - One naming rule (FrameNaming) for import, upload and Reorganize. - Crash-safe plan and file journals, held plans, stale-plan refusal; exports move with their folder. - Writers refuse a folder another program moved or gave to another sequence. - Server: POST /api/v1/archive/reorganize with a bounded plan cache; template rules. - Phase 3 docs and translations merged; strings in all 38 languages. 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 #12.
This commit is contained in:
1 parent
9aa818ed47
commit
7e4a3b481d
416 files changed
+15304
-1572
No files matched your search
@@ -5,6 +5,105 @@ commits follow Conventional Commits (release notes are generated from them by `C
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.1.0-rc.6] — 2026-10-27
|
||||
|
||||
### Added
|
||||
- **Reorganize** on the desktop and the admin panel (owner review 2, R7): apply new folder, file and title templates to
|
||||
sequences already in the archive. Each template has its switch. A dry run lists, in the order the changes apply,
|
||||
each sequence's folder and title before and after, how many photos get a new name with the first three, the
|
||||
sequences that only follow a folder they are in, and the photos that keep their names with why (kept in place
|
||||
outside `originals`, never verified, missing), or why a whole sequence stays as it is (its sequence file cannot be
|
||||
read). Nothing changes until you apply: a *Reorganize* job then makes exactly the changes shown, and you can pause,
|
||||
resume and retry it in Jobs.
|
||||
- Desktop: *Reorganize…* in the Archive manager's set bar and in the Library's mass bar (the sequences of one archive)
|
||||
replaces *Rename…* and *Move…*. Folders and file names start from the archive's templates, titles off with
|
||||
`{title}`; the dry run follows your typing.
|
||||
- Desktop: after a folder or file template is changed in Settings › Archive, a toast offers *Reorganize…* for every
|
||||
sequence of the archive with the changed templates switched on. A dialog already open on the Archive screen is never
|
||||
replaced: Reorganize opens when it closes.
|
||||
- Admin panel: *Reorganize…* in the Library's selection bar (up to 1,000 selected sequences, or every sequence after
|
||||
*Select all* without a filter), and in the *Saved* toast after new folder or file templates on the Archive page. A
|
||||
live dry run as you type, a confirmation that counts the sequences, folders and photos, then a toast with *Open job*.
|
||||
- Reorganize is crash-safe: files move in two phases through hidden temporary names under a journal in the sequence
|
||||
(`.chronos/rename-files.json`), so chains and swaps of names work and no file is ever written over; a failure puts
|
||||
every file back, and a crash is completed by the next program that writes the sequence. XMP files follow their
|
||||
photo. The plan's journal lets an interrupted Reorganize finish at the next archive open; one whose job was paused,
|
||||
cancelled or failed waits for that job to be resumed or retried (a job that failed because the archive's drive went
|
||||
away completes the plan once the drive is back; retried while the drive is still away, it fails and keeps the plan).
|
||||
- A folder that moves takes along the sequences nested in it and the exports inside it; an editor open on a
|
||||
reorganized sequence reloads where it is now (desktop).
|
||||
- A sequence still receiving photos does not stop a Reorganize: it keeps its file names, and its folder and title
|
||||
change while its first photo still gives them, else it stays as it is; the others go on, and the job then says how
|
||||
many sequences were not reorganized as planned. A new Reorganize completes them. A selected sequence left as it is
|
||||
inside a selected folder that moves goes with that folder, keeping its title and file names.
|
||||
- API v1: `POST /api/v1/archive/reorganize` (archive administrators): a dry run with the plan and its fingerprint, then
|
||||
the change as a `move` job (202) for exactly that plan, 409 `plan_changed` when the archive changed since, 503
|
||||
`plan_dropped` when the server stopped making a plan; the server keeps a dry run a few minutes for its confirmation.
|
||||
`sequenceChanged` with the change `reorganized`; the audit log and the Dashboard name reorganizations.
|
||||
- Known limitations: while one sequence's files are renamed, a program that reads them without the sequence's lease
|
||||
(an editor open on it, a render node or a download fetching originals) can miss a file for a moment; a change made
|
||||
on disk alone after a server dry run (a folder made by hand, a desktop writing to a shared archive before the
|
||||
server's scan) is found by the job, which then fails and changes nothing; a photo restored from the trash after a
|
||||
Reorganize comes back under its old name; a Reorganize job cancelled and never retried leaves its held plan in
|
||||
`.chronos/journal` (only the file renames a step left half-way are completed at an archive open); deleting
|
||||
sequences is refused while a Reorganize job runs or is paused; a render of another program whose folder moves while
|
||||
it runs is not stopped, and its output can land in a folder created again at the old place; a plan journal that
|
||||
cannot be read is logged and left in `.chronos/journal`: the archive opens, its plan is not resumed and its job
|
||||
fails with the reason; a render node retries a result the server cannot file for now for about 30 seconds, then
|
||||
its job fails and a retry renders it again; an export one sequence saved into another's folder (the Export folder
|
||||
picker) keeps naming its old path when another program then moves that other sequence away and the first one into
|
||||
its folder (the file is intact: it moved with the other sequence).
|
||||
|
||||
### Changed
|
||||
- Import, upload and Reorganize name photos by one rule: every photo of a sequence is named with the sequence's camera
|
||||
and lens (its first photo's, or the camera its creator named), so a whole-folder import of two bodies, or a lens
|
||||
changed during a session, no longer shows in the file names; a sequence's folder comes from its first photo. A
|
||||
Reorganize with the archive's own templates changes nothing filing named; where filing could not know the sequence
|
||||
as it is now (`{session}` of a card's second session, numbers after a photo skipped as a duplicate), its dry run
|
||||
lists the renames.
|
||||
- Templates are checked alike everywhere (Settings › Archive, Import, Reorganize, the admin panel's Archive page): a
|
||||
folder template may not write a folder scans skip (one starting with `.`, or named `originals`, `proxies`,
|
||||
`exports`); a file template must keep the photo's extension (`{n}{ext}` is refused, `{n}.{ext}` is fine), tell a
|
||||
session's photos apart and hold no slash. A folder a title would hide that way gets a leading `_`, and a file name
|
||||
over 200 characters is shortened before its extension, never through it.
|
||||
- **Upgrade:** a template saved before these rules stays as it is through edits of other settings, on the desktop and
|
||||
the server; changing it holds it to the rules. Creating an archive (Welcome › Create, adopting a new folder) with
|
||||
this PC's templates that break a rule is refused, and the message names the rule: fix it in Settings › Archive.
|
||||
There is no migration.
|
||||
- Server: `invalid_template` from `PUT /api/v1/archive/settings` and `POST /api/v1/archive/reorganize` names the broken
|
||||
rule after a colon (`fileTemplate:extension`, `fileTemplate:not_unique`, `fileTemplate:file_separator`,
|
||||
`folderTemplate:reserved_folder`) with its sentence in the request's language; the admin panel shows it on the
|
||||
field.
|
||||
- Renaming a sequence's files raises its frames version: an editor or client holding the old one reloads once.
|
||||
- Proxy passes hold the thumbnail lease one batch (about 30 s) at a time, so another program's Reorganize, sequence
|
||||
deletion or pack compaction waits for one batch rather than the whole pass.
|
||||
- Server: a render upload or a render node's result that cannot be filed for now answers 503 and keeps the upload, to
|
||||
be completed again: `sequence_busy` (the sequence busy past the lease wait), `archive_offline`, or the new
|
||||
`folder_moved` (another program sharing the archive moved its folder, or moved another sequence into it, until the
|
||||
server's next scan); the node keeps its job. A proxy upload answers 503 `sequence_busy` while the sequence is busy.
|
||||
- The job kind *Move* is now *Reorganize*.
|
||||
|
||||
### Fixed
|
||||
- After another program moved a sequence away and another sequence into its folder: a render resumed after a crash
|
||||
no longer deletes a file of the same name in the folder the sequence left, and *Download originals* restores missing
|
||||
photos only where the sequence is now (under its lease); until this PC's next scan it fails with "folder moved" and
|
||||
keeps the downloaded copies for the retry. Before, the photo could land in the other sequence's folder.
|
||||
- Renaming titles with a template (former *Rename…*) turned characters a file name cannot hold into `_` (`Paris:
|
||||
night` became `Paris_ night`); titles now keep them.
|
||||
- Moving folders with a template (former *Move…*) could flip a sequence between "… (2)" and "… (3)" at every run,
|
||||
could give two sequences folders that differ only in case, named a folder after today's date when a sequence had no
|
||||
capture time in the index, and failed on sequences created without photos; folders now come from the sequence's
|
||||
first photo, and such sequences are left out.
|
||||
- Exports stay reachable when another program sharing the archive moves their sequence's folder (its Reorganize, or a
|
||||
folder moved by hand): the next scan moves their paths with the folder, image-sequence exports included, and when
|
||||
another sequence was moved into the old folder each sequence keeps naming its own exports. Before, they answered
|
||||
404 there.
|
||||
- A writer that read a sequence before its folder moved (an upload, a proxy, an export, an editor save, a sync, a deep
|
||||
analysis) writes where the sequence is now, or, when another program moved it, refuses until the next scan instead
|
||||
of creating the old folder again, and also when that program moved another sequence into the folder it left, so
|
||||
nothing lands in the other sequence's folder. Desktop: *Save both* and *Take server* on such a sequence say that
|
||||
its folder is not where the index has it, and a render job of it does not start.
|
||||
|
||||
## [0.1.0-rc.5] — 2026-10-27
|
||||
|
||||
### Added
|
||||
|
||||
Reference in new issue
Block a user