Add a way to force-refresh a card (2h cache feels too long after profile changes)
What's the idea
A "re-scout" action that rebuilds a card immediately instead of waiting for the 2h Redis TTL to expire.
Problem it solves
Today I enabled "Private contributions" on my GitHub profile and my card kept
showing the old (much lower) numbers — turned out the card is cached for up to
2 hours in lib/scout.ts. There's no way to see fresh stats after changing
something on GitHub, and the card doesn't even say it's cached.
How it might work
UI: a quiet one-liner under the Scouting Metrics panel, styled like the faint labels:
⏱ Scouted 47 min ago · ↻ Re-scout
While rebuilding it shows "Re-scouting…"; right after a refresh it collapses
to "Scouted just now" until the cooldown expires. Needs a builtAt field on
the cached card (and a CACHE_VERSION bump).
Server: to keep it abuse-proof (each rebuild costs GitHub API calls from the token pool), gate it with a per-login cooldown in Redis:
SET gitfut:refresh-lock:<login> 1 NX EX 900
Lock free → rebuild and overwrite the cached card; lock held → tell the user to retry in a few minutes. Worst case is one extra rebuild per profile per 15 min.
Happy to send a PR if you're open to it.