You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5ae5c00
Browse filesBrowse the repository at this point in the historyBrowse files
fix(ui): keep revert usable after an automatic recovery attempt fails
The recovery alert disabled Revert whenever the Session's operation was
RESUME. An admitted crash recovery keeps that operation through every
failed attempt, so once the first automatic attempt failed the button
spun until a later attempt succeeded. That is the moment the reader
needs it, and Revert was the only thing to press there.
Revert is now disabled only while this page's own RevertSession call
is in flight. An admitted recovery still reads "Recovering this
conversation", in automatic mode and in manual mode when another tab
or client admitted it. A click joins the admitted recovery, as the
service does for an admitted revert. A ref guards a double click
before the button re-renders disabled. An ABORTED refusal from other
lifecycle work shows its error and leaves the button usable. A
FAILED_PRECONDITION with reason KAGENT_SESSION_RUNTIME_NOT_CRASHED
means another attempt recovered it first, so the page re-reads the
Session and transcript without an error.
Leaving Revert enabled while an attempt runs was preferred to polling
for the attempt's outcome: the service already joins or refuses a
concurrent revert, so the button needs no second copy of that rule.
Verified with Node 24 on Linux: tsc --noEmit is clean, eslint has no
errors, and vitest run src/components/chat src/pages src/api passes
379 tests. The six new tests fail against the previous alert and page.
On a kind fleet with automatic recovery on, the automatic attempt was
held failing; Revert stayed enabled and restored the Session.
Signed-off-by: Ada Lundhe <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
0 commit comments