GET /api/v1/archive/settings refreshes the served archive from
archive.json first, so the admin form (which saves every field) starts
from a desktop's change made since the last poll instead of writing the
old templates back. ServerArchive.RefreshAsync replaces the served
archive only when the refresh registered a change, and only through a
compare-and-swap against the archive it read, so a poll racing an
admin's PUT no longer puts the pre-edit row back for ten minutes.
RefreshSettingsAsync now ignores an archive.json a newer Titano wrote,
as documented, instead of registering what this version reads of it.
AppServicesTests now points the folder at an archive the index does not
list first, and checks that the archive no longer chosen gets no scan.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
- The desktop's rescans run for the whole session and each one targets the archive at Settings › Archive's folder
(as the Import and Archive screens do), so an archive created on the first run, chosen in Settings, relinked or
imported with settings is rescanned from the next tick on, and Rescan every always reaches a live timer. The
folder of the start is reopened (relink, interrupted renames) as soon as its archive.json is there, so an
unplugged drive or a folder without an archive no longer stops polling for the session.
- ArchiveService.RefreshSettingsAsync reads archive.json and registers the archive again when its name, templates
or proxy size changed elsewhere (a server's admin panel, another PC); null when the file cannot be read, is newer
or belongs to another archive. Desktop rescans and the server's polling call it first, so imports, uploads and
the admin panel follow the shared settings without a restart.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
A sequence created through POST /api/v1/sequences keeps an empty folder until its
first frame. Scans no longer adopt loose photos at the archive root under its id,
and a rebuild, the orphans report and fix, verify and the scan follow-ups no longer
treat it as the root sequence, as missing or as a sequence to analyse. All of them
use ArchiveIngest.AwaitsFolder.
On the server (ArchiveServiceOptions.ImagesAfterScan), a scan that indexes sequences
without thumbnails or proxies queues background Thumbs and Proxies passes for them,
as an upload does. A scan that finds photos added or removed clears ThumbsBuilt and
ProxiesBuilt together with AnalyzedLight.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
A re-upload that repairs a missing or damaged frame is now reported as
IngestResult.Repaired and adds nothing to the uploader's used bytes; the
quota checks at start and completion skip uploads whose target sequence
already holds the content. The start shortcut and crash recovery share
one rule (UploadRules.StandIn): an intact copy stands for the upload, the
target sequence's own copy first, except when the target holds the
content only in damaged copies, which the upload's bytes then repair.
A sequence adopted at the archive root that holds frames is never given
a new folder when its root sidecar is missing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
Settings (UI-01, UI-02, UI-03, UI-09, RF-4):
- New Import, Analysis and Formats pages, in the order of Settings.html. Import holds
the defaults of new cards (session rules, subfolders, verification, duplicates,
after-import actions); Analysis the deep-analysis width cap, night and star-field
thresholds and deep analysis after import or scan; Formats the decode tier of every
format on this PC with a notice and Store install link per missing codec extension.
- Archive gains thumbnail size and rescan interval; its templates, proxy size and
thumbnail size are the open archive's own (archive.json) and new archives' defaults.
- Rendering quality, parallelism and background priority now drive the jobs: quality
maps to preparation size, read-ahead and default flow quality; parallelism sets the
engine's workers live and caps per-job threads; background priority raises the UI
thread while Titano is in front.
- Advanced gains Restore (daily backups, dry-run summary, destructive confirmation,
staged for the next start) and Reset all.
- The naming preview's sample title is a catalog string.
Engine (ENG-03, ENG-04, ENG-06):
- ArchiveService.GetSettingsAsync/UpdateSettingsAsync rewrite archive.json atomically
under a lease, then the index row; the server endpoint and the desktop use them, and
the desktop creates archives with Settings › Archive. ThumbnailPolicy in archive.json
sizes the thumbnails.
- DatabaseBackups: daily VACUUM INTO copies kept x3 on the desktop and on a server on
SQLite (DatabaseBackupService), staged restore checked and preceded by a fresh copy.
- Maintenance vacuums the SQLite index when 10 % or more is free (dry run reports it).
- JobEngine.SetWorkers; ProcessingOptions.Tune applies host tuning per job.
Archive setup toasts say why in a localized sentence (RF-1).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
The server indexed only what arrived through its own uploads, so photos
already in an adopted folder and sequences another writer added stayed
unknown until an administrator asked for a rescan. ArchivePolling, registered
by the archive module, queues an incremental scan of the online archive at
start and every ten minutes at background priority, unless a scan or rebuild
of it is waiting, running or paused (ENG-13).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
A sequence created with POST /api/v1/sequences had no folder, and the ingest
looked for its sidecar at the archive root: every upload into it failed with
503 commit_failed, so the Uploader's "New sequence" target never worked. Its
first frame now claims a folder by the rules of a sequence created by an
upload (folder template with its title, unique variant, sidecar with the
row's id, title, tags, rating, notes and project), and the row takes the
folder in one transaction (DOCKER-1).
A frame flagged missing or corrupt, or whose file is gone or has another
size, no longer stands for an upload: the start short-circuit and crash
recovery match only intact frames still on disk, and the ingest repairs such
a frame with the verified copy (same id and position, flags cleared, a damaged
file kept beside it as name.damaged-<time>) instead of calling it a
duplicate. The Uploader deletes a source only after the server received and
verified its bytes in that upload, never on "already on the server" (SRV-1).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
ArchiveModule registers the archive engine as the server's ingest, its
proxy/thumbnail locator and its job handlers (through the new
IJobHandlerProvider); Program.cs passes it to ServerHost.Build. The
server opens its archive through ArchiveService so archive.json always
exists. The server's path-safety helper is renamed ArchivePathGuard to
stop clashing with the archive layout's ArchivePaths, and the server
migration is renumbered 0003. An end-to-end test uploads a photo, finds
it in the layout and fetches the thumbnail built by the queued job.
CI's PostgreSQL jobs now run the server tests too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC