fix(app): keep the editor's own save errors and gate an unread archive

- Editor: a failed save showed what the server or the archive layer would say
  for the exception's type, so the editor's own sentences were lost: frames
  changed on the server or settings changed elsewhere read "The server does not
  answer", a read-only account or a gone sequence "Something went wrong". These
  failures are now EditorException (an IOException; ProxiesOutdatedException
  derives from it) and the toast shows their sentence as it is. A project
  written by a newer Titano is reported with the same sentence as a corrupt one
  instead of the parser's English text.
- Library: a job posted to a server whose certificate changed since sign-in
  threw out of the action unreported; the pin's refusal now reaches the error
  toast ("The certificate was not trusted").
- Archive: picking another archive forced it offline until it was read, so the
  rebuild dialog called it offline with the previous archive's count, and
  disabled commands said the archive must be online. What was read is now kept
  apart from availability: until the picked archive is read, Rebuild and the
  online commands wait and say so, health fixes and search results of the
  previous archive are cleared, and a running search is cancelled.

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:09:04 +00:00
1 parent d47e3e9b49
commit 4850af2443
15 files changed
+218 -31

No files matched your search

+3 -2
View File
@@ -832,12 +832,13 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
/// <summary>
/// The first failure of a run of failed saves (they are retried until one succeeds); Retry tries at once. Why it
/// failed is one localized sentence (BRIEF §0.2 rule 6); the exception's own text is in the log.
/// failed is one localized sentence (BRIEF §0.2 rule 6): the editor's own (frames changed, changed elsewhere, gone,
/// unreadable, not allowed), else the cause on the server or in the archive; the exception's own text is in the log.
/// </summary>
private void OnSaveFailed(Exception ex) => Shell.ShowToast(new Toast
{
Title = Loc.L("Editor.Save.Failed"),
Message = Session.IsRemote ? ErrorText.ForServer(ex) : ArchiveFailures.Cause(ex),
Message = ex is EditorException ? ex.Message : Session.IsRemote ? ErrorText.ForServer(ex) : ArchiveFailures.Cause(ex),
IsError = true,
ActionText = Loc.L("Editor.Save.Retry"),
ActionToolTip = Loc.L("Tooltips.Editor.Save.Retry"),