fix(web): keep host key prompt open after the aborted run finishes (#2)

The server publishes run.finished (exit -1) right after run.hostKeyUnknown, which closed the confirmation dialog immediately.
This commit is contained in:
Florian Schmidt
2026-11-16 00:13:24 +01:00
parent cc68fe39b3
commit 4e79af3e24
2 changed files with 26 additions and 0 deletions
+6
View File
@@ -71,6 +71,12 @@ export function eventReducer(state: Session, event: Action): Session {
updated = { ...run, status: "hostKey", hostKey: event };
break;
case "run.finished": {
// An attempt aborted for host key confirmation also finishes (exit -1);
// keep the prompt open until the user accepts or rejects.
if (run.status === "hostKey") {
updated = { ...run, exitCode: event.exitCode, durationMs: event.durationMs };
break;
}
updated = {
...run,
status: event.exitCode === 0 ? "success" : "failure",