Skip to content

Conversation

@cameronperera
Copy link
Collaborator

Description

There have been times where users try to sign out or close the boundary desktop client. If there are active sessions, a modal should appear to let the user know that closing or signing out will close those sessions. It is flaky and hard to reproduce but there are times where clicking ok in the modal does not succeed and the user is stuck in a weird state.

We have updated to check the exitCode on the process instead of killed. The killed value was not always accurate while the exitCode was.

Screenshots (if appropriate)

How to Test

Suggestion from Zed for testing purposes:

I've been reliably able to at least get the bug to appear by manually killing the pid returned from the child process. You can either log what the pid is in code or manually find it with something like ps ax | grep "boundary connect".

Checklist

  • I have added before and after screenshots for UI changes
  • I have added JSON response output for API changes
  • I have added steps to reproduce and test for bug fixes in the description
  • I have commented on my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a11y-tests label to run a11y audit tests if needed

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.
  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
  • If applicable, I've documented the impact of any changes to security controls.
    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

@cameronperera cameronperera self-assigned this Jan 29, 2026
@cameronperera cameronperera requested a review from a team as a code owner January 29, 2026 18:09
@vercel
Copy link

vercel bot commented Jan 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
boundary-ui Ready Ready Preview, Comment Feb 6, 2026 7:53pm
boundary-ui-desktop Ready Ready Preview, Comment Feb 6, 2026 7:53pm

Request Review

*/
get isRunning() {
return this.#process && !this.#process.killed;
return this.#process && this.#process.exitCode === null;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The subprocess.exitCode property indicates the exit code of the child process. If the child process is still running, the field will be null.

When the child process is terminated by a signal, subprocess.exitCode will be null and subprocess.signalCode will be set.

https://nodejs.org/api/child_process.html#class-childprocess

Is this robust enough? Is it sounds like the exitCode can be null even if the process has ended.

It looks like the exit event provides more clarity:

If the process exited, code is the final exit code of the process, otherwise null. If the process terminated due to receipt of a signal, signal is the string name of the signal, otherwise null. One of the two will always be non-null.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! I will add a signalCode check here as well to better check if it is actually still running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants