feat(manga): notice when a queued gallery lands, without a reload #17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/poll-while-queued"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
flipmode 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.