GitHub issues panel shows "Loading…" on every repository switch despite a warm cache
Switching between repositories makes "MY OPEN GITHUB ISSUES" drop to Loading… with a spinner every time, even when the same repository was viewed seconds earlier.
The cache itself is real and works — CACHE_TTL_SECONDS = 300 in both builds, and the second fetch does come back from cache. The problem is presentational: the panel is reset to its loading state and the fetch dispatched before anything checks whether an answer is already in hand, so a cache hit still costs a visible ~440 ms flash.
Measured by sampling the panel at 20 Hz across a switch back to an already-loaded repository:
[0.45s] repo='alpha' :: MY OPEN GITHUB ISSUES / | Loading...
[0.88s] repo='alpha' :: MY OPEN GITHUB ISSUES ↻ | #9652 Externally-provisioned users render as raw em...
Identical in the Python build, so this is not a regression from the Rust port — the behaviour was carried over.
Suggested behaviour
On selection change, render cached issues synchronously when the entry is still fresh, and only show the spinner when there is genuinely nothing to show. A background refresh behind already-rendered content is fine; the flash is the part that reads as broken.
Groomed for the ship-a-thon train (slot 3). Research found the real blocker: the cache is keyed by owner/repo, resolved via an uncached gh repo view subprocess on every call — so even warm hits pay a subprocess round-trip. Fix: re-key by repo path (per-key invalidation has zero callers), add a synchronous cache peek, render fresh cached issues instantly on selection change, spinner only when nothing cached, and stop the 300s tick from nuking the whole cache (TTL staleness instead). Scope decision: the sessions panel has the identical flash and no cache at all — it gets the same treatment in this PR.