Add spinner/countdown-bar to stats panel; backfill on widened days_back

Stats panel: a persistent spinner marks whichever target is currently
being scanned/reacted to, and jittered waits show a live-ticking
countdown bar instead of a static "waiting Xs" line. Both the status
line and countdown row are always rendered (blank when idle) so their
appearing/disappearing no longer shifts the table's height.

Backlog: channel_scan_state now tracks oldest_covered_at alongside
newest_id_seen. If days_back is widened after a channel already has a
resume checkpoint, the forward-only diff would never look back far
enough to notice — now the newly-exposed gap gets backfilled first.
This commit is contained in:
2026-08-01 19:24:20 +02:00
parent 7b3c358b05
commit ef90ee6a0b
6 changed files with 159 additions and 31 deletions

View File

@@ -25,6 +25,7 @@ async def undo_all_reactions(client: discord.Client, storage: Storage, display:
should_clear_log = True
if display is not None:
display.set_active_target(row["target_id"])
display.set_status(f"Removing reaction from message {message_id} ({i}/{total})...")
try:
@@ -46,10 +47,13 @@ async def undo_all_reactions(client: discord.Client, storage: Storage, display:
delay = human_jitter()
if display is not None:
display.set_status(f"Waiting {delay:.1f}s before next removal...")
display.start_countdown(delay, "next removal")
await asyncio.sleep(delay)
if display is not None:
display.clear_countdown()
if display is not None:
display.set_active_target(None)
display.set_status("Clearing channel resume points and found-message log...")
cleared = await asyncio.to_thread(storage.clear_scan_state)
await asyncio.to_thread(storage.reset_message_counts)