mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
The monitor went stale-empty overnight because every failure path compounded: the app usually launches without GITHUB_TOKEN in its env, so all GitHub calls ran anonymous (60 req/h) while the panel polls ~180 req/h — rate-limited within minutes — and non-success responses returned Ok(None), which the UI rendered as a confident "No checks / 0 open comments" instead of an error. Three fixes: ambient_github_token falls back to `gh auth token` (resolved once per process) so the desktop uses the CLI credential that's actually on the machine; GitHub commands now return Err on non-404 failures so React Query keeps the last good snapshot and retries instead of overwriting it with nothing; and polling pauses entirely while the drawer is closed — unless automation is armed, which keeps watching in the background. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>