feat(manga): notice when a queued gallery lands, without a reload #17

Merged
rms merged 1 commit from feat/poll-while-queued into master 2026-11-29 00:02:54 -06:00
Owner

After queueing, the UI relied on a single refresh, so a finished download kept its "… queued" pill until reload. Adds a poller that runs only while something is queued (10s/60s/5min backoff, stops when idle, pauses when the tab is hidden and refreshes on return). Probe gains a flip mode that lands a gallery under the poller and asserts the bar updates with no reload; fails if the poll is removed. v2.1.13.

After queueing, the UI relied on a single refresh, so a finished download kept its "… queued" pill until reload. Adds a poller that runs only while something is queued (10s/60s/5min backoff, stops when idle, pauses when the tab is hidden and refreshes on return). Probe gains a `flip` mode that lands a gallery under the poller and asserts the bar updates with no reload; fails if the poll is removed. v2.1.13.
The queue lives on the server, so nothing tells the page a download finished: after
queueing, refreshBadges() ran once and the pill sat on "… queued" until you reloaded
or clicked again - which reads as "the button did nothing".

Now a poller exists only while something in the current verdict set is queued: 10 s
for the first three minutes, 60 s up to twenty, then 5 min, and it stops entirely once
nothing is queued, so an idle page costs zero requests. A pull that is waiting its turn
behind the nightly sync therefore backs off instead of hammering the endpoint, and a
hidden tab does not poll at all - returning to it refreshes, because that is the one
moment the page is certainly being looked at and possibly stale.

The probe grew a `flip` mode: it starts a gallery as queued, flips the stub's verdict
to library while nothing touches the page, and asserts the bar reaches "in the library"
with the page count inside 20 s. Verified it fails when the poll call is removed
("bar never updated by itself, still: … queuedQueued"). All three modes green.

v2.1.13.
rms merged commit 578a561a68 into master 2026-11-29 00:02:54 -06:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rms/userscripts!17
No description provided.