feat(subscriptions): smarter-backfill UI — Start/Stop + state badge
Plan #693 (frontend). Backend landed in 96fffaf.
- sources store: setBackfill(runs) → startBackfill/stopBackfill ({action}).
- SubscriptionsTab: the deep-scan window.prompt for N runs becomes a
Start/Stop toggle keyed on source.backfill_state.
- SourceRow + SourceCard: the 'backfill (N×)' chip becomes a state badge —
Backfilling (chunk N) / Backfilled / Stalled — and the scan button
toggles between Backfill (mdi-magnify-scan) and Stop (mdi-stop).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -85,11 +85,16 @@ export const useSourcesStore = defineStore('sources', () => {
|
||||
}
|
||||
}
|
||||
|
||||
// Plan #544: arm a source for backfill mode. The next `runs` download
|
||||
// runs (default 3) walk gallery-dl's full post history instead of
|
||||
// exiting early at the first contiguous archived block.
|
||||
async function setBackfill(id, runs = 3, artistIdHint = null) {
|
||||
const body = await api.post(`/api/sources/${id}/backfill`, { body: { runs } })
|
||||
// Plan #693: start/stop a run-until-done backfill. 'start' walks the full
|
||||
// post history in time-boxed chunks until it reaches the bottom (then the
|
||||
// source shows backfill_state 'complete'); 'stop' cancels back to tick mode.
|
||||
async function startBackfill(id, artistIdHint = null) {
|
||||
const body = await api.post(`/api/sources/${id}/backfill`, { body: { action: 'start' } })
|
||||
_invalidate(artistIdHint ?? body.artist_id)
|
||||
return body
|
||||
}
|
||||
async function stopBackfill(id, artistIdHint = null) {
|
||||
const body = await api.post(`/api/sources/${id}/backfill`, { body: { action: 'stop' } })
|
||||
_invalidate(artistIdHint ?? body.artist_id)
|
||||
return body
|
||||
}
|
||||
@@ -120,7 +125,8 @@ export const useSourcesStore = defineStore('sources', () => {
|
||||
loadAll, loadForArtist,
|
||||
create, update, remove,
|
||||
checkNow,
|
||||
setBackfill,
|
||||
startBackfill,
|
||||
stopBackfill,
|
||||
findOrCreateArtist, autocompleteArtist,
|
||||
loadScheduleStatus,
|
||||
sourcesByArtistGrouped,
|
||||
|
||||
Reference in New Issue
Block a user