#923 fixed the blank transcript in #912 — an orphaned message tree. The
same report's other screenshot is a different failure that survived it: the
overlay stuck on "Loading conversation / Still loading…" with the request
already answered in devtools.
Two paths led there, and both told the user their history was gone:
* The wait was unbounded ("the overlay stays until the API responds (no
timeout)"). A fetch that never settled span forever, and the only exit was
✕ — which abandons the conversation. The wait is now bounded, and the 8s
hint is no longer the last thing that ever happens.
* A cold open that *failed* ran router.replace("/home"), dropping the
session id from the URL. A transient error was indistinguishable from a
lost conversation, and the id needed to retry was gone.
Both now end in one terminal, retryable state with the id still in the URL:
the overlay shows the failure and a Retry, ✕ still means "leave". A failed
background revalidate is unchanged — the cached transcript stays on screen
rather than being replaced by an error.
Which of the three aborts counts as a failure is the whole subtlety (a
newer load and the user's ✕ own the state that replaces this one; a timeout
owns nothing), so that decision lives in a tested predicate rather than
inline in the component.
Rework of the #578 loading overlay:
- Replace the simulated rAF percentage bar (which climbed to a fake 99%
over ~24s, unrelated to real load progress) with an honest indeterminate
spinner + 'Loading conversation…' message and an 8s 'Still loading…' hint.
- Collapse the null/loading/complete state machine to a single boolean and
drop the artificial 400ms completion delay, so the conversation appears
the moment the fetch resolves.
- Fix a stray ')' in the cancel button's className that voided its hover
color, and remove the now-redundant width-transition/rAF conflict.
- Drop the dead 'server is taking too long' locale key (no timeout path
uses it).
The AbortSignal plumbing (getSession/loadSession + cancel button) and the
Strict-Mode-safe initial-load ref are kept as-is.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>