Skip to content

BACK-473 - handle port congestion for backlog browser#651

Open
lenucksi wants to merge 4 commits into
MrLesk:mainfrom
lenucksi:tasks/back-473-port-congestion
Open

BACK-473 - handle port congestion for backlog browser#651
lenucksi wants to merge 4 commits into
MrLesk:mainfrom
lenucksi:tasks/back-473-port-congestion

Conversation

@lenucksi
Copy link
Copy Markdown

Summary

  • Add isPortAvailable() and findNextAvailablePort() helpers to src/server/index.ts
  • Pre-check port availability in CLI browser command before calling server.start()
  • If port is taken: suggest next free port, prompt user interactively (readline), start there if accepted
  • Simplify EADDRINUSE catch block in BacklogServer.start() (UX handled upstream in CLI)
  • Unit tests for port helpers (5 cases, including 2 error/edge cases)

Test plan

  • bun test src/test/server-port.test.ts passes (5/5)
  • bun test — no new failures (1244 pass, 2 skip, 4 pre-existing fail)
  • bunx tsc --noEmit passes
  • bun run check . passes

lenucksi added 4 commits May 13, 2026 19:53
Add isPortAvailable() and findNextAvailablePort() to server/index.ts,
pre-check port in CLI browser command, prompt user to start on next
free port if taken. Simplify EADDRINUSE catch (UX now in CLI).
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