fix(deploy): toast when restoring checkpoint with no snapshot
handleRestore previously returned silently when deployedConfigSnapshot was null, leaving the user wondering why their click did nothing. Show a warning toast explaining that the checkpoint predates snapshotting. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -321,7 +321,14 @@ export default function AppDeploymentPage() {
|
||||
const deployment = deployments.find((d) => d.id === deploymentId);
|
||||
if (!deployment) return;
|
||||
const snap = deployment.deployedConfigSnapshot;
|
||||
if (!snap) return;
|
||||
if (!snap) {
|
||||
toast({
|
||||
title: 'Cannot restore checkpoint',
|
||||
description: 'This checkpoint predates snapshotting and cannot be restored.',
|
||||
variant: 'warning',
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
setForm((prev) => {
|
||||
const a = snap.agentConfig ?? {};
|
||||
|
||||
Reference in New Issue
Block a user