8 Commits

Author SHA1 Message Date
52b0fda829 Pick up new channels/threads in known guilds without a restart
on_message only matched channels enumerated during the backlog scan,
so a brand-new channel (or any type not scanned, like threads) was
silently ignored until the next restart. Now falls back to a
guild-level lookup and registers the channel for live watching going
forward the first time a message arrives there.
2026-08-02 11:50:55 +02:00
ef90ee6a0b 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.
2026-08-01 19:24:20 +02:00
7b3c358b05 Add a live status line to the stats panel
Shows what's happening right now underneath the table (connecting,
resolving the friend, discovering targets, fetching channel history,
waiting out a jittered delay before reacting, sending a reaction,
removing a reaction during --undo, etc). Status updates are cheap
and DB-free, using the last fetched stats for re-rendering.
2026-08-01 18:53:48 +02:00
ab0afa149a Two-phase backlog scan with self-healing found-count tracking
Split each channel's backlog scan into a find phase (settles the
found count first) and a react phase, so the progress display no
longer grows both numbers in lockstep. Found messages are logged in
a dedicated, message_id-deduped table and recovered across restarts
independent of the resume checkpoint, so nothing found is silently
abandoned if the script stops mid-react.

Also drops the separately-maintained messages_found counter, which
proved prone to drift under repeated interruptions/rescans, in favor
of computing it live from the dedup table - self-healing regardless
of how many times a channel gets rescanned.
2026-08-01 18:46:28 +02:00
41b6b3f234 Remove post-reaction verification refetch
Was doing an extra fetch_message per reaction to confirm the
reaction stuck. Turned out to be unrelated to the earlier
missing-reactions bug (that was the scan-state resume issue), so
drop it to save the API calls.
2026-08-01 18:12:17 +02:00
5d3cc49af0 Reset channel resume points on undo
--undo only cleared the reactions log, so a subsequent run kept
diffing forward from each channel's last-seen message instead of
honoring days_back, silently skipping everything already undone.
Undo now also clears channel_scan_state so the next run does a
full fresh backlog scan.
2026-08-01 18:09:47 +02:00
c8359ef4bb Add DM support, friend identification, and target pruning
React in 1:1 DMs alongside servers/groups, surface the resolved friend
username at startup and in the stats panel, verify reactions actually
stick after adding them (with jump links for manual spot-checking),
and prune stale targets from stats on each run so only the currently
mutual set is shown.
2026-08-01 18:03:02 +02:00
3118f7b9d5 Initial commit 2026-08-01 15:09:47 +02:00