Skip to content

Ask for a different backend port when the default one is taken - #19

Open
feanor91 wants to merge 1 commit into
visualbruno:mainfrom
feanor91:port-choice
Open

Ask for a different backend port when the default one is taken#19
feanor91 wants to merge 1 commit into
visualbruno:mainfrom
feanor91:port-choice

Conversation

@feanor91

@feanor91 feanor91 commented Aug 4, 2026

Copy link
Copy Markdown

Summary

  • The desktop app used to crash (or silently hang ~60s) if something else on the machine already held the backend's port. It now checks before spawning the backend, and lets the user pick a free port instead — defaulting to one it finds automatically.
  • Also fixes the free-port check itself: it was probing 127.0.0.1 specifically, which can report "free" even when the backend's actual no-host dual-stack bind would fail (observed with Docker Desktop's port-forwarding on Windows).

Test plan

  • Built the frontend (npm run build) and launched the packaged Electron app (electron .) locally with port 3001 already occupied by another process.
  • Confirmed the port-conflict prompt appeared, offered a free port (3002), and the backend started successfully on the confirmed port after accepting it.
  • Confirmed the app shuts down cleanly (backend receives SIGTERM) on window close.

🤖 Generated with Claude Code

The desktop app used to crash (or silently hang ~60s) if something
else on the machine already held the backend's port. It now checks
before spawning the backend, and lets the user pick a free port
instead — defaulting to one it finds automatically.

Also fixes the free-port check itself: it was probing 127.0.0.1
specifically, which can report "free" even when the backend's actual
no-host dual-stack bind would fail (observed with Docker Desktop's
port-forwarding on Windows).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant