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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user