Skip to content

Commit 4f167ab

Browse files
🤖 fix: emit change event when background process exit is detected (#1060)
## Problem The background bash banner was not updating when processes exited naturally. It would appear when a process started and disappear if you clicked terminate, but stayed visible when a process completed on its own. ## Root Cause When `list()` or `getProcess()` polled the exit code and discovered a process had exited, the status was updated internally but `emitChange()` was never called to notify the subscription in `router.ts`. ## Fix Add `emitChange(proc.workspaceId)` in both `refreshRunningStatuses()` and `getProcess()` when a process is discovered to have exited. _Generated with `mux`_
1 parent 9c2c27c commit 4f167ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎src/node/services/backgroundProcessManager.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ export class BackgroundProcessManager extends EventEmitter<BackgroundProcessMana
419419
`BackgroundProcessManager: Failed to update meta.json: ${getErrorMessage(err)}`
420420
);
421421
});
422+
this.emitChange(proc.workspaceId);
422423
}
423424
}
424425

@@ -584,6 +585,7 @@ export class BackgroundProcessManager extends EventEmitter<BackgroundProcessMana
584585
`BackgroundProcessManager: Failed to update meta.json: ${getErrorMessage(err)}`
585586
);
586587
});
588+
this.emitChange(proc.workspaceId);
587589
}
588590
}
589591
}

0 commit comments

Comments
 (0)