Skip to content

Commit 40e3702

Browse files
adalundheclaude
andcommitted
fix(ui): say what automatic recovery forgets the way the transcript does
The automatic-mode alert said discarded messages "are marked as failed". The transcript labels them "Not remembered after recovery", so the alert named a state the page never shows. It also offered to start a new conversation from a saved snapshot without saying where. Automatic mode now shares the manual copy's last two sentences. The alert points at the transcript's snapshot lines for a fork when one can fork, and says the reverted agent does not remember messages after that snapshot. Verified on Node 24: `tsc --noEmit`, eslint, and `vitest run src/components/chat src/pages src/api` pass. Signed-off-by: Ada Lundhe <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 11f9abb commit 40e3702

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎ui/src/components/chat/SessionRecoveryAlert.test.tsx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ describe("conversation recovery choices", () => {
5757
// Forking stays on the transcript's snapshot lines, as in manual mode.
5858
expect(screen.getAllByRole("button")).toHaveLength(1);
5959
expect(screen.queryByRole("combobox")).not.toBeInTheDocument();
60+
expect(screen.getByText(/fork a saved snapshot from the transcript/)).toBeInTheDocument();
61+
// The transcript labels those messages "Not remembered after recovery", not failed.
62+
expect(screen.getByText(/does not remember messages sent after that snapshot/)).toBeInTheDocument();
63+
expect(screen.queryByText(/marked as failed/)).not.toBeInTheDocument();
6064
});
6165

6266
it("prevents another manual request while recovery is running", () => {

‎ui/src/components/chat/SessionRecoveryAlert.tsx‎

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,13 @@ export function SessionRecoveryAlert({
3838
title={automatic || isRecovering ? "Recovering this conversation" : "The agent runtime crashed"}
3939
description={(
4040
<>
41-
{automatic ? (
42-
<div>
43-
Automatic recovery will restore the last saved runtime state. If it does not finish, revert now or start a new conversation from a saved snapshot. Messages the recovered agent did not retain are marked as failed.
44-
</div>
45-
) : (
46-
<div>
47-
Revert to the last runtime snapshot to continue this conversation.
48-
{canFork ? " To start a new conversation instead, fork a saved snapshot from the transcript." : null}
49-
{" "}The reverted agent does not remember messages sent after that snapshot.
50-
</div>
51-
)}
41+
<div>
42+
{automatic
43+
? "Automatic recovery will restore the last runtime snapshot. If it does not finish, revert now to continue this conversation."
44+
: "Revert to the last runtime snapshot to continue this conversation."}
45+
{canFork ? " To start a new conversation instead, fork a saved snapshot from the transcript." : null}
46+
{" "}The reverted agent does not remember messages sent after that snapshot.
47+
</div>
5248
<Button
5349
loading={isRecovering}
5450
disabled={isRecovering}

0 commit comments

Comments
 (0)