diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index b5b07bc1..8b0a6590 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -54,13 +54,13 @@ Dependencies point one way: `Core` ← `Core.Windows`, `Data`, `Protocol` ← `S |---|---| | `Sqlite`, `Postgres` | SQLite P/Invoke binding (winsqlite3 / libsqlite3), in-house PostgreSQL wire protocol v3 client with pool and LISTEN | | `Migrations/{sqlite,postgres}/NNNN_name.sql` | Embedded, applied in one transaction at open (`MigrationRunner`) | -| `Repositories` | `ChronosDatabase` facade: archives, sequences, frames, tags, renders, jobs, cards, users, tokens, uploads, render nodes, settings, audit, schedules (`ScheduleRepository`: system rows seeded without overwriting edits and never deleted, the compare-and-set claim of a run); `DatabaseBackups` (`VACUUM INTO` copies of an SQLite index into `backups` next to it, every copy keeping as many as the backup schedules keep (`KeptAsync`), the newest copy that seeds the `index-backup` schedule (`Newest`, `SystemSchedule.LastDone`), restore staged for the next start and carried out before the index opens, so it also recovers one that no longer opens) | +| `Repositories` | `ChronosDatabase` facade: archives, sequences, frames, tags, renders, jobs, cards, users, tokens, uploads, render nodes, settings, audit, schedules (`ScheduleRepository`: system rows seeded without overwriting edits and never deleted, the compare-and-set claim of a run), tombstones of removed photos (`FrameRemovalRepository`, `frame_removals`, written from the sidecar's `removed` list); `DatabaseBackups` (`VACUUM INTO` copies of an SQLite index into `backups` next to it, every copy keeping as many as the backup schedules keep (`KeptAsync`), the newest copy that seeds the `index-backup` schedule (`Newest`, `SystemSchedule.LastDone`), restore staged for the next start and carried out before the index opens, so it also recovers one that no longer opens) | | `Jobs` | `JobEngine` (one job at a time; reviews the priority queue and makes a lower running job yield, requeued with its checkpoint; no history purge, the housekeeping schedule's clean-up does it), `JobPriorityQueue` (a level per job kind, the claim order, settings round trip), `IJobHandler`, `IJobHandlerProvider`, `JobContext` (progress, checkpoints, follow-up jobs that never interrupt their parent), `JobThroughput`/`JobEta` (rate and bounded time left) | | `Scheduling` | `Scheduler` (one per host: seeds the host's system schedules, claims due runs by compare-and-set, catch-up, clock changes, create/edit/reset/delete/run now as API v1 DTOs), `ScheduleRecurrence` (the in-house `every:`/`daily:`/`weekly:`/`monthly:` form, wall-clock times across DST), `ScheduleActions` (action names, parameters, availability, the archive jobs a run queues), `IScheduleHost` and `SystemSchedule` (what the server and the desktop supply), `ScheduleOutcome`, `ScheduleMapping` (model ↔ DTO) | | `Housekeeping` | `BackupJobHandler`, `CleanupJobHandler`, `ICleanupStep` with the shared steps (`CleanupSteps`: job history, audit log, trash report that never deletes); hosts add their own steps through `ArchiveServiceOptions.CleanupSteps` | -| `Archiving` | `ArchiveService` (create/adopt/open, archive settings written to `archive.json` then the index), `ArchiveIndexer` (scan, rebuild), `ArchiveIngest` (uploads and imports), `ImportService`, `ArchiveVerifier`, `ArchiveImages` (thumbnail and proxy passes, several photos at once through `OrderedWork`, which hands results back in frame order), `FrameTiers` (decode tier, `PreviewOnly`/`Undecodable` flags and preview size of frames, written to sidecar and index by the light analysis, deep analysis, renders and image passes), `GprCompanions` (the JPEG of each GoPro GPR, found in the index when an import kept it in another sequence), `ArchiveMaintenance`, `MassRenamer`, `SequenceTrash` (delete into the archive's hidden trash with a dry run, restore; the folder moves back when the index step fails), job handlers | +| `Archiving` | `ArchiveService` (create/adopt/open, archive settings written to `archive.json` then the index), `ArchiveIndexer` (scan, rebuild), `ArchiveIngest` (uploads and imports), `ImportService`, `ArchiveVerifier`, `ArchiveImages` (thumbnail and proxy passes, several photos at once through `OrderedWork`, which hands results back in frame order), `FrameTiers` (decode tier, `PreviewOnly`/`Undecodable` flags and preview size of frames, written to sidecar and index by the light analysis, deep analysis, renders and image passes), `GprCompanions` (the JPEG of each GoPro GPR, found in the index when an import kept it in another sequence), `ArchiveMaintenance`, `MassRenamer`, `SequenceTrash` (delete into the archive's hidden trash with a dry run, restore; the folder moves back when the index step fails; lists sequence and photo entries; `SequenceTrash.Empty`: the emptying's dry run, fingerprint and erase), `FrameTrash` (photos of a sequence into `trash/photos` with a dry run, a journal that undoes an interrupted deletion, tombstones, positions parked and placed back, proxies renamed to follow their frames; restore re-hashes each file, into a new sequence through the ingest when theirs is gone), job handlers | | `Processing` | `ProcessingService`, `SequenceAnalyser`, `DeepReports` (a saved deep report while it still describes the frames), `SequenceRender`, `ProjectStore`, `ProjectBundles` (a `.chronos` file for a sequence, and the sequence a file names), `RenderNodeClient`, job handlers | -| `Sync` | `SyncService` (sync table of one server: compare, link by content, settle conflicts, enqueue transfers), `SyncRules` (status, settings merge and differences, no I/O), `SyncPositions` (the settings' frame positions translated by photo to the frames of the copy they go to), `SyncLinkStore` (`sync_links`, `sync_state`), `SyncTransfers` and `SyncJobHandler` (resumable, hash-verified uploads and downloads as jobs; downloads commit through the archive ingest), `SyncAgent` (background comparison, server events, backoff, offline proxies), `ProxyCache` and `RemoteSequence` (server sequences opened with proxies), `ISyncRemote` (the server calls; `ChronosSyncRemote` over `ChronosClient`) | +| `Sync` | `SyncService` (sync table of one server: compare, link by content, settle conflicts, enqueue transfers), `SyncRules` (status, settings merge and differences, no I/O), `SyncTombstones` (photos either side removed are not offered back, a replaced photo counts as its replacement), `SyncPositions` (the settings' frame positions translated by photo to the frames of the copy they go to), `SyncLinkStore` (`sync_links`, `sync_state`), `SyncTransfers` and `SyncJobHandler` (resumable, hash-verified uploads and downloads as jobs; downloads commit through the archive ingest), `SyncAgent` (background comparison, server events, backoff, offline proxies), `ProxyCache` and `RemoteSequence` (server sequences opened with proxies), `ISyncRemote` (the server calls; `ChronosSyncRemote` over `ChronosClient`) | ### 2.3 Chronos.App areas @@ -71,7 +71,7 @@ Dependencies point one way: `Core` ← `Core.Windows`, `Data`, `Protocol` ← `S | `Library` | Filter, facets, pager, timeline, saved views, quick and mass actions, remote cards and thumbnails, thumbnail cache, list export | | `Editor` | `EditorSession` (project, undo/redo, saving, merges), `ISequenceSource` (`LocalSequenceSource`, `RemoteSequenceSource`), the steps of the Edit path (`EditPath`: their order, each step's state, the step of each finding, the memory of the step shown; tabs Analysis, Frames, Exposure, Motion, Camera, Time, Stack, Export), `PreviewRenderer`, `ExportPlanner`, `ExportSync`, `SavedCopies`, `SequenceJobs`, `ProjectFiles` (save and open `.chronos` project files) | | `Import` | `CardPool` (inserted cards, remembered cards, folders), camera profiles, plans and choices, destinations (archive, folder, server through `ServerImportSink`), card actions (verified delete, format, eject) | -| `Archive` | `CurrentArchive`, `ArchiveTree`, figures for the charts, maintenance reports, mass rename and move, delete and trash dialogs (`SequenceDeletion`, `DeletePlans`), `ArchiveFailures` | +| `Archive` | `CurrentArchive`, `ArchiveTree`, figures for the charts, maintenance reports, mass rename and move, delete and trash dialogs (`SequenceDeletion`, `DeletePlans`, `TrashEmptyPlans`: Empty… behind a dry run and a typed confirmation), `ArchiveFailures` | | `Server` | `ServerSession`, `ConnectFlow` (trust on first use), `SyncHost` (sync engine, agent, metered hold, editor connections, Export Sync), sync table, `RemoteSequenceApi` | | `Jobs`, `Settings`, `About` | Job list and buffering, `JobNotices` (which job endings raise a toast; `JobEndings` lets a batch speak once); the schedules of Jobs › Scheduled (`DesktopScheduleHost`: the desktop's `IScheduleHost` and its system schedules `archive-scan`, `index-backup`, `housekeeping`; `CacheTrimStep`, the host's clean-up step; `SchedulesViewModel`, `ScheduleRowViewModel`, `ScheduleEditorViewModel` and `ScheduleDialogs.xaml`, the in-window editor; `ScheduleText`); settings rows (`LogSettingsRows`: Advanced's log rows), encoder and format inventories, `ProcessingTuning` (Settings › Rendering and Analysis applied to each job: parallelism, memory budget, quality), `InterfacePriority`, language catalog, naming preview; `AboutViewModel` (owned by the shell, not a section: Settings › About, the update notice of Settings › Updates and the update check on start), update check and download | | `Infrastructure` | `AppServices` (composition root), `AppSettings`, `AppLogging` (Settings › Advanced › Logs applied to the log files from their first line, a launch that only hands over included, and at every save), `AppEnvironment` (installed or portable), `AppClock` (today's date, frozen by `--capture`), `StartWithWindows` (this copy's sign-in entry), `UiLanguage`, `LiveRegion`, `RenderNodeHost`, `DiagnosticsBundle`, `ShellActions` (BRIEF §8.6), `SingleInstance` (one Chronos per data folder; a later launch hands its file over a named pipe, or waits for a closing one to exit and starts in its place), device monitor | @@ -85,7 +85,7 @@ Dependencies point one way: `Core` ← `Core.Windows`, `Data`, `Protocol` ← `S | `Ui/Controls` | `ChronosWindow` (chrome, language direction), `NavRail`, `JobBar`, `ToastHost`, `Field` (placeholder, icon, error), `Chip`, `AutoSlider`, `StatusGlyph`, `EmptyState`, `Icon`, `Bidi` (right-to-left rules), `Motion` (animations off for screenshots) | | `Ui/Interop` | DWM calls of the window chrome; `TrayIcon` (`Shell_NotifyIconW`: the Uploader's tray, the client's Windows notifications) | | `Ui/Visuals` | `DrawingElement` (hover readout, item keyboard and activation) and its charts (`BarChart`, `SeriesChart`, `StackedBar`, `HeatmapStrip`, `TimelineBands`), `Filmstrip`, `PreviewViewport`, `CurveEditor`, `SequenceCard`, `VirtualizingWrapPanel`, `SegmentedControl`, `SplitButton` | -| `Server/Api`, `Server/Events` | Endpoint groups (`XxxEndpoints.Map`; `ScheduleEndpoints`: `/api/v1/schedules`), API errors, the WebSocket `EventHub` | +| `Server/Api`, `Server/Events` | Endpoint groups (`XxxEndpoints.Map`; `ScheduleEndpoints`: `/api/v1/schedules`; `LibraryEndpoints`: sequence thumbnail, photo delete, bulk delete/retag/jobs; `TrashEndpoints`: list, restore, empty), API errors, the WebSocket `EventHub` | | `Server/Security` | Accounts, password hashing, tokens, session cookies, login guard, access rules, audit log | | `Server/Storage`, `Server/Jobs` | Archive and processing modules, uploads (`UploadMaintenance`: recovery at start, and the sweep that is the `uploads` clean-up step), render store; `JobEngineHost`, `SchedulerHost` (the `Scheduler` on the engine, started after it; archive.json read every 10 minutes whatever the scan schedule does; every schedule change and run published as a `scheduleChanged` event) and `ServerScheduleHost` (time zone, archive refreshed from archive.json, system schedules), render node service, monitor and availability | | `Server/Hosting`, `Server/Admin/web` | `ServerHost`, `ServerLogging` (console and file levels the logging filters read at every line, the file sink's limits, the engine's level; applied again when Settings › Logs is saved), certificates, discovery beacon, embedded static files, Windows service (start and stop failures in the Application event log); the admin panel (ES modules, one per page; `schedules.js` is the Jobs page's Scheduled tab) | @@ -114,6 +114,7 @@ Dependencies point one way: `Core` ← `Core.Windows`, `Data`, `Protocol` ← `S | `Duplicates`, `Orphans` | `Archiving/Jobs/ReportJobHandlers` (read-only reports into the job log, queued by schedules); the Archive screen still queries `ArchiveService` directly | yes | yes | | `Backup` | `Housekeeping/BackupJobHandler` (via `ArchiveService.CreateJobHandlers`; an SQLite index file only) | yes | SQLite only | | `Cleanup` | `Housekeeping/CleanupJobHandler` (shared steps, plus the host's from `ArchiveServiceOptions.CleanupSteps`) | yes | yes | +| `EmptyTrash` | `Archiving/Jobs/EmptyTrashJobHandler` (erases exactly a confirmed plan's trash entries; refuses a stale fingerprint) | yes | yes | | `Adopt`, `Move` | none: done synchronously (`ArchiveService` actions) | — | — | A job engine claims only kinds it has handlers for. Light analysis is queued by the engine (`JobContext` follow-up) diff --git a/i18n/en/Admin.resx b/i18n/en/Admin.resx index 7b4e9654..4a9f8fd1 100644 --- a/i18n/en/Admin.resx +++ b/i18n/en/Admin.resx @@ -125,6 +125,7 @@ Clean-up Deep analysis Duplicates + Empty trash Import Light analysis Maintenance diff --git a/i18n/en/Archive.resx b/i18n/en/Archive.resx index 0ef01512..210a1619 100644 --- a/i18n/en/Archive.resx +++ b/i18n/en/Archive.resx @@ -89,6 +89,10 @@ {0} changed after the plan was made.long: error sentence The card or folder {0} is no longer available.long: error sentence The archive changed after this plan was made.long: error sentence + The trash changed after it was checked; nothing was erased.long: error sentence + {0:N0} trash entry was kept: it changed, or a replacement no longer matches.long: error sentence of an emptying job + {0:N0} trash entries were kept: they changed, or a replacement no longer matches.long: error sentence of an emptying job + No file of this trash entry matches its record any more; it stays in the trash.long: error sentence Chronos was denied access to the archive.long A file of the archive could not be read or written.long The sequence is no longer in the index.long @@ -152,7 +156,9 @@ Sequence not found: {0}long: job log line Clean-up step {0} failed: {1}long: job log line; {0} step name (job-history, audit…); {1} error message Clean-up step unknown here: {0}long: job log line; {0} step name + Entries erased: {0}, size: {1}long: job log line; {0} count; {1} size In the trash since {0}: {1} ({2})long: job log line; {0} date; {1} sequence title; {2} size + Kept in the trash: {0}long: job log line; {0} sequence title Trash not checked: the archive cannot be reachedlong: job log line Old trash entries: {0}, size: {1}; nothing was deletedlong: job log line; entries older than the clean-up's age limit Photos checked: {0}, intact: {1}, hashed: {2}, with problems: {3}long: job log line @@ -248,11 +254,24 @@ Rebuild index… Scan Verify + Checking the trash… Deleted {0}long The trash is emptylong + Empty… + Erase {0:N0} trash entry for good?long + Erase {0:N0} trash entries for good?long + {0} and {1} ({2}) are erased from the archive; this cannot be undone.long + {0:N0} entry + {0:N0} entries + Erase for good The sequence could not come back from the trashlong Trash · {0}long - Deleted sequences + {0:N0} file stayed in the trash: it no longer matches its record.long + {0:N0} files stayed in the trash: they no longer match their record.long + Photos + Replaced originals + Sequence + Trash entries Reading the trash… Restore {0:N0} sequence restoredlong diff --git a/i18n/en/Jobs.resx b/i18n/en/Jobs.resx index e6a89319..767a399a 100644 --- a/i18n/en/Jobs.resx +++ b/i18n/en/Jobs.resx @@ -72,6 +72,7 @@ Deep analysis Download Duplicates + Empty trash Import Light analysis Maintenance diff --git a/i18n/en/Server.resx b/i18n/en/Server.resx index cac724be..45467137 100644 --- a/i18n/en/Server.resx +++ b/i18n/en/Server.resx @@ -87,12 +87,15 @@ A system schedule cannot be deleted; turn it off instead.long You cannot do this to your own account.long A job is working on this sequence or its archive; try again when it is free.long + That sequence is in the library already.long The session expired; sign in again.long An environment variable sets this; change it there.long The sequence changed on the server; reload it and apply your edit again.long Its folder holds another sequence; scan the archive first.long The request is larger than the server accepts.long Too many uploads at once; retry shortly.long + The trash changed after it was checked; check it again before emptying it.long + No file of this trash entry matches its record any more; it stays in the trash.long Sign in to continue.long The server does not answer; check the address and the network.long Send the body as JSON.long @@ -101,6 +104,7 @@ That user name is taken.long Use at least {0} characters.long Connect with a WebSocket.long + Every photo of the sequence would go; delete the sequence instead.long The current password is wrong.long This upload belongs to a render job.long Servers found diff --git a/i18n/en/Tooltips.resx b/i18n/en/Tooltips.resx index a3c400c7..f2da9002 100644 --- a/i18n/en/Tooltips.resx +++ b/i18n/en/Tooltips.resx @@ -91,8 +91,12 @@ Tags to add, separated by commas Tags to remove, separated by commas Title template; the title token is the current title · checked as you type - The sequences deleted from this archive, each one restorable - Move this sequence back into its folder and the library, with its settings and renders + The sequences and photos deleted from this archive, each one restorable + Erase the entries of this trash for good, after a check of what they hold and a typed confirmation + What is erased from the archive for good + Erase {0:N0} entry for good; type the number above first + Erase {0:N0} entries for good; type the number above first + Move this entry back: a sequence into its folder and the library, photos into their sequence after a hash check Re-hash every original and report bit rot · reads the whole archive {0} · Right arrow opens the year, Left arrow closes it {0} · Left arrow opens the year, Right arrow closes it diff --git a/i18n/it/Admin.it.resx b/i18n/it/Admin.it.resx index e24adc01..6686fe74 100644 --- a/i18n/it/Admin.it.resx +++ b/i18n/it/Admin.it.resx @@ -125,6 +125,7 @@ Pulizia Analisi completa Duplicati + Svuota cestino Importazione Analisi rapida Manutenzione diff --git a/i18n/it/Archive.it.resx b/i18n/it/Archive.it.resx index c84b9981..9f6cdbf6 100644 --- a/i18n/it/Archive.it.resx +++ b/i18n/it/Archive.it.resx @@ -84,6 +84,10 @@ {0} è cambiato dopo la creazione del piano. La scheda o cartella {0} non è più disponibile. L'archivio è cambiato dopo la creazione del piano. + Il cestino è cambiato dopo il controllo; non è stato cancellato nulla. + {0:N0} elemento del cestino è stato mantenuto: è cambiato, o una sostituzione non corrisponde più. + {0:N0} elementi del cestino sono stati mantenuti: sono cambiati, o una sostituzione non corrisponde più. + Nessun file di questo elemento del cestino corrisponde più al suo registro; resta nel cestino. Chronos non ha accesso all'archivio. Non è stato possibile leggere o scrivere un file dell'archivio. La sequenza non è più nell'indice. @@ -147,7 +151,9 @@ Sequenza non trovata: {0} Passo di pulizia {0} non riuscito: {1} Passo di pulizia sconosciuto qui: {0} + Elementi cancellati: {0}, dimensione: {1} Nel cestino dal {0}: {1} ({2}) + Mantenuto nel cestino: {0} Cestino non controllato: l'archivio non è raggiungibile Voci vecchie nel cestino: {0}, dimensione: {1}; nulla è stato eliminato Foto controllate: {0}, integre: {1}, con impronta nuova: {2}, con problemi: {3} @@ -241,11 +247,24 @@ Ricostruisci indice… Scansiona Verifica + Controllo del cestino… Eliminata il {0} Il cestino è vuoto + Svuota… + Cancellare per sempre {0:N0} elemento del cestino? + Cancellare per sempre {0:N0} elementi del cestino? + {0} e {1} ({2}) vengono cancellati dall'archivio; non si può annullare. + {0:N0} elemento + {0:N0} elementi + Cancella per sempre Impossibile ripristinare la sequenza dal cestino Cestino · {0} - Sequenze eliminate + {0:N0} file è rimasto nel cestino: non corrisponde più al suo registro. + {0:N0} file sono rimasti nel cestino: non corrispondono più al loro registro. + Foto + Originali sostituiti + Sequenza + Elementi del cestino Lettura del cestino… Ripristina {0:N0} sequenza ripristinata diff --git a/i18n/it/Jobs.it.resx b/i18n/it/Jobs.it.resx index 303205a8..7021dc93 100644 --- a/i18n/it/Jobs.it.resx +++ b/i18n/it/Jobs.it.resx @@ -72,6 +72,7 @@ Analisi approfondita Scaricamento Duplicati + Svuota cestino Importazione Analisi rapida Manutenzione diff --git a/i18n/it/Server.it.resx b/i18n/it/Server.it.resx index febc22da..b0c716cd 100644 --- a/i18n/it/Server.it.resx +++ b/i18n/it/Server.it.resx @@ -85,12 +85,15 @@ Una pianificazione di sistema non si può eliminare; disattivala.long Non puoi farlo sul tuo account. Un'attività sta lavorando su questa sequenza o sul suo archivio; riprova quando è libera. + Quella sequenza è già nella libreria. La sessione è scaduta; accedi di nuovo. È impostato da una variabile d'ambiente; modificala lì. La sequenza è cambiata sul server; ricaricala e riapplica la modifica. La sua cartella contiene un'altra sequenza; prima esegui una scansione dell'archivio. La richiesta supera la dimensione accettata dal server. Troppi caricamenti insieme; riprova tra poco. + Il cestino è cambiato dopo il controllo; ricontrollalo prima di svuotarlo. + Nessun file di questo elemento del cestino corrisponde più al suo registro; resta nel cestino. Accedi per continuare. Il server non risponde; controlla l'indirizzo e la rete. Invia il corpo come JSON. @@ -99,6 +102,7 @@ Questo nome utente è già in uso. Usa almeno {0} caratteri. Connettiti con un WebSocket. + Se ne andrebbero tutte le foto della sequenza; elimina invece la sequenza. La password attuale è errata. Questo caricamento appartiene a un job di rendering. Server trovati diff --git a/i18n/it/Tooltips.it.resx b/i18n/it/Tooltips.it.resx index 862a524d..5719b7a7 100644 --- a/i18n/it/Tooltips.it.resx +++ b/i18n/it/Tooltips.it.resx @@ -91,8 +91,12 @@ Tag da aggiungere, separati da virgole Tag da rimuovere, separati da virgole Modello del titolo; il segnaposto title è il titolo attuale · controllato mentre scrivi - Le sequenze eliminate da questo archivio, ognuna ripristinabile - Riporta questa sequenza nella sua cartella e nella libreria, con impostazioni e render + Le sequenze e le foto eliminate da questo archivio, ognuna ripristinabile + Cancella per sempre gli elementi di questo cestino, dopo un controllo di cosa contengono e una conferma digitata + Cosa viene cancellato per sempre dall'archivio + Cancella per sempre {0:N0} elemento; prima digita il numero qui sopra + Cancella per sempre {0:N0} elementi; prima digita il numero qui sopra + Riporta indietro questo elemento: una sequenza nella sua cartella e nella libreria, le foto nella loro sequenza dopo un controllo dell'hash Ricalcola l'hash di ogni originale e segnala i danni · legge tutto l'archivio {0} · Freccia destra apre l'anno, freccia sinistra lo chiude {0} · Freccia sinistra apre l'anno, freccia destra lo chiude diff --git a/src/Chronos.App/Archive/ArchiveDialogs.xaml b/src/Chronos.App/Archive/ArchiveDialogs.xaml index 4ba34d7f..cb5a3d92 100644 --- a/src/Chronos.App/Archive/ArchiveDialogs.xaml +++ b/src/Chronos.App/Archive/ArchiveDialogs.xaml @@ -242,6 +242,9 @@