diff --git a/frontend/src/pages/ChatWorkspacePage.tsx b/frontend/src/pages/ChatWorkspacePage.tsx index d185912..10a065f 100644 --- a/frontend/src/pages/ChatWorkspacePage.tsx +++ b/frontend/src/pages/ChatWorkspacePage.tsx @@ -541,7 +541,19 @@ function CommitModal({ repoId, sessionId, onClose, onCommitted, providerStatus, // ── CheckpointDetailPanel ───────────────────────────────────────────────────── -function CheckpointDetailPanel({ commit, onClose, providerStatus }: { commit: Commit; onClose: () => void; providerStatus: Record | null }) { +function CheckpointDetailPanel({ + commit, + onClose, + providerStatus, + onRestore, + isRestored, +}: { + commit: Commit; + onClose: () => void; + providerStatus: Record | null; + onRestore?: (info: { id: string; message: string }) => void; + isRestored?: boolean; +}) { const [reviewResult, setReviewResult] = useState(null); const [reviewing, setReviewing] = useState(false); const [reviewErr, setReviewErr] = useState(null); @@ -626,17 +638,35 @@ function CheckpointDetailPanel({ commit, onClose, providerStatus }: { commit: Co )} - {/* Review checkpoint */} -
- + {/* Checkpoint actions — review + restore as peer actions */} +
+
+ + {onRestore && !isRestored && ( + + )} + {isRestored && ( + + + Currently restored + + )} +
{reviewErr &&

{reviewErr}

} @@ -667,6 +697,21 @@ function CheckpointDetailPanel({ commit, onClose, providerStatus }: { commit: Co ))}
)} + {/* Inline restore action — appears when review surfaces issues, + offering the checkpoint as a starting point to continue from. + Deliberately not calling the checkpoint "clean" since the review + just flagged issues in it. */} + {reviewResult.issues.length > 0 && onRestore && !isRestored && ( +
+ +
+ )}
)} @@ -1017,6 +1062,8 @@ function MemorySpacePanel({ commit={expandedCommit} onClose={() => { setExpandedId(null); setExpandedCommit(null); }} providerStatus={providerStatus} + onRestore={onMount} + isRestored={expandedCommit.id === mountedCheckpointId} /> ) )} @@ -1767,6 +1814,19 @@ export function ChatWorkspacePage() { )} + {/* Drift hint — soft nudge based on turn count since last checkpoint. + Not a semantic drift claim; just a count-based reminder that enough + has happened since the last checkpoint to consider reviewing it. */} + {contextMode === 'HEAD' && head?.commit_id && turnsSinceCheckpoint >= 8 && ( + + )} + {/* Provider/model — far right of the row */} {session && (