Skip to content

fix(scripts): tear down vite when the desktop dev window closes - #38

Merged
rosspeili merged 2 commits into
ARPAHLS:mainfrom
AUDOSt0ck1ng:fix/dev-desktop-teardown
Aug 7, 2026
Merged

fix(scripts): tear down vite when the desktop dev window closes#38
rosspeili merged 2 commits into
ARPAHLS:mainfrom
AUDOSt0ck1ng:fix/dev-desktop-teardown

Conversation

@AUDOSt0ck1ng

Copy link
Copy Markdown
Collaborator

Closes #37.

dev:desktop ran concurrently without -k, so vite and Electron were
independent children. Closing the AVATAR window ended only Electron and left
vite listening on 5173, which then blocked the next npm run dev:desktop with
Port 5173 is already in use — against a server the developer had no reason to
think was still running.

The neighbouring thumbs script already passes -k, so this was an oversight
rather than a deliberate difference. One flag, matching that precedent.

Verification

Both teardown directions, confirmed with netstat showing 5173 released and no
leftover processes:

  • killed vite -> Electron exited with it
  • closed the AVATAR window -> vite exited with it

Scope

Developer-facing only. dist:win and the packaged app do not use this script,
and no runtime behaviour changes.

🤖 Generated with Claude Code

AUDOSt0ck1ng and others added 2 commits August 7, 2026 14:02
…closes

concurrently was started without -k, so the two children were independent:
closing the Electron window ended only Electron, and vite kept listening on
5173 until the terminal itself was closed. The next `npm run dev:desktop`
then failed with "Port 5173 is already in use" against a server the user had
no idea was still up.

The thumbs script already passes -k for the same reason. Match it here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@rosspeili
rosspeili force-pushed the fix/dev-desktop-teardown branch from d79c370 to b746f27 Compare August 7, 2026 11:02
@rosspeili

Copy link
Copy Markdown
Contributor

Thanks @AUDOSt0ck1ng, confirmed this is a real bug, and the fix is clean and tiny (concurrently -k, same as thumbs).

Added a CHANGELOG.md [Unreleased] Fixed line on this branch for #37 / #38 and rebased. Will merge once CI is green.

@rosspeili
rosspeili merged commit 7210b41 into ARPAHLS:main Aug 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: dev:desktop leaves the vite dev server running after the window closes

2 participants