fix(app): notification clicks run only what the toast names, batches speak once, warnings get badges

- Toast.RunsFromNotification: a click on a Windows notification restores the window and runs the toast's
  action only when the toast opts in (card detected: Import; interrupted import: Resume; job finished: Open;
  navigation to Import or Jobs) and it is the only notification shown since the icon appeared. Cancel, Undo
  and Retry stay in the window, and the notification text no longer offers them.
- Job endings are coalesced: finished jobs of one kind wait until no job of that kind the user waits for is
  queued or running, then one toast says how many finished ("12 jobs finished", action Jobs); failures of one
  update share one toast. Server > Upload all no longer raises one toast and one notification per sequence.
- Every failure that is not upkeep (scan, thumbnails, proxies, light analysis) is announced, including move,
  adopt and user downloads; finished moves and adoptions are announced too.
- Rail badges: Library counts the sequences with warnings (the Warnings filter), refreshed after analyses;
  Archive counts the index health lines that need attention.
- Tests: the balloon click path, the --minimized restore to a saved maximised window, batch and failure
  coalescing, and the new badges.

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 10:35:19 +00:00
1 parent 97c6484c74
commit 6417e2b3c2
15 files changed
+438 -64

No files matched your search

+4 -1
View File
@@ -291,8 +291,10 @@ public sealed class ShellViewModel : LocalizedViewModel
/// <summary>
/// A one-line notice with one action (job done, update available). <paramref name="isError"/> marks something that
/// did not happen or failed: screen readers then say it at once instead of after what they are reading.
/// <paramref name="runsFromNotification"/>: a click on its Windows notification also runs the action (<see cref="Toast.RunsFromNotification"/>).
/// </summary>
public void Notify(string title, string? message = null, string? actionText = null, string? actionToolTip = null, Action? action = null, bool isError = false) =>
public void Notify(string title, string? message = null, string? actionText = null, string? actionToolTip = null, Action? action = null, bool isError = false,
bool runsFromNotification = false) =>
ShowToast(new Toast
{
Title = title,
@@ -301,6 +303,7 @@ public sealed class ShellViewModel : LocalizedViewModel
ActionToolTip = actionToolTip,
ActionCommand = action is null ? null : new RelayCommand(action),
IsError = isError,
RunsFromNotification = runsFromNotification,
});
/// <summary>Errors are one sentence saying what happened plus one action (BRIEF §0.2 rule 6); the details go to the log.</summary>