feat(jobs): register the autotag apply, and ask before quitting

The apply was a bare goroutine whose progress lived in a component
field discarded on navigation, with no cancel and no record of where
it stopped if the app quit while it was rewriting tags — beside a
registry that gives every other long-running operation exactly those
things.

`jobs.KindAutotagApply` now carries progress, a cancel wired to the
apply's context, and a terminal state that tells cancelled from
failed. `OnBeforeClose` returns false unconditionally today; it now
asks while a file-writing job is in flight.

Still not durable: quitting cancels cleanly but nothing records where
it stopped for the next launch. That belongs with the deferred
download/jobs work.
This commit is contained in:
2026-08-12 01:18:07 -04:00
parent 1d335c5180
commit 952c25c3d3
7 changed files with 341 additions and 7 deletions
+4 -3
View File
@@ -22,9 +22,10 @@ type Kind string
// Job kinds.
const (
KindLibraryScan Kind = "library-scan"
KindIndexBuild Kind = "index-build"
KindDownload Kind = "download"
KindLibraryScan Kind = "library-scan"
KindIndexBuild Kind = "index-build"
KindDownload Kind = "download"
KindAutotagApply Kind = "autotag-apply"
)
// State is the lifecycle position of a job.