Repository navigation
fix(web): edit-from-here skips the file revert choice when no files changed #27690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1121,6 +1121,21 @@ export function findRevertCheckpoint( | |
| ); | ||
| } | ||
|
|
||
| /** A run with no ready checkpoint (stopped, failed capture) may have touched files. */ | ||
| export function runsChangedFiles( | ||
| checkpoints: ReadonlyArray<OrchestrationV2Checkpoint>, | ||
| runIds: Iterable<RunId>, | ||
| ): boolean { | ||
| for (const runId of runIds) { | ||
| const checkpoint = checkpoints.findLast( | ||
| (candidate) => candidate.runId === runId && candidate.status === "ready", | ||
| ); | ||
| if (checkpoint === undefined) return true; | ||
| if (checkpoint.files.length > 0 || (checkpoint.filesTotal?.count ?? 0) > 0) return true; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium When a ready checkpoint has an empty diff summary despite changed files, 🤖 Copy this AI Prompt to have your agent fix this: |
||
| } | ||
| return false; | ||
| } | ||
|
|
||
| export function derivePhase(runtime: ThreadStructureRuntime | null): SessionPhase { | ||
| if (runtime === null) return "disconnected"; | ||
| if ( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium
chat/useTimelineRewind.ts:134Reverting past a notification-only wake run that changed files incorrectly omits the file-restore option, leaving those changes in place.
timelineMessagescontains only message entries, so this run-ID set misses work-only runs; collect affected runs from the full timeline or run projection instead.🤖 Copy this AI Prompt to have your agent fix this: