950524929c8dcf8cdf143cda2bea3e99779eb2dc
14
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ad72501f11 |
feat(app): Reorganize existing sequences from the Archive manager, the Library and Settings
Owner review 2, R7 asks to rename and move sequences after import on the desktop too.
The desktop now uses the engine's Reorganize, the same plan and job as the web panel.
- One Reorganize… dialog replaces Rename… and Move… in the Archive manager and Move… in
the Library. It has three templates: folders, file names and titles. Each one has a
switch and is checked as it is typed. Folders and file names start on, filled from the
archive's settings; titles start off as {title}. Renaming only titles is the Titles
switch alone.
- The dry run stays in the dialog and follows the typing. Each sequence shows its folder,
title and first file names before and after. Sequences carried along with a folder are
marked, and photos that keep their names are listed with the reason. A summary counts
the sequences that change, the files renamed and the names kept.
- Apply no longer changes the archive from the dialog. It queues the engine's move job
with exactly the plan shown (its fingerprint), so the work can be paused, resumed after
a restart and followed in Jobs. The job refuses the plan if the archive changed after
the dry run.
- The Library's Reorganize… works on the selected sequences of one archive. The Archive
screen reads the archive again when a move job ends.
- After Settings › Archive saves a new folder or file template to an archive that holds
sequences, a toast offers Reorganize… for every sequence. Its templates are the ones
changed since; a second change made while the toast is up adds to that toast instead of
opening another.
- Strings in en and it. The keys of the old Rename and Move were removed and pruned from
every translation, so the 36 other languages show the new keys as untranslated instead
of keeping "Move".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 7bbf451f737a71b768dcd70a77b998daaef851f3)
|
||
|
|
4518ffe655 |
fix(archive): settle trash journals under their leases and say why restored photos stayed
Second fix round of owner review 2, phase 3 (engine, server, desktop). - A photo never hashed whose original is missing can be deleted again: it goes into its trash record without a file and without a tombstone (nothing is left to name), stays listed until Empty erases it, and a restore keeps it with the reason "no file". FrameDeleteBlock.Unhashable now blocks only a present original that cannot be read; the API answers it as 409 photo_unreadable naming the photo, and every block has its own code and message. - Deleting a whole sequence first settles an interrupted photo deletion, restore or ingest of it (ReadLocked under its lease), so no journal or half entry travels into the sequence's trash entry; it refuses while a restore into it waits for its busy entry. - FrameTrash.Settle takes the photo entry's lease and leaves the journal for later while the entry is busy (an emptying), so it never races EraseAsync; meanwhile no other restore writes its journal over it and scans do not adopt its files. - The hashes computed for frames that stay (to find a twin of a deleted photo) go into the sidecar and index, and only a frame whose first and last 64 KiB match a deleted photo's is read whole. - A restore into a new sequence rewrites its record after each photo filed, so a crash or a database failure never leaves filed photos listed. - An upload completion no longer has a window before the commit: the ingest checks the sidecar's tombstones under the sequence lease a deletion takes (IngestRequest.RefuseRemoved), unless the upload asked to bring it back. - A restore reports each kept photo with its reason (no longer matches its record, could not be moved back, already in the sequence, had no file); the desktop line and the API message say so in en and it, and the tooltip holds the whole sentence. The desktop tells TrashMismatchException by its type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 1858f1f450a35fb8383ede8d80ce5f8de9b7ceac) |
||
|
|
a133306fb0 |
fix(app): show what a trash restore kept, and drop stale trash translations
The desktop trash dialog sent the "N files stayed in the trash" sentence through ShowError. ArchiveFailures.Cause has no arm for it, so after a partial restore the red line and Narrator said "A file of the archive could not be read or written." The sentence itself appeared only in the tooltip. The same thing happened to an entry none of whose files matches its record. - ArchiveDialogViewModel.ShowMessage shows a sentence that is already localized. The trash dialog uses it for kept files, and its tooltip names the files kept (six of them, then "+ N more"). - ArchiveFailures.Cause passes FrameTrash's Archive.Error.TrashMismatch sentence through. It matches the sentence's text because the engine throws a plain InvalidDataException. Any other InvalidDataException, such as a sidecar that belongs to another sequence, still reads as a file error. - Archive.Trash.List, Tooltips.Archive.Trash and Tooltips.Archive.TrashRestore changed meaning in English: they now cover photo entries as well as sequences. They are removed from the 36 cultures other than en and it, so those cultures fall back to English and `i18n check` lists the keys as untranslated instead of showing the old sequence-only wording. - The XAML comments describe what the trash dialog and its error line show now. Tests: the dialog restores a photo entry and a sequence entry and checks which rows are left. A photo entry with one tampered file shows the KeptFiles sentence and keeps its row. An entry with every file tampered shows the TrashMismatch sentence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 2524a11445c87d37625b01095ef7c2a84a2ee422) |
||
|
|
51782a3ada |
feat(archive): photo delete, tombstones, trash kinds and emptying, library API
Owner review 2, R6: the web panel manages the library without editing it, so the engine and the server must delete single photos safely, keep them out of sync afterwards, and let an administrator restore or finally erase the trash. - Migration 0008: frame_removals (tombstones by sequence and SHA-256, reason, replacement); the sidecar gains "removed" (omitted when empty) and frames a reserved "source"; the indexer writes the tombstones on every sync, so a rebuild keeps them, and drops a hero frame that is gone. - FrameTrash: dry run (busy, frames changed, offline, would empty), delete under the sequence lease with a write-ahead journal that the next writer undoes after a crash, files to trash/photos/<seq>-<time>/originals with a record, sidecar without the frames plus tombstones, index sync clearing analyses, thumbnails and proxies, proxies renamed to follow their frames, follow-up jobs. Restore re-hashes every file, keeps mismatches in the trash, puts the same frame records back and drops their tombstones, or files the photos into a new sequence through the ingest when theirs is gone. - Project positions on vanished photos are translated by photo and wait as pending frames, so they come back with a restore. - Trash entries have a kind (sequence, photos, replaced); emptying is a dry run with a fingerprint and a new EmptyTrash job (18) that erases exactly the planned entries, refuses a stale plan and erases replaced originals only while their replacements still hash right. - Sync honours tombstones: nothing one side deleted is offered back, local files are never deleted, replaced photos count as their replacement; the server answers an upload of a tombstoned SHA-256 as already there. - Server: sequence thumbnail, photo delete, bulk delete/retag/jobs, trash list/restore/empty endpoints with their error messages; a verify of sequences now targets their archive (POST /jobs failed before). - Desktop trash dialog lists photo entries and empties the trash after a typed confirmation through the same job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 35bb56690a1d69eae57153d036e1409201cd73f7) |
||
|
|
5cb6809fd0 |
fix(app): keep Jobs › Scheduled true to the scheduler
Owner review 2, phase 2 (R10) review findings on the desktop: - Showing the Scheduled tab (and coming back to Jobs on it) reads the actions' availability again, as does a Run now answered unavailable; rows and an open editor follow, so turning proxies on no longer needs a restart. - A delete the index refuses keeps the row: the failed call no longer reads as Deleted (the enum's default), so a live schedule never leaves the page. - SchedulerReady completes false when the index (or the engine) does not open, so the tab shows that the schedules do not run instead of an empty panel. - A read of a schedule's last job that started before a live change or a later read is ignored, so a finished job no longer shows as running. - The editor's Action, Unit and Priority dropdowns follow a language change, keeping what was chosen. - Weekly days in the table read from the UI language's first day, as the editor's toggles do. - Backup tooltips no longer promise daily copies with three kept (their translations are dropped for retranslation); two tooltips now name the real Settings rows (Proxy size; Spazio su disco › Limite della cache). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit c137e2c74cddef299b2e4179ef0417fa4977953c) |
||
|
|
e384564784 |
fix: logging never fails a job, one backup retention, first copy after the upgrade
Owner review 2, phase 2 review findings (scheduler core). - Log.Write caught only IOException. Microsoft.Extensions.Logging wraps provider failures in an AggregateException, so a log line that could not be written (in tests: the process-wide sink of a stopped server whose log folder was gone) escaped JobEngine.RunAsync's catch before the failure was stored: the job stayed running and the worker faulted. This was the cause of the intermittent JobApiTests/ArchiveModuleTests failures. Log.Write now drops any non-fatal sink failure, TeeLogSink keeps a line from the other sinks, FileLogSink drops a line it cannot write and reopens the file at the next one, and LoggerSink drops what the providers throw. The scheduler's loop relies on the same guarantee. - The daily backup loop (RunDailyAsync, IsDue, Interval, CheckInterval) had no caller since the index-backup schedule replaced it; it is removed and the DatabaseBackups summary describes the schedule. - The first copy after the upgrade no longer waits a day (or for 03:00): SystemSchedule.LastDone seeds a new row due at once when its work was last done a period or more before, and both hosts pass the newest copy in the backups folder for index-backup. - Back up now (Settings and Archive), the copy kept before a restore and a backup job that keeps fewer prune to the largest Copies kept of the backup schedules (DatabaseBackups.KeptAsync), not a fixed three. The four tooltips that promised three daily copies are reworded (en, it) and their stale translations deleted. - New tests for the scheduler loop itself: a tick, Wake, a pass that threw, and dispose during a pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit c5ad0c4c3f636129afe5dd1ce039185516da5621) |
||
|
|
ac121acf7c |
fix(logs): apply log settings from the first line and name the locking variable
The desktop opened its log files with the default limits and wrote its first line, which prunes, before Settings › Advanced › Logs were applied. Every start, and every launch that only hands its file to the running Chronos, deleted logs older than 14 days and cut the folder to 1 GB whatever the user kept. AppLogging.Open now builds the sink from the stored settings before that line; the settings are read again once the launch owns the data folder. A total below one file deleted each finished file as the next one opened. The rule now lives in LogFileOptions.TotalBelowFile: the server keeps refusing it, the desktop raises the total to the file size and its rows no longer offer the combination. The desktop log rows threw on negative sizes from an imported or hand-edited file and showed raw values the files never got; they now show the applied ones. Upgraded Unraid and compose installs keep CHRONOS_LOG_LEVEL=Information, which locks both levels. The lock stays; the server now reports which variable fixes each locked setting (LockedBy), so the panel's tooltip names it exactly and says to remove it to change the value there. The releases README tells upgraders. The former-constructor log test no longer fails across midnight UTC. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 8ba7162bd5926d34c5ec4e40e2a2dad063ee19c3) |
||
|
|
8d66be709c |
fix: one audit retention, scans at start, live deep analysis and a 6-hour upload sweep
Settle what the R10 scheduler and R11 log packages left open when they were integrated (owner review 2, phase 2). - Audit retention has one source of truth, the audit-cleanup schedule's age limit. AuditRetentionDays defaults to 0 (the audit log is kept forever, so an upgrade deletes nothing; the schedule is seeded off) and accepts 0-3650, what a schedule's age limit takes. Saving Settings › Logs › Keep audit sets the schedule's limit (on with a limit, off at 0) without a restart; CHRONOS_AUDIT_RETENTION_DAYS locks it and Reset goes back to it. - Both hosts scan right after start again, as their polling did: the server after the scheduler starts, the desktop once the archive was reopened and again when an unplugged one is back. Scheduler.RunSystemNowAsync runs the archive-scan schedule when it is enabled and has not run since the start, and skips while its scan is pending. - Desktop scans follow Settings › Analysis › After a scan at every run: a scan schedule without its own deep parameter asks the host (IScheduleHost.DeepAnalysisAfterScan), the archive-scan schedule no longer freezes the setting, and the editor offers deep only for analyses, so the setting's tooltip stays true. - The server's upload clean-up runs every 6 hours instead of every 30 minutes, to keep the job history readable; idle uploads still expire after UploadRetentionHours. - The Unraid template and docker-compose leave CHRONOS_LOG_LEVEL empty or commented out, and say that setting it locks both log levels, so the admin panel can change them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
bc786c12c4 |
feat(app): Jobs › Scheduled and the desktop scheduler
Owner review 2, R10 on the desktop: every timer that queued work out of sight is now a visible, editable schedule of this PC. - DesktopScheduleHost implements IScheduleHost: the PC's time zone, the archive at Settings › Archive's folder (refreshed from archive.json, none while it is offline), and three system schedules: archive-scan (every:<ScanIntervalMinutes>m, seeded once from the old setting, no catch-up), index-backup (every day with catch-up, replacing DatabaseBackups.RunDailyAsync) and housekeeping (daily 04:00 with catch-up: job history 90 days and the new cache-trim step). - AppServices starts the Scheduler after the engine, once the archive was reopened; an unplugged archive is looked for every minute and the scheduler woken when it is back. The rescan loop and the daily backup loop are gone; ApplyJobSettings wakes the scheduler. - CacheStore.Trim brings the cache to Settings › Storage › Cache limit, oldest files first, skipping files in use and the proxies, render-node and server-import folders; CacheTrimStep runs it as a clean-up step. - Jobs gets a Queue | Scheduled segmented control. Scheduled lists the schedules (switch, name, action, when, next run, last result) with Run now, Edit, Reset (system) or Delete (user's, confirmed), the selected schedule's last runs with Show in queue, and an in-window editor that checks every field with the scheduler's limits. Jobs a schedule queued carry a "Scheduled" pill; the history line follows the housekeeping's job-history days. - JobNotices: a scheduled background run raises a toast only when it fails (upkeep stays silent). - Settings › Archive › Rescan every is removed; ScanIntervalMinutes stays only as the seed. Strings in en and it; the others are retranslated. - The capture shows jobs-scheduled and jobs-schedule-editor on a stopped scheduler clock with sample schedules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit e25d812feb3f417cb9251c748c29e8035fd9b03c) |
||
|
|
e5508e7e69 |
feat(data): scheduler engine, schedules table and housekeeping jobs
Owner review 2, R10: every timer that queues work becomes a visible schedule, so the server and the desktop need one shared engine to run them. - Migration 0007: schedules table (system rows keyed by system_key) and jobs.schedule_id; Job.ScheduleId, JobDto.ScheduleId, JobRepository HasPendingAsync / ListPendingTargetsAsync / ListByScheduleAsync. - ScheduleRepository: seeding that keeps user edits, reset, compare-and-set claim of a run (one winner across processes), outcomes. - Scheduling: in-house recurrence (every/daily/weekly/monthly, DST gap moves forward, ambiguous time runs once), ScheduleActions resolving scan, verify, thumbnails, proxies, analysis, maintenance, backup, cleanup, duplicates and orphans into archive jobs, IScheduleHost, and the Scheduler loop (catch-up, clock going back, run now, CRUD as API v1 DTOs). - New job kinds Backup (16) and Cleanup (17) with handlers, shared clean-up steps (job history, audit log, trash report that never deletes) and host steps through ArchiveServiceOptions; read-only Duplicates and Orphans report handlers, so the server can run those kinds too. - JobEngine no longer purges history at start: the housekeeping schedule's job-history step does; JobEngine.CanRun and an EnqueueAsync with scheduleId. - Protocol DTOs for schedules; job kind names in en and it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit eb0edd2483a493db7c6945d5b494461cabb2a4ad) |
||
|
|
0e84392f4f |
feat(logs): log level, retention, size limits and rotation on server and desktop
Owner review 2, R11 asked for more log settings. The file sink now writes daily or hourly files, continues a full file in numbered parts and prunes by age and by the total size (never the file being written); its options change while it runs. Server: the file and console levels are separate and read by the logging filters at every line, so the admin panel's new Logs group applies without a restart; the engine's level follows the lower of the two. This also fixes a bug: the file logger was fixed at Information, so CHRONOS_LOG_LEVEL=Debug or Trace never reached the files. New variables CHRONOS_LOG_CONSOLE_LEVEL, CHRONOS_LOG_RETENTION_DAYS, CHRONOS_LOG_MAX_FILE_MB, CHRONOS_LOG_MAX_TOTAL_MB, CHRONOS_LOG_ROTATION, CHRONOS_AUDIT_RETENTION_DAYS and CHRONOS_DIAGNOSTICS_LOG_MB lock their settings like the others; the diagnostics zip keeps the configured share of each log. Desktop: Settings > Advanced gains Log level, Keep logs, File size, Logs total, Rotation and Diagnostics logs, applied at every save; Advanced's Reset section restores them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit cc875784e4952ee0e4c807b9d9c18496d3d5a8c3) |
||
|
|
1f089888e8 |
feat: owner review 2 phase 1: :latest, Unraid array space, Settings with About, whole-folder import (#9)
CI / Build and test (push) Successful in 5m11s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 6s
Release / Build, test and publish (push) Successful in 8m57s
CI / PostgreSQL 16 integration (push) Successful in 3m10s
CI / PostgreSQL 17 integration (push) Successful in 3m30s
CI / Docker image (push) Successful in 49s
Release / Server image (push) Successful in 1m4s
- :latest follows the highest stable release, or the highest pre-release while none is stable (Chronos.Tools release-channels); bad tags are refused before anything is built. - Unraid: CHRONOS_SPACE_PATH and the template's Array view show the array's free space; the write volume (cache) is shown apart; completions check the archive volume (507). - Settings is a gear, docked at the foot of the admin sidebar; About is the last part of Settings on the desktop and the panel. - Import > Folder > Whole folder: one sequence per format (desktop only). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com> |
||
|
|
f80fc148bf |
fix(app): build update links from the releases repository address (#7)
CI / Build and test (push) Canceled after 2m45s
CI / PostgreSQL 16 integration (push) Canceled after 0s
CI / PostgreSQL 17 integration (push) Canceled after 0s
CI / Docker image (push) Canceled after 0s
CI / YAML check (push) Canceled after 0s
CI / Windows tests and installer (push) Canceled after 0s
Gitea writes a release's html_url and browser_download_url with its ROOT_URL, which on the owner's server is the plain-http LAN address http://192.168.30.23:3000. The update check accepts only https links, so it ignored v0.1.0-rc.1 entirely. The page and download links now come from ChronosReleasesUrl, the address the build names for its users; only the tags, file names and sizes are read from Gitea's answer. The lease renewal test's timer periods follow TestTiming too: on the shared CI host a 100 ms renewal timer came 700 ms late once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com> |
||
|
|
f2b58522b9 |
refactor!: rename Titano to Chronos and move CI and releases to Gitea (#6)
CI / Build and test (push) Successful in 8m14s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 7s
Release / Build, test and publish (push) Successful in 13m19s
CI / PostgreSQL 16 integration (push) Successful in 4m49s
CI / PostgreSQL 17 integration (push) Successful in 5m28s
CI / Docker image (push) Successful in 53s
Release / Server image (push) Failing after 10s
The owner renamed the product and moved the repository to the self-hosted Gitea (https://gitea.encke-hake.ts.net/BalboSoft/Chronos) for more control, and asked for Actions and a first automatic release with the server package and the Windows exe (docs/requests/2026-10-23-chronos-gitea.md). - Chronos everywhere: a byte-exact rename of contents and paths, then a per-language review of the forms the old name's ending had dictated. - Gitea instead of GitHub: the update check, licence, issue and support links read ChronosReleasesUrl; the update check takes the highest stable version, offers a pre-release build its final release and reports a repository it cannot see as a failed check. EULA, security policy and Gitea issue forms live at the repository root. - Gitea Actions for the Linux act_runner (.gitea/workflows): CI, release, nightly image and performance gates in the .NET SDK container with git checkout and the system SQLite. The release cross-compiles the Windows programs, checks their icon, version and DPI manifest, packs installers and zips, publishes the Gitea release and pushes the server image (REGISTRY_TOKEN). Windows-only tests run in an opt-in job on a Windows runner (WINDOWS_RUNNER). - New Chronos.Tools commands: zip, gitea-release, postgres-ci (replaces the docker-exec script, which Gitea's service containers do not allow; the throw-away server runs without durability) and pe-check. - Timed tests take their budget from TestTiming (CHRONOS_TEST_TIME_FACTOR, 3 on the shared runner; the weekly performance gates keep theirs). BREAKING CHANGE: programs, settings, data folders, file types, environment variables and the Docker image use the new name; nothing is migrated from Titano, which never had a release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com> |