Unified · Split
| @@ -230,6 +230,7 @@ export function ResumeApprovalPageView(props: { · 229 unmodified lines | ||
| 230 | 230 | const busy = status.state === "submitting"; |
| 231 | 231 | const done = status.state === "done"; |
| 232 | 232 | const canSubmit = Boolean(displayedPaused) && !busy && !done; |
| 233 | + const unavailable = !nextPaused && AsyncResult.isFailure(paused); | |
| 233 | 234 | |
| 234 | 235 | return ( |
| 235 | 236 | <main className="flex min-h-full items-center justify-center bg-background px-4 py-8"> |
| @@ -240,12 +241,14 @@ export function ResumeApprovalPageView(props: { · 4 unmodified lines | ||
| 240 | 241 | </div> |
| 241 | 242 | <div className="min-w-0 flex-1"> |
| 242 | 243 | <p className="text-xs font-medium uppercase tracking-wider text-muted-foreground"> |
| 243 | − User approval required | |
| 244 | + {unavailable ? "Resume execution" : "User approval required"} | |
| 244 | 245 | </p> |
| 245 | 246 | <h1 className="mt-1 text-xl font-semibold text-foreground">Resume execution</h1> |
| 246 | − <p className="mt-2 text-sm leading-6 text-muted-foreground"> | |
| 247 | − A paused tool call is waiting for your decision before it can continue. | |
| 248 | − </p> | |
| 247 | + {!unavailable && ( | |
| 248 | + <p className="mt-2 text-sm leading-6 text-muted-foreground"> | |
| 249 | + A paused tool call is waiting for your decision before it can continue. | |
| 250 | + </p> | |
| 251 | + )} | |
| 249 | 252 | </div> |
| 250 | 253 | </div> |
| 251 | 254 | |
| @@ -294,7 +297,11 @@ export function ResumeApprovalPageView(props: { · 42 unmodified lines | ||
| 294 | 297 | <span className="text-xs font-medium text-muted-foreground">Execution </span> |
| 295 | 298 | <code className="break-all font-mono text-xs text-foreground">{shortExecutionId}</code> |
| 296 | 299 | </div> |
| 297 | − {done ? ( | |
| 300 | + {unavailable ? ( | |
| 301 | + <Button type="button" asChild> | |
| 302 | + <a href="/">Go home</a> | |
| 303 | + </Button> | |
| 304 | + ) : done ? ( | |
| 298 | 305 | <CopyButton |
| 299 | 306 | value={returnPrompt[status.action]} |
| 300 | 307 | label="Copy prompt" |