Skip to content

Commit 649934f

Browse files
remidejclaude
andcommitted
fix(web): no-changes revert dialog only claims what checkpoints show
Hand edits made after the latest checkpoint are not in any checkpoint, so the dialog now says the agent hasn't changed files instead of claiming no files changed. Revert still keeps files, so those edits are never touched. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 1d644cb commit 649934f

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

‎apps/web/src/components/chat/ChatOverlayHosts.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ export function RevertConfirmHost(props: {
214214
<AlertDialogDescription>
215215
Rewind chat to before this message. Your prompt and attachments return to the composer.
216216
{pending?.hasFileChanges === false
217-
? " No files have changed since."
217+
? " The agent hasn’t changed any files since then."
218218
: " “Revert files too” also undoes your own edits."}
219219
</AlertDialogDescription>
220220
</AlertDialogHeader>

‎apps/web/src/session-logic.ts‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,10 +1127,9 @@ export type RevertFileCheck =
11271127
| { readonly kind: "diff"; readonly toTurnCount: number };
11281128

11291129
/**
1130-
* Whether rewinding to `turnCount` leaves changed files behind. Summaries can be empty despite
1131-
* changes (failed summary, filtered git imports), so an empty result still needs the real diff.
1132-
* Checkpoints snapshot the whole worktree, so diffing to the latest run's checkpoint also covers
1133-
* earlier runs that never captured one.
1130+
* Whether runs after `turnCount` changed files; later hand edits are unseen, so keep files on
1131+
* "unchanged". Empty summaries can hide changes (failed summary, git imports), hence the real
1132+
* diff. Checkpoints snapshot the worktree, so it also covers runs that never captured one.
11341133
*/
11351134
export function revertFileCheck(
11361135
runs: ReadonlyArray<Pick<OrchestrationV2Run, "id" | "ordinal" | "status">>,

0 commit comments

Comments
 (0)