feat: owner review 2 phase 4b: mass conversion after import (#13)
CI / Build and test (push) Failing after 3m1s
CI / PostgreSQL 16 integration (push) Skipped
CI / PostgreSQL 17 integration (push) Skipped
CI / Docker image (push) Skipped
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 10s
Release / Build, test and publish (push) Successful in 15m31s
Release / Server image (push) Successful in 1m13s

Convert photos already in the archive to JPEG, TIFF-16 or Linear DNG, from the panel's Library and the desktop's Archive and Library. Each run asks Replace (same frames, originals to the trash, recoverable) or New sequence. A dry run lists what converts, what is skipped and why, size before and after, and free space; the job converts exactly the confirmed photos, resumes, and commits all or nothing per sequence. A conversion never changes what Chronos reads from a photo. Replaced originals are erased only on the archive's own word that their conversion is gone. Desktop TIFFs that WIC showed black or as noise now go to the managed reader; the Edit picker no longer spins a core.

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 #13.
This commit is contained in:
Alby96andClaude Opus 5.5 authored and Alby96 committed 2026-11-03 10:41:50 +01:00
1 parent 7e4a3b481d
commit efa87f68ce
354 files changed
+24530 -843

No files matched your search

+110
View File
@@ -5,6 +5,116 @@ commits follow Conventional Commits (release notes are generated from them by `C
## [Unreleased]
## [0.1.0-rc.7] — 2026-11-02
### Added
- **Convert** on the desktop and the admin panel (owner review 2, R7): convert the photos of sequences already in the
archive to JPEG (with a quality), 16-bit TIFF or linear DNG, the archival choice. At every run you choose what
becomes of the originals: *Replace* (the converted files become the sequence's photos, the same frames, and the
originals go to the archive's trash, from which *Undo* or *Restore* brings them back until the trash is emptied) or
*New sequence* (converted copies in a new sequence beside each one, titled "… (DNG)", with its tags, rating, notes
and project; the originals stay as they are). No mode is preselected and none is remembered.
- A dry run first, following your choices: per sequence the photos converted, their size before and the estimate
after, the photos that stay as they are and why (already in that format, a format this computer cannot read at full
resolution, which the server answers with "convert these photos on a PC", read only from a preview, a RAW this
computer develops at 8 bits only, a colour profile the format cannot keep, too large, unreadable, missing, never
verified, held open by another program), the sequences left as they are (busy, offline, unreadable) and the free
space the conversion needs. A PC asks its own decoders again about a photo the server found unreadable (a CMYK
TIFF), so it converts what it reads. With New sequence it says which photos each new sequence lacks. Replace asks
you to type the number of photos (desktop) or the word "replace" (admin panel); New sequence asks a confirmation
that counts the photos not copied.
- A *Convert* job then converts exactly the photos the dry run listed, one sequence at a time and all or nothing:
photos uploaded meanwhile stay as they are, and a sequence whose photos changed since is left as it is and named in
the job's log. Pause, resume and retry it in Jobs: it keeps what it converted, resumes after a crash, checks the
free space as it goes (counting every photo still being written) and stops before the volume fills. A second
conversion of the same sequences is refused while the first waits or runs. A retried New sequence conversion
finishes the copy it already made and never makes a second one; a source another conversion copied in the same
format since this one was confirmed gets no copy (the job's log says so), and while that other conversion has not
finished, the source waits for its retry.
- Every photo is decoded at full resolution only, never from an embedded preview, by Chronos' own decoders wherever
they read it (RAWs developed at full precision, the same on every computer), and keeps its metadata (capture time
to the tick, camera, lens, exposure, GPS); every converted file is read back and decoded by the server's decoders
before it is kept. A linear DNG keeps a RAW's highlights above white (up to 4 stops, in BaselineExposure) and its
colours outside sRGB (ProPhoto primaries).
- A conversion never changes what Chronos shows of a photo: the converted file decodes to the values the original
decoded to, within what the format holds. A JPEG or TIFF-16 keeps the photo's values and carries its colour profile; a float TIFF's values get a
profile made for them, with the original's primaries, and a gray profile's tones are kept. A linear DNG takes only
photos whose values are sRGB as Chronos reads them (RAWs, photos without a profile, sRGB): photos in Adobe RGB
(camera JPEGs tagged so included), Display P3 (HEIC), ProPhoto or a gamma-1.0 profile stay as they are, with "a
colour profile the format cannot keep"; TIFF-16 and JPEG convert them with their profile. A file whose pixels hold
values that are not numbers fails as damaged and nothing is written.
- Desktop: *Convert…* in the Archive manager's set bar and in the Library's mass bar (the sequences of one archive).
When a Replace job ends, its toast offers *Undo*, which brings back the originals that job replaced.
- Admin panel: *Convert…* in the Library's selection bar (up to 1,000 sequences, or every sequence after *Select all*
without a filter), and a toast that opens the job. A dry run that takes longer than a proxy lets a request last is
asked again until it is ready.
- The archive's trash lists the originals a conversion replaced as their own kind: *Restore* puts them back in place
of their conversions while those are unchanged (the conversions then go to the trash), otherwise as a new sequence.
*Empty…* erases them only while each conversion still matches where the archive holds it now. A conversion counts
as deleted only when the archive says so (a deletion recorded in its sequence's sidecar, the sequence in the trash,
or the trash's record of erasing that sequence); such originals are named first in its confirmation ("conversion
deleted"), since they may be the last copy of their photos. Whatever the archive cannot tell keeps the entry.
- API v1: `POST /api/v1/archive/convert` (archive administrators): a dry run with the plan, its space line and its
fingerprint, then the `convert` job (202) of exactly that plan; 409 `plan_changed`, `nothing_to_convert`,
`not_enough_space`; 503 `plan_dropped` when the server let the plan go. The server keeps a dry run a few minutes,
in the plan cache Reorganize uses. `sequenceChanged` with the changes `converted` and `created`; trash entries of
kind `replaced`, and `conversionDeleted` in an emptying's dry run; the audit log and the Dashboard name
conversions.
- Known limitations: a photo that cannot be converted although the dry run listed it (a damaged RAW whose headers read
well) leaves its whole sequence as it was, while the other sequences convert, and the job's retry fails the same
way; a decode larger than the computer's memory stops the job itself at every retry, before the sequences after it
(converted photos are capped at 268 MP for JPEG and about 179 MP for TIFF-16 and DNG, which makes it rare); a
damaged file that still decodes (a truncated TIFF strip, a corrupt JPEG scan) converts as the partial picture its
decoder gives; a read error while the dry run reads the headers of a TIFF, a DNG or a TIFF-based RAW lists that
photo as needing a PC, preview-only or unreadable rather than held open (it stays as it is); JPEG and TIFF-16 clip a
float TIFF's values above white and below black; a PNG's gamma and primaries without an embedded profile, JPEG XL,
JPEG XR, BMP and GIF, and Exif colour spaces other than sRGB, Adobe RGB and uncalibrated are taken as sRGB; a linear
DNG keeps the as-shot white balance baked in and clips noise below black; MakerNote and XMP are not carried; the
server's kept dry run does not see a change made on disk alone (a photo another program held stays listed as held
for up to 5 minutes, unless the index changes), and the job then converts only the photos the dry run listed, each
only while it holds the content confirmed; a conversion of every sequence of an archive that keeps receiving uploads
may never be confirmed, as each upload changes the plan; of two confirmations of the same sequences at once the
second is refused with `plan_changed`; an emptying's dry run lists as erasable an entry the job then keeps (its
conversion changed, never verified or not located, its sequence busy), and the job says why and fails at the end;
erasing replaced originals holds their sequence while every conversion is re-hashed; the desktop's *Undo* lives in
the toast of the job's end only: later, after a restart, or for a conversion the server ran, *Restore* in the trash
brings the originals back.
### Changed
- Import still copies every photo byte for byte and converts nothing. Deleting imported photos from a card keeps, and
formatting the card refuses, a photo converted since: its archived file no longer matches the card.
- Sync and imports count a photo and its conversion as one photo: a photo converted on either side, or on both,
compares as one; importing a card or a folder again, or downloading an original, files nothing for a photo
converted since; an upload of such an original into its sequence is answered `alreadyExists`; *Download originals*
puts the server's conversion in place of a photo missing here, instead of adding a frame.
- Exif written by Chronos (proxies, exports, converted photos) includes the exposure program, metering mode, flash
and white balance when known.
- Server: Reorganize's and Convert's dry runs share one plan cache, two made at once and eight kept across both.
- Emptying the trash says in its job log why it kept each entry and what settles it: changed after the plan, its
sequence busy, a conversion that no longer matches, a photo never verified (verify the sequence), a sidecar missing
or unreadable (scan the archive), an index row the archive does not bear out (rebuild the index), or a conversion
whose fate the archive does not show (restore the entry to keep its photos).
- Desktop: a confirmation with a long list scrolls it, so its buttons stay on screen; Tab reaches the list, which
then scrolls with the arrow, page and Home/End keys.
- **Upgrade:** there is no migration: the index stays at schema 8, and earlier versions keep the sidecar fields
conversions write (`frames[].source`, tombstones of reason `replaced`). Undo conversions before going back to an
older version: it cannot swap replaced originals back (its *Restore* keeps them in the trash) nor settle a
replacement a crash interrupted.
### Fixed
- The managed TIFF decoder (the server's, and the desktop's after WIC) read CMYK, CIELab and palette TIFFs as the gray
of their first channel; it now leaves them unreadable (a PC reads them through WIC). A TIFF with an impossible
number of strips or tiles is refused as unreadable too, so a PC asks WIC, instead of failing with an arithmetic
error.
- Sync's job log lines (a photo missing, changed, deleted on this PC or on the server, frames without a proxy or
thumbnail on the server) are in your language; they were English in every language.
- On a PC, TIFFs that WIC decodes wrongly without an error (a compression it does not know, such as ZSTD or JPEG
2000, which came out black; Photoshop's 32-bit files with a floating-point predictor and 32-bit integer samples,
which came out as noise) are left to Chronos's own TIFF reader, or are unreadable, in renders, thumbnails and
analyses as in conversions.
- Edit: the picker no longer spins a processor core and stops responding when the list is loading a page as it
looks for the sequence edited last.
## [0.1.0-rc.6] — 2026-10-27
### Added