Report the abort on the book the user answered for

With several books in flight, the book whose dialog was answered showed
"Cancelled" while some unrelated book showed "Error, Abort". Tearing the queue
down is claimed by whichever book finishes first, and the books genuinely are
interchangeable for that. The status left on a row is not: it is read afterwards
by someone who remembers which book they were asked about.

The two jobs are now separate. ShowRetryDialogAsync records the answering book as
BadBookSessionContext.AbortOriginator, written before Override so that a book
reading Override and racing ahead to the queue loop cannot find the originator
still unset and conclude there was none. The loop gives the abort to that book and
Cancelled to every book that inherited the answer. ClaimAbort is unchanged and
still decides the teardown.

With no dialog in play - Bad Book set to Abort in settings - nobody answered
anything, there is no originator, and the book that claimed the teardown keeps the
abort as before.
This commit is contained in:
Allamagoosa
2026-08-24 10:02:46 -07:00
parent 5e1ac3f9cc
commit 76e036fb42
4 changed files with 82 additions and 6 deletions

View File

@@ -533,6 +533,14 @@ public class ProcessBookViewModel : ReactiveObject
{
var result = await BadBookActionDialogBase.Show(skipDialogText, "Skip this book?");
// This is the book the user was looking at when they said stop, so this is the book whose
// row should say so afterwards. Every other book in flight inherits the answer through
// Override below and was cancelled by it, which is a different thing and should read as
// one. Written before Override, not after: a book reading Override and racing ahead to
// the queue loop must not find the originator still unset and conclude there wasn't one.
if (result.Action is DialogResult.Abort && _badBookSession is not null)
_badBookSession.AbortOriginator = this;
// Abort is a statement about the run, not about this one book, so it becomes the session
// answer whether or not "apply to all" was checked. Without this a user who aborts with
// several books in flight is asked the same question again by every one of them, and the