fix(settings): restore before the index opens; archive rows edit only their archive; parallelism follows the brief

Index restore (ENG-06, UI-09):
- A staged restore now runs on the files before the index is opened, so it also
  recovers an index that no longer opens; Settings > Advanced > Restore works
  without an open index (the current one is shown as unreadable).
- The staged copy passes PRAGMA quick_check (before migration, in a scratch copy)
  ahead of any backup: a damaged copy is set aside as .failed and never renews the
  daily copies. The index it replaces is kept as a VACUUM INTO copy, or, when it
  cannot be read, copied whole with its WAL as titano-replaced-<stamp>.db outside the
  rotation. The staged file is renamed over the index, so it is never applied twice.
- Archive > Maintenance gains Restore database..., which opens Settings > Advanced.

Archive settings (UI-03, ENG-03):
- An archive.json with an empty or overlong name (drive roots) can be edited again:
  the name read is made usable as at creation.
- Proxy and thumbnail sizes outside the presets (an admin's 3840) are listed and
  shown with their number.
- Changing the archive folder retargets the rows: an archive there is registered
  and rescanned; with none, the rows edit only the defaults of new archives. The
  rows never fall back to another archive of the index.
- Reset all and Import settings no longer rewrite the shared archive.json; Archive >
  Reset section asks first, naming the archive.
- PUT /api/v1/archive/settings: 409 archive_busy on a lease conflict, 409
  archive_manifest for a damaged, newer or foreign archive.json (was 500).

Parallelism (UI-02):
- Auto is the job engine's default, half the logical cores (BRIEF 14.6), with each
  job's own decode and analysis threads; a value the user sets is the number of
  workers and caps those threads. The memory budget is shared: each job's frame
  window gets budget / workers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-12 11:06:27 +00:00
1 parent 3e146c9f9f
commit 56aa4da674
63 files changed
+484 -179

No files matched your search

+1
View File
@@ -140,6 +140,7 @@
<data name="Archive.Maintenance.DryRun" xml:space="preserve"><value>Dry run</value></data>
<data name="Archive.Maintenance.Proxies" xml:space="preserve"><value>Rebuild proxies</value></data>
<data name="Archive.Maintenance.Relink" xml:space="preserve"><value>Relink moved archive…</value></data>
<data name="Archive.Maintenance.Restore" xml:space="preserve"><value>Restore database…</value></data>
<data name="Archive.Maintenance.Run" xml:space="preserve"><value>Run maintenance</value></data>
<data name="Archive.Maintenance.Trash" xml:space="preserve"><value>Trash…</value></data>
<data name="Archive.Orphans.Count.one" xml:space="preserve"><value>{0:N0} issue</value></data>
+2
View File
@@ -26,6 +26,8 @@
<data name="Server.Disconnect" xml:space="preserve"><value>Disconnect</value></data>
<data name="Server.Empty" xml:space="preserve"><value>Not connected to a server</value></data>
<data name="Server.Error.AccountLocked" xml:space="preserve"><value>Too many failed sign-ins; the account is locked for a while.</value><comment>long</comment></data>
<data name="Server.Error.ArchiveBusy" xml:space="preserve"><value>Another program is changing the archive's settings; try again shortly.</value><comment>long</comment></data>
<data name="Server.Error.ArchiveManifest" xml:space="preserve"><value>The archive's archive.json is damaged, from a newer Titano or of another archive; check the archive folder.</value><comment>long</comment></data>
<data name="Server.Error.ArchiveOffline" xml:space="preserve"><value>The archive is offline or read-only; try again when it is back.</value><comment>long</comment></data>
<data name="Server.Error.ArchiveRoot" xml:space="preserve"><value>Its photos are the archive's root folder, which never moves to the trash.</value><comment>long</comment></data>
<data name="Server.Error.BadCredentials" xml:space="preserve"><value>Wrong user name or password.</value><comment>long</comment></data>
+4
View File
@@ -35,6 +35,7 @@
<data name="Settings.Advanced.RestorePending" xml:space="preserve"><value>Waiting for restart</value></data>
<data name="Settings.Advanced.RestoreStaged" xml:space="preserve"><value>Restore ready</value></data>
<data name="Settings.Advanced.RestoreTitle" xml:space="preserve"><value>Restore the index of {0}?</value><comment>long</comment></data>
<data name="Settings.Advanced.RestoreUnreadable" xml:space="preserve"><value>Now: unreadable</value></data>
<data name="Settings.Advanced.Restored" xml:space="preserve"><value>Index restored from a backup</value><comment>long</comment></data>
<data name="Settings.Analysis.AfterImport" xml:space="preserve"><value>After import</value></data>
<data name="Settings.Analysis.AfterScan" xml:space="preserve"><value>After a scan</value></data>
@@ -55,6 +56,9 @@
<data name="Settings.Archive.Polling" xml:space="preserve"><value>Rescan every</value></data>
<data name="Settings.Archive.Preview" xml:space="preserve"><value>Preview</value></data>
<data name="Settings.Archive.Proxies" xml:space="preserve"><value>Proxy size</value></data>
<data name="Settings.Archive.ResetAction" xml:space="preserve"><value>Reset archive</value></data>
<data name="Settings.Archive.ResetMessage" xml:space="preserve"><value>Its naming templates, proxy size and thumbnail size return to their defaults for every PC and server that uses it. Folders and files already in the archive keep their names.</value><comment>long</comment></data>
<data name="Settings.Archive.ResetTitle" xml:space="preserve"><value>Reset the settings of {0}?</value><comment>long; {0} archive name</comment></data>
<data name="Settings.Archive.Root" xml:space="preserve"><value>Archive folder</value></data>
<data name="Settings.Archive.Thumbnails" xml:space="preserve"><value>Thumbnail size</value></data>
<data name="Settings.BackToAuto" xml:space="preserve"><value>Back to Auto</value></data>
+5 -2
View File
@@ -74,6 +74,7 @@
<data name="Tooltips.Archive.RebuildStart" xml:space="preserve"><value>Queue the rebuild · the archive stays usable meanwhile</value></data>
<data name="Tooltips.Archive.Relink" xml:space="preserve"><value>Choose the new folder of an archive you moved; its sequences follow</value></data>
<data name="Tooltips.Archive.RenameApply" xml:space="preserve"><value>Make exactly these changes to folders, sidecars and index · resumes after a crash</value></data>
<data name="Tooltips.Archive.Restore" xml:space="preserve"><value>Choose a daily backup of the index in Settings › Advanced; it replaces the index at the next start</value></data>
<data name="Tooltips.Archive.RetagApply" xml:space="preserve"><value>Change the tags of these sequences in sidecars and index</value></data>
<data name="Tooltips.Archive.Retry" xml:space="preserve"><value>Run the same action again</value></data>
<data name="Tooltips.Archive.Scan" xml:space="preserve"><value>Incremental scan: new, changed and removed files by modification time and size</value></data>
@@ -530,6 +531,7 @@
<data name="Tooltips.Settings.Import" xml:space="preserve"><value>Load settings from a JSON file; the session and the window layout stay as they are</value></data>
<data name="Tooltips.Settings.Install" xml:space="preserve"><value>Open the Microsoft Store page of this free or paid extension; Re-detect after installing it</value></data>
<data name="Tooltips.Settings.InterfacePriority" xml:space="preserve"><value>While Titano is in front, its interface runs ahead of the jobs so it stays fluid during renders and analyses</value></data>
<data name="Tooltips.Settings.KeepArchiveSettings" xml:space="preserve"><value>Leave this archive's settings as they are</value></data>
<data name="Tooltips.Settings.KeepCache" xml:space="preserve"><value>Keep the cache as it is</value></data>
<data name="Tooltips.Settings.KeepIndex" xml:space="preserve"><value>Keep the index as it is</value></data>
<data name="Tooltips.Settings.KeepSettings" xml:space="preserve"><value>Keep every setting as it is</value></data>
@@ -551,8 +553,6 @@
<data name="Tooltips.Settings.Page.Server" xml:space="preserve"><value>Default server, render node, trusted certificates</value></data>
<data name="Tooltips.Settings.Page.Storage" xml:space="preserve"><value>Cache folder, thumbnails in memory, cache limit</value></data>
<data name="Tooltips.Settings.Page.Updates" xml:space="preserve"><value>Update check on start</value></data>
<data name="Tooltips.Settings.ParallelismAuto" xml:space="preserve"><value>Auto: cores minus four so the interface stays responsive</value></data>
<data name="Tooltips.Settings.ParallelismReset" xml:space="preserve"><value>Back to Auto: cores minus four</value></data>
<data name="Tooltips.Settings.Polling" xml:space="preserve"><value>How often Titano rescans the archive for changes made elsewhere, such as by a server sharing it</value></data>
<data name="Tooltips.Settings.Portable" xml:space="preserve"><value>On when portable.txt sits next to Titano.exe: all data stays in its data folder</value></data>
<data name="Tooltips.Settings.PreferHardware" xml:space="preserve"><value>Use a hardware encoder when one supports the preset; software otherwise</value></data>
@@ -563,6 +563,7 @@
<data name="Tooltips.Settings.Redetect" xml:space="preserve"><value>List the encoders again after a driver or codec install</value></data>
<data name="Tooltips.Settings.RedetectFormats" xml:space="preserve"><value>Look for codec extensions again after installing one; the next jobs use them</value></data>
<data name="Tooltips.Settings.ResetAll" xml:space="preserve"><value>Return every setting of this PC to its default; asks first</value></data>
<data name="Tooltips.Settings.ResetArchiveConfirm" xml:space="preserve"><value>Write the default templates and sizes into this archive's archive.json now</value></data>
<data name="Tooltips.Settings.ResetConfirm" xml:space="preserve"><value>Reset every setting now</value></data>
<data name="Tooltips.Settings.ResetSection" xml:space="preserve"><value>Return every control of this section to its default</value></data>
<data name="Tooltips.Settings.Restore" xml:space="preserve"><value>Compare the chosen backup with the index, then restore it at the next start; asks first</value></data>
@@ -584,6 +585,8 @@
<data name="Tooltips.Settings.Tier.Unavailable" xml:space="preserve"><value>No decoder on this PC reads its pixels; such frames are left out of renders</value></data>
<data name="Tooltips.Settings.UsageCounts" xml:space="preserve"><value>Send a daily anonymous count of versions and languages in use; nothing else, off by default</value></data>
<data name="Tooltips.Settings.Workers" xml:space="preserve"><value>Jobs and frames processed at once; fewer leave more room to other programs · Enter applies, Esc reverts</value></data>
<data name="Tooltips.Settings.WorkersAuto" xml:space="preserve"><value>Auto: half the logical cores run jobs at once, each with its own number of threads</value></data>
<data name="Tooltips.Settings.WorkersReset" xml:space="preserve"><value>Back to Auto: half the logical cores</value></data>
<data name="Tooltips.Setup.AllUsers" xml:space="preserve"><value>Install in Program Files for every account · asks for administrator approval</value></data>
<data name="Tooltips.Setup.Back" xml:space="preserve"><value>Return to the options without changing anything</value></data>
<data name="Tooltips.Setup.Browse" xml:space="preserve"><value>Choose the installation folder</value></data>