Problem
electron/wait-and-launch.mjs reads process.env.VITE_DEV_SERVER_PORT directly when deciding which Vite URL to wait for before launching Electron.
However, Vite loads .env.local in development. The worktree setup script can write an offset VITE_DEV_SERVER_PORT into .env.local, so npm run dev:electron can end up with Vite serving on an offset port like 4501 while the Electron launcher waits for http://localhost:4500 and times out.
Expected behavior
npm run dev:electron should wait for the same Vite dev server port that Vite resolves from .env.local or another shared configuration source.
Notes
This was raised during review of PR #58. It is related to worktree port offsets, but separate from the native .coding-orchestrator/run.sh added in that PR.
Problem
electron/wait-and-launch.mjsreadsprocess.env.VITE_DEV_SERVER_PORTdirectly when deciding which Vite URL to wait for before launching Electron.However, Vite loads
.env.localin development. The worktree setup script can write an offsetVITE_DEV_SERVER_PORTinto.env.local, sonpm run dev:electroncan end up with Vite serving on an offset port like4501while the Electron launcher waits forhttp://localhost:4500and times out.Expected behavior
npm run dev:electronshould wait for the same Vite dev server port that Vite resolves from.env.localor another shared configuration source.Notes
This was raised during review of PR #58. It is related to worktree port offsets, but separate from the native
.coding-orchestrator/run.shadded in that PR.