Files
DeepTutor/web/app
Bingxi Zhao (Frank) 7cc213f24d fix(chat): end a stuck session load in a retryable state
#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.
2026-08-20 00:56:34 +08:00
..
2026-08-19 17:34:52 +08:00