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
+230
-11
@@ -308,9 +308,12 @@ Primary entities (identical concepts in SQLite and PostgreSQL; ids are UUIDv7 st
|
||||
thumbs, render, import, upload-commit, maintenance; backup, cleanup, and the read-only
|
||||
duplicates and orphans reports; empty-trash, stored as 18, which erases exactly the trash
|
||||
entries of a confirmed plan, erases nothing when the trash changed since, and is never
|
||||
scheduled: amended 2026-10-26, R6), target ids, state (queued, running, paused, done, failed,
|
||||
cancelled), progress (done/total, fps, eta), log tail, created by, node id, attempts,
|
||||
error, schedule id (the schedule that queued it; amended 2026-10-26, R10).
|
||||
scheduled: amended 2026-10-26, R6; move, stored as 14, a Reorganize that applies exactly a
|
||||
confirmed plan of new folders, titles and file names to sequences of the archive, its target,
|
||||
and holds the rest of it when paused, cancelled or failed: amended 2026-10-26, R7), target
|
||||
ids, state (queued, running, paused, done, failed, cancelled), progress (done/total, fps,
|
||||
eta), log tail, created by, node id, attempts, error, schedule id (the schedule that queued
|
||||
it; amended 2026-10-26, R10).
|
||||
- **Schedule** (amended 2026-10-26, R10) — id, system key (set, and unique, on a host's
|
||||
system schedules, §14.6), name, action (scan, verify, thumbnails, proxies, analysis,
|
||||
maintenance, backup, cleanup, duplicates, orphans), target (`current`: the host's
|
||||
@@ -421,6 +424,7 @@ The archive is the source of truth; the database is an index that can be rebuilt
|
||||
│ ├── archive.json { id, name, schemaVersion, created, layoutTemplates, proxyPolicy }
|
||||
│ ├── index-snapshot.bin optional accelerator for rebuild (all sidecars concatenated + hash); ignored if stale
|
||||
│ ├── locks/ lease files for concurrent writers (server + client on same share)
|
||||
│ ├── journal/ rename-<plan>.json: a mass rename or Reorganize being applied (below; amended 2026-10-26, R7)
|
||||
│ └── trash/ deleted sequences and photos, kept until Empty (below; amended 2026-10-26, R6)
|
||||
├── 2026/
|
||||
│ └── 2026-09-28 Canon EOS R5 - Harbour sunset/ folder = expanded FolderTemplate
|
||||
@@ -432,6 +436,7 @@ The archive is the source of truth; the database is an index that can be rebuilt
|
||||
│ ├── analysis.json full deep-analysis report
|
||||
│ ├── project.json render settings (the "project")
|
||||
│ ├── thumbs.pack packed thumbnails (one file per sequence, indexed; avoids 100k tiny files on SMB)
|
||||
│ ├── rename-files.json the file renames of a Reorganize a crash interrupted (below; amended 2026-10-26, R7)
|
||||
│ └── *.pending.json journals of an ingest, a photo deletion or a restore a crash interrupted (below)
|
||||
```
|
||||
|
||||
@@ -474,10 +479,48 @@ is re-keyed so the frames that stay keep theirs (while a thumbnail pass holds th
|
||||
pass draws them again). Filing a photo into the sequence again (an import, a restore, an
|
||||
explicit upload again, §14.4) drops its tombstone; emptying the trash does not.
|
||||
|
||||
Reorganize (amended 2026-10-26, R7; §12.5, §14.8) applies a confirmed plan step by step, a
|
||||
step being one sequence and the sequences nested in a folder that moves with it:
|
||||
- `journal/rename-<plan>.json` holds the plan (its steps, templates and the sequences it was
|
||||
made for), the steps completed and what they did; it is written before the first step and
|
||||
deleted after the last. A plan whose job was paused, cancelled or failed is marked held and
|
||||
waits for that job; any other is completed at the next archive open. A journal that cannot be
|
||||
read is logged and left where it is: the archive opens, the plan is not resumed and its job
|
||||
fails with the reason.
|
||||
- Each step takes the leases of its sequences, then their thumbnail leases, and checks under
|
||||
them, before anything of it moves, that the plan still fits: the sequences where the index
|
||||
had them, nothing indexed since inside a folder that moves or at its new place, no sidecar of
|
||||
a newer format to rewrite, the title the plan started from where it changes the title or
|
||||
names the folder or files after it, the folder and title the templates give from the first
|
||||
photo as it is now, and the file renames planned again from the sidecar (compared by digest).
|
||||
What no longer fits refuses the rest of the plan, except photos changed since, whose
|
||||
sequence keeps its names (§12.5).
|
||||
- Then the folder moves (a change of case only through a temporary name, never onto another
|
||||
folder of that exact name), and in one transaction the index follows: the sequence's folder
|
||||
and title, its frames' paths and the paths of the exports that moved with the folder. Only
|
||||
then are files renamed; once its folder moved, a step always goes to its end.
|
||||
- A sequence of the plan that an earlier step left as it was inside a folder that moves later
|
||||
(it changed after the plan, or the folder that was to carry it stayed) goes with that folder,
|
||||
under the same leases, keeping its title and file names. Before a held plan resumes, a folder
|
||||
that moves may hold only such sequences and those of the steps still to come; any other
|
||||
refuses the plan, which is then given up.
|
||||
- File renames run under `rename-files.json` in the sequence's `.chronos/`: every file first to
|
||||
a hidden temporary name beside it (`.chronos-rename-<token>-<n>.tmp`), then every file to its
|
||||
new name, so chains and swaps of names never meet a name another file holds and no file is
|
||||
ever written over; then the sidecar names the new files (frame order and ids unchanged,
|
||||
frames version + 1), then the index, then the journal goes. A failure while files move puts
|
||||
every file back. After a crash the next writer of the sequence (any `ReadLocked`, the plan's
|
||||
resume) completes the renames, safely run again from wherever it stopped: a new name taken
|
||||
meanwhile sends that photo and its companions back together to their old names, or to the
|
||||
first free `_2`, `_3`…, and the journal stays while a temporary file is left.
|
||||
- Proxies (named by frame index), thumbnails (by index and content hash), tombstones and trash
|
||||
records need nothing; a photo restored from the trash comes back under the name it had.
|
||||
|
||||
Rules: originals are immutable (never rewritten; edits are settings); every write of a
|
||||
sidecar goes to a temp file, `fsync`, rename; the folder name is derived from templates at
|
||||
import time and never auto-renamed afterwards (renaming is a user mass-operation that
|
||||
updates sidecars and DB together). Network drives: UNC or mapped paths; long-path aware
|
||||
import time and never auto-renamed afterwards: only Reorganize, an explicit user action
|
||||
behind a dry run, moves and renames what is filed, updating sidecars and DB together
|
||||
(amended 2026-10-26, R7). Network drives: UNC or mapped paths; long-path aware
|
||||
(`\\?\` prefix); no `FileSystemWatcher` reliance — periodic polling by mtime/size (the
|
||||
*Archive scan* system schedule of each host, §14.6; amended 2026-10-26, R10) plus manual
|
||||
rescan; offline detection with graceful read-only state.
|
||||
@@ -491,6 +534,31 @@ name, ext, title`. `{token:format}` passes the format to the .NET formatter. Ill
|
||||
characters are replaced, never passed through; templates are validated live in the UI with a
|
||||
preview of the first three names.
|
||||
|
||||
One naming rule for import, upload and Reorganize (amended 2026-10-26, R7):
|
||||
- A photo is named in its sequence with the sequence's camera and lens (its first photo's, or
|
||||
the camera hint its creator gave): a second body in a whole-folder import, or a lens changed
|
||||
during a session, does not show in the names. `{n}` is its place in the sequence, `{name}`
|
||||
its name on the card, `{ext}` its file's extension (the card name's when the file lost the
|
||||
extension of a photo), and a frame recorded without a capture time takes the sequence's
|
||||
start (its first frame's time, else when it was made; never today's date). A name already
|
||||
given, or held by a file that stays, gets `_2`, `_3`… before the extension. Folder and title
|
||||
templates see the sequence's first photo as filing saw it.
|
||||
- So a Reorganize with the archive's own templates changes nothing filing named. It gives
|
||||
other names, which its dry run lists, where filing could not know the sequence as it is now:
|
||||
`{session}` of a card's second session on (an import numbers its sessions, a sequence is
|
||||
one), `{n}` after photos skipped mid-session as duplicates or filed out of capture order, and
|
||||
a folder or title from a photo that is no longer first.
|
||||
- Rules every template meets wherever it is typed or sent (Settings › Archive, Import,
|
||||
Reorganize, the admin panel's Archive): a folder template may not write a level scans never
|
||||
enter (starting with `.`, or `originals`, `proxies`, `exports`, `.chronos`); a file template
|
||||
must keep the photo's extension (appended, or after `.{ext}`: `{n}{ext}` is refused), tell
|
||||
the photos of a session apart (three sample photos two seconds apart must get three names)
|
||||
and hold no slash. A level a value such as a title would hide that way is written with a
|
||||
leading `_`. A file name longer than 200 characters is shortened before its `.{ext}`, never
|
||||
through it. A title template gives text, not a file name (`Paris: night` stays), at most 200
|
||||
characters. A template `archive.json` already holds, saved before these rules, is kept
|
||||
through edits of other settings; changing it holds it to them, and a new archive meets them all.
|
||||
|
||||
---
|
||||
|
||||
## 8. Image pipeline
|
||||
@@ -795,8 +863,10 @@ player smoke test on Windows CI.
|
||||
- Card: hero thumbnail, title (user title or `{date} {camera}`), count · camera · span,
|
||||
status chips: `✓` analysed, `▣` proxies, `▶n` renders, `☁` synced/origin, `!` warnings.
|
||||
Hover reveals quick actions: Open, Analyse, Render preset, Sync.
|
||||
- Multi-select → mass actions bar (Analyse, Build proxies, Verify, Tag, Rate, Move,
|
||||
Upload, Download, Delete, Export list as CSV).
|
||||
- Multi-select → mass actions bar (Analyse, Build proxies, Verify, Tag, Rate,
|
||||
Reorganize…, Upload, Download, Delete, Export list as CSV). Reorganize… (amended
|
||||
2026-10-26, R7; formerly Move) takes the selected sequences of one archive, never a
|
||||
server-only one, into the dialog of §12.5.
|
||||
- Filters are chips; saved views (e.g. "Night, 4K, not rendered"); search is instant
|
||||
(indexed columns); everything virtualized (in-house `VirtualizingWrapPanel`).
|
||||
- Photos deleted from a sequence (amended 2026-10-26, R6; on the admin panel, §14.8, or by
|
||||
@@ -907,7 +977,7 @@ player smoke test on Windows CI.
|
||||
│ Index health: ✓ sidecars 412/412 · ⚠ 3 sequences without proxies · ⚠ 1 unverified since 90 days │
|
||||
│ Recent maintenance: 2026-09-20 verify ✓ · 2026-09-01 vacuum ✓ │
|
||||
├──────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ Mass operations on filtered set (412): [Analyse] [Proxies] [Thumbnails] [Verify] [Move] [Retag] [Export CSV] [Delete] │
|
||||
│ Mass operations on filtered set (412): [Analyse] [Proxies] [Thumbnails] [Verify] [Reorganize…] [Retag] [Export CSV] [Delete] │
|
||||
```
|
||||
|
||||
Operations: **Scan** (incremental, mtime/size), **Rebuild index** (from sidecars; falls
|
||||
@@ -938,6 +1008,50 @@ those entries and nothing when the trash changed since; an entry that changes wh
|
||||
is kept, and the job then fails after erasing the others. It is the only way the product
|
||||
erases trash entries; no schedule runs it (§14.6).
|
||||
|
||||
*Reorganize…* (amended 2026-10-26, R7; it replaces Rename… and Move…) applies new templates
|
||||
to sequences already filed: the set (online), the Library's selection (§12.2), or every
|
||||
sequence of the archive from the toast of Settings › Archive (§12.8). The admin panel offers
|
||||
the same (§14.8), through the same engine and job.
|
||||
- An in-window dialog: Folders (`{title}` is the new title), File names (as filing names
|
||||
them, §7.1) and Titles (`{title}` is the current title), each with its switch and field,
|
||||
checked as it is typed against the rules of §7.1; a template switched off never blocks the
|
||||
others. Folders and File names start on with the archive's templates, read again when the
|
||||
dialog opens; Titles starts off, with `{title}`.
|
||||
- The dry run (nothing touched) follows the typing (400 ms; Enter, or leaving a field, at
|
||||
once) and lists, in the order the changes apply, each sequence with its folder, title and
|
||||
first three file names before → after, *Follows its folder* for a sequence nested in a folder
|
||||
that moves, how many files get a new name, and the photos that keep their names with why:
|
||||
kept in place outside `originals/` (a tree someone else keeps), never verified (verify the
|
||||
sequence first), missing; or that the sequence stays as it is, with every folder around it,
|
||||
because its sequence file cannot be read (damaged, another sequence's, or from a newer
|
||||
Chronos). The summary reads "12 of 36 change · 3,600 files renamed · 20 names kept".
|
||||
- *Apply* (enabled only for the dry run of the templates on screen, when something changes)
|
||||
queues the *Reorganize* job of exactly that plan at user priority; the dialog closes and a
|
||||
toast links to Jobs. Cancel is the default button.
|
||||
- The job (desktop and server) plans again and applies the plan only while it is the one
|
||||
confirmed (its fingerprint, §14.3); otherwise it fails and nothing changes, a sequence
|
||||
deleted since named in its log. It changes one step at a time. Pause or cancel stops
|
||||
between two steps and holds the rest for the job's resume or retry; a failed job holds it too
|
||||
(also when the archive's volume went away), and its retry completes it while it still fits.
|
||||
A retry while the archive is still offline fails as offline and keeps the plan: a plan
|
||||
journal it cannot reach is never taken for one completed.
|
||||
An archive open completes a plan an interruption left (a crash, a yield to another job, the
|
||||
program closing), not one its job holds.
|
||||
- What changed after the dry run: a sequence moved or gone, one indexed inside a folder that
|
||||
moves, a new folder taken, a title edited that the plan changes or names a folder or files
|
||||
after, a sidecar of a newer Chronos it would rewrite: the rest of the plan is refused, the
|
||||
steps done stay, and a new dry run is needed. Photos changed since (a sequence still
|
||||
receiving them) refuse nothing: that sequence keeps its file names, and its folder and title
|
||||
change while the templates still give them from its first photo as it is now, otherwise it
|
||||
stays as it was, and so do the sequences its folder was to carry. A sequence left as it was
|
||||
inside a folder that a later step moves goes with that folder, keeping its title and file
|
||||
names, so the folder around it still moves. A photo in use or a new name taken keeps that
|
||||
sequence's file names (every file back). These sequences are listed in the job's log, and
|
||||
the job fails at the end, after the others changed, saying how many; its retry plans again.
|
||||
- Deleting sequences of the archive is refused while a Reorganize job runs or is paused. The
|
||||
Archive and Library screens read the archive again when it ends; an editor open on a
|
||||
sequence it changed reloads where the sequence is now after that sequence's step.
|
||||
|
||||
### 12.6 Jobs
|
||||
|
||||
Two tabs, a *Queue | Scheduled* segmented control first in the toolbar (amended 2026-10-26,
|
||||
@@ -998,7 +1112,11 @@ mine / take server / save both).
|
||||
Sections (list on the left, controls on the right, no descriptions — tooltips only):
|
||||
General (language, theme, startup, notifications), Archive (root, templates, proxy policy,
|
||||
thumbnail size; the rescans are the Archive scan schedule of Jobs › Scheduled, §12.6, so
|
||||
*Rescan every* is gone; amended 2026-10-26, R10), Import (defaults, session rules, verify,
|
||||
*Rescan every* is gone; amended 2026-10-26, R10; a new folder or file template names only what
|
||||
is filed next, so once the archive took it, and holds sequences, a toast offers *Reorganize…*
|
||||
for every sequence with the changed templates switched on, a change made while that archive's
|
||||
toast is up joining it; on the Archive screen it never replaces an open dialog, and opens once
|
||||
that one closes: amended 2026-10-26, R7), Import (defaults, session rules, verify,
|
||||
post-actions), Analysis (widths, thresholds, deep analysis auto-run), Rendering (quality
|
||||
profile, memory budget, spill folder, parallelism = photos the running job processes at once, priority queue
|
||||
with a level per job kind, encoders detected, hardware preference; amended 2026-10-16, R2),
|
||||
@@ -1048,7 +1166,8 @@ update check on start (§18) runs whatever screen is open.
|
||||
"already imported" state remembered per card + file (path, size, mtime) for fast
|
||||
re-inserts.
|
||||
- Rename during import: templates (§7.1) with live preview; original name kept in the
|
||||
sidecar.
|
||||
sidecar. Every photo of a session is named with its first photo's camera and lens, the ones
|
||||
its sequence carries, as Reorganize names it (amended 2026-10-26, R7).
|
||||
- Post-actions: keep / delete imported files (only those verified) / format card (OS
|
||||
dialog) / eject; run deep analysis automatically (default on, background, low priority).
|
||||
- Failure handling: card removed mid-copy → partial files deleted, plan resumable on
|
||||
@@ -1135,6 +1254,7 @@ WS /api/v1/events {type: jobProgress|jobState|sequenceCh
|
||||
POST /api/v1/nodes/register · POST /nodes/{id}/heartbeat · POST /nodes/{id}/claim → job · POST /nodes/{id}/jobs/{jobId}/result (chunked upload of output)
|
||||
|
||||
GET/PUT /api/v1/archive/settings · POST /archive/scan · /rebuild · /verify · GET /archive/stats · POST /archive/maintenance (admin)
|
||||
POST /api/v1/archive/reorganize {sequenceIds|all, folderTemplate?, fileTemplate?, titleTemplate?, dryRun, fingerprint?} → plan | 202 move job (admin)
|
||||
GET /api/v1/archive/trash · POST /archive/trash/{name}/restore · POST /archive/trash/empty {names?, dryRun, fingerprint} (admin)
|
||||
GET /api/v1/i18n/{culture} strings for the web admin
|
||||
```
|
||||
@@ -1188,6 +1308,56 @@ Library and trash (amended 2026-10-26, R6):
|
||||
- The manifest gains `removed: [{sha256, replacement, reason: deleted|replaced, at}]` (null
|
||||
when there are none; covered by its ETag, since a deletion moves the frames version).
|
||||
|
||||
Reorganize (amended 2026-10-26, R7; ManageArchive; §7, §12.5, §14.8):
|
||||
- The request names exactly one of `sequenceIds` (1–1,000) and `all`; a null template keeps
|
||||
that part, at least one is given, each usable and within the rules of §7.1. A dry run
|
||||
answers `{steps, sequences, files, kept, fingerprint}` and changes nothing: a step for each
|
||||
sequence that changes, is carried or keeps photo names, in the order they apply,
|
||||
`{sequenceId, fromFolder, toFolder, fromTitle, toTitle, carried, framesVersion, fileChanges,
|
||||
fileSamples: [{from, to}] (at most 3, relative to the sequence folder), blocked: [{reason:
|
||||
in_place|unhashed|missing|unreadable, photos, message}]}` (`unreadable`: the whole sequence
|
||||
stays, 0 photos; the message in the request's language). The change sends the dry run's
|
||||
fingerprint back and answers 202 with the `move` job. Errors: 400 `bad_request`
|
||||
(`sequenceIds`, `templates`, `fingerprint`), `invalid_template` (below); 404 `not_found`
|
||||
(`sequence`); 409 `nested_target` (details: the folder that would lie inside a sequence's
|
||||
folder), `plan_changed` (details: the fingerprint now), `job_unavailable`; 503
|
||||
`archive_offline`, `plan_dropped`. Audited `archive_reorganized` (sequences, files renamed,
|
||||
templates). The job publishes `sequenceChanged` with the change `reorganized` for each
|
||||
sequence once its step is journaled (at once for a step that failed after its folder moved
|
||||
and its index rows followed); a plan the server completes as it starts tells no one, as no
|
||||
client is connected yet.
|
||||
- The fingerprint is a SHA-256 of the steps as the dry run shows them (folders, titles,
|
||||
carried, file counts, samples, what stays and why), every file rename by its digest, and the
|
||||
file template; not the frames version, so photos a sequence receives under the names the
|
||||
plan leaves them keep it.
|
||||
- The server keeps a dry run's plan, and a refusal (`nested_target`, `not_found`), for 5
|
||||
minutes, keyed by the archive, the selection (all, or the ids in their order, which decides
|
||||
which folder gets " (2)"), the templates, and a stamp of what the plan reads from the index:
|
||||
every sequence's id and folder; the planned sequences' title, first capture, camera, lens,
|
||||
photo count, frames version and how many of their photos are hashed; the title of the others
|
||||
inside their folders. The same dry run again, and its confirmation, take the kept plan. A
|
||||
plan is made apart from its request (one a proxy cuts off leaves it to be made, and asking
|
||||
again waits for it), at most 2 at once and 8 kept or being made; one still being made 15
|
||||
minutes after it was asked, let go for newer ones, or when the server stops is stopped, and
|
||||
its requests answer 503 `plan_dropped`. A change made on disk alone is not in the stamp: the
|
||||
confirmation then answers 202, and the job, which plans again, fails without changing anything.
|
||||
- `invalid_template`, here and from `PUT /archive/settings`: the details name the field and,
|
||||
after a colon, the rule a template that parses breaks (`folderTemplate:reserved_folder`,
|
||||
`fileTemplate:file_separator`, `fileTemplate:extension`, `fileTemplate:not_unique`), the
|
||||
message saying why in the request's language (`Errors.Template.<Rule>`); a blank, invalid or
|
||||
unusable template keeps the bare field and the generic message. `PUT /archive/settings` holds
|
||||
a template to the rules only when the save changes it; every template must still parse and
|
||||
expand.
|
||||
- Writers that file into a sequence's folder take it from the index row read under the
|
||||
sequence's lease, so they write where a Reorganize put it. Completing a render upload or a
|
||||
render node's result that cannot be filed for now answers 503 and keeps the upload
|
||||
receiving, to be completed again: `sequence_busy` (the sequence held past the lease wait),
|
||||
`archive_offline` (the archive offline or read-only) or `folder_moved` (the sequence's folder
|
||||
not where the index has it, or holding another sequence, after another program moved them;
|
||||
the server's next scan finds it). The node keeps its job while it retries. A proxy upload
|
||||
answers 503 `sequence_busy` while the sequence is held, 404 `frame` when the sequence or its
|
||||
folder is gone, or the folder is another sequence's.
|
||||
|
||||
Uploads (amended 2026-10-26, R3, R6): `server/info` lists `extensions`, the photo file
|
||||
extensions the archive files (lower case, no dot), which the admin panel's dialog keeps to. A
|
||||
frame upload whose file name starts with `.` is 400 `invalid_file_name`. A start whose
|
||||
@@ -1297,6 +1467,25 @@ missing here and *Download* fetches and drops it each time; a photo never hashed
|
||||
original was already missing when it was deleted leaves no tombstone, so a copy elsewhere
|
||||
(another PC, a card) is not known to be deleted and can come back.
|
||||
|
||||
Folders moved by another program (amended 2026-10-26, R7). When a desktop and a server share
|
||||
an archive, a Reorganize by one index (or a folder moved by hand) is found by the other's next
|
||||
scan, which moves the sequence's row, its frames and the paths of the exports that moved with
|
||||
the folder (a file or, for an image sequence, a folder; an export written at the old place
|
||||
after the move keeps its path there, and another sequence's export saved inside follows only
|
||||
when it moved with the folder). The other program may also have moved another sequence into
|
||||
the old folder (its sidecar names that sequence): the moving sequence's exports then follow to
|
||||
its new folder, and an export of the sequence that took the old folder never follows, so no
|
||||
row names another sequence's file. Until that scan nothing writes into the old place, which
|
||||
would create it again, nor into another sequence that took it: *Save both* and *Take server*
|
||||
answer that the folder is not where the index has it (try again after the next scan), and so
|
||||
do a render job as it starts, exports fetched by sync, a proxy pass, and a thumbnail pass that
|
||||
finds another sequence's sidecar there; the editor's save says the sequence is no longer in
|
||||
the archive, and a deep analysis that loses its folder records nothing. A render of the other
|
||||
program whose folder moves while it runs is not stopped. Known limitation: an export a
|
||||
sequence saved into another sequence's folder (the Export folder picker), before the other
|
||||
program moved that sequence away and the first one into its folder, keeps naming the old
|
||||
path; the file is intact, moved with the other sequence.
|
||||
|
||||
### 14.6 Job engine
|
||||
|
||||
Persistent queue in the DB; jobs run one at a time, and the parallelism (configurable,
|
||||
@@ -1414,7 +1603,8 @@ available and says so in the job log.
|
||||
|
||||
Pages: Login · Dashboard · Library (amended 2026-10-26, R6; below) · Users (table;
|
||||
create/edit/disable/reset/roles/quota) · Archive (path, templates, proxy policy,
|
||||
scan/rebuild/verify, stats, and *Trash*, which opens the Library's trash view; R6) · Jobs
|
||||
scan/rebuild/verify, stats, and *Trash*, which opens the Library's trash view; R6; a save
|
||||
that changes a template offers Reorganize, R7) · Jobs
|
||||
(two tabs in the header, amended 2026-10-26, R10: *Queue*, the queue/history/nodes with
|
||||
cancel/retry, where
|
||||
`#/jobs?job=<id>` opens a job's log and a job a schedule queued carries a *Scheduled* pill
|
||||
@@ -1488,6 +1678,33 @@ operations; it queues no deep analysis (the API's `bulk/jobs` takes `deep`).
|
||||
- The audit log and the Dashboard name photo deletions, trash restores and emptyings asked
|
||||
for.
|
||||
|
||||
Reorganize (amended 2026-10-26, R7), the panel's way to the Reorganize of §12.5 through
|
||||
`POST /archive/reorganize` (§14.3):
|
||||
- The Library's selection bar has *Reorganize…*: the selected sequences, up to 1,000 (one
|
||||
plan, one job); above that, every sequence of the archive, only while the selection is
|
||||
exactly *Select all* without a filter and the archive still holds as many; any other larger
|
||||
selection is refused with a message, never split.
|
||||
- On Archive, a save that changes the folder or file template, when the archive has
|
||||
sequences, shows *Saved* with *Reorganize…*: the dialog for every sequence, with the saved
|
||||
templates and only the changed parts switched on. Saving alone never renames anything.
|
||||
- The dialog: Folders (`{title}` the new title), Files (named as filing names them) and Titles
|
||||
(`{title}` the current title), each with its switch and field, from the archive's settings;
|
||||
Titles starts off and empty. Each change asks the server for a dry run 400 ms after typing
|
||||
stops (Enter at once), one at a time, a change made meanwhile planned right after. The
|
||||
table shows each sequence in the order the changes apply, 200 at a time: title, folder and
|
||||
renamed files before and after (up to three samples), *Carried* for a sequence that moves
|
||||
only with a folder it is inside, and the photos that keep their names with why, or why the
|
||||
sequence stays as it is; totals of sequences changed, files renamed and names kept. A refused
|
||||
template is marked on its field with the server's reason; a nested target on Folders.
|
||||
- *Apply…* (enabled only while the table is the plan of the fields and changes something)
|
||||
asks for a confirmation that counts the sequences, folders and photos (nothing is deleted,
|
||||
so nothing is typed), then sends that plan's fingerprint; the toast offers *Open job*. When
|
||||
the archive changed meanwhile (`plan_changed`), or a new plan answered during the
|
||||
confirmation, the dialog shows the new plan and Apply waits.
|
||||
- A toast with an action stays 15 s and pauses under the pointer or the keyboard focus. The
|
||||
audit log and the Dashboard read "… reorganized the archive · N sequences · M files renamed
|
||||
· templates".
|
||||
|
||||
Upload (amended 2026-10-26, R3): Library › *Upload* (no sequence) and a sequence's *Add
|
||||
photos* open the upload dialog (§14.4), a module the pages import only on demand.
|
||||
- Target: the given sequence, or a choice between an existing sequence (a search box, then a
|
||||
@@ -1990,6 +2207,8 @@ questions asked and the answers; DECISIONS rows give the reasons.
|
||||
| 2026-10-26 | Owner review 2, R11 | §12.8, §14.1, §14.3, §14.8, §14.9, §19.6 | Log settings: file and console levels apart on the server (`CHRONOS_LOG_LEVEL` locks both, `CHRONOS_LOG_CONSOLE_LEVEL` the console), retention, a file size limit with numbered parts, a total size limit, daily or hourly rotation, audit retention and the diagnostics share, in the admin panel's Settings › Logs (applied at once, `lockedBy` naming the variable) and the desktop's Settings › Advanced (from the first log line); the server's files take Debug and Trace when asked; logging never fails a job. |
|
||||
| 2026-10-26 | Owner review 2, R6 | §5, §7, §12.2, §12.5, §14.3, §14.4, §14.5, §14.8 | The admin panel manages, never edits: a Library page (filters from facets, cards or list, keyboard selection, mass Analyse, Proxies, Thumbnails, Verify, Tags, Export CSV and Delete), a sequence's page with a photo viewer, cover, downloads and photo deletion, and the trash view with Restore and Empty; photos deleted into `trash/photos` under journals, a photo never hashed hashed as it goes, tombstones in the sidecar (`removed`) and the index (`frame_removals`, migration 0008) that keep sync and uploads from bringing a deleted photo back unless the user restores it or uploads it again on purpose; trash kinds, restore reasons, and Empty as the `empty-trash` job behind a dry run, a typed confirmation and a fingerprint, never scheduled; the library, trash and bulk endpoints; the panel's files revalidated (`no-cache`, ETag). |
|
||||
| 2026-10-26 | Owner review 2, R3 | §14.3, §14.4, §14.8 | Upload from the admin panel into an existing or a new sequence (file picker, drag and drop, no folders), hashed in the browser by a self-tested in-house SHA-256 in a module worker, the capture time read from Exif, sent in resumable chunks through the upload API and verified by the server; `server/info` lists the photo extensions; hidden dot files are refused for every client. |
|
||||
| 2026-10-26 | Owner review 2, R7 (Reorganize) | §5, §7, §12.2, §12.5, §12.8, §14.3, §14.5, §14.8 | Reorganize on the desktop (Archive manager, Library, the toast of Settings › Archive) and the admin panel (Library, the toast of Archive): folder, file and title templates applied to sequences already filed, behind a dry run that lists each sequence's changes, the photos that keep their names and why (in place outside `originals/`, never hashed, missing) and the sequences that stay whole (unreadable sidecar); applied by the `move` job of exactly the confirmed plan (fingerprint), which holds the rest when paused, cancelled or failed and lets a sequence still receiving photos keep its file names; crash-safe plan and file journals (two-phase renames through hidden temporary names, recovery by the next writer); a sequence of the plan left as it was inside a moving folder goes with it; the index, frames and exports follow a moved folder in one transaction, on this index and at another index's next scan; writers take the folder under the lease, never create a left one again and never write into a folder another sequence took; `POST /api/v1/archive/reorganize` with a kept, bounded plan cache and `sequenceChanged` `reorganized`; Rename… and Move… replaced. |
|
||||
| 2026-10-26 | Owner review 2, R7 (naming) | §7.1, §13, §14.3 | One naming rule for import, upload and Reorganize: the sequence's camera and lens, `{n}` its place, a frame without a time at the sequence's start; template rules everywhere a template is typed or sent (no folder level scans skip, one a value such as a title gives escaped with `_`; a file template keeps the extension, tells photos apart, holds no slash; long names shortened before `.{ext}`; titles as text), held to a template only when it is given anew; `invalid_template` names the rule. |
|
||||
|
||||
## Appendix A — `CLAUDE.md` content (create verbatim in Phase 0, keep updated)
|
||||
|
||||
|
||||
Reference in new issue
Block a user