Issues / #3402
#3402 [GUI] Let user pin the desktop app's port so localhost API clients survive updates
open · @couleurs256 · 0 コメント · GitHub で見る
Server & APIDocumentationWindowsLinux
本文
## Description First: thank you for the "stable window origin" work (fixed preferred port 47831) — it already solved most of my issues. This is a small follow-up on the edge case that remains. **Problem.** I run the Windows desktop app as the OpenAI-compatible endpoint for a local agent; the host port IS the API base URL (`http://127.0.0.1:<port>/v1`). When 47831 is still held by the previous instance during an update, `pick_stable_port()` silently falls back to a random port. Two things break at once: every client config (base URL + key) must be redone by hand, and the window origin changes, so the app's own chat list/settings start empty — which the code comments in `apps/desktop/src-tauri/src/main.rs` already note. **What I'd like** (goal, not implementation): 1. a supported way to pin the host port — a setting, or an env var honored on Windows (`STRATA_WINDOW_PORT` seems to be internal to the Linux window process, and `STRATA_PORT` is overwritten by the launcher); 2. failing that, don't fall back silently: warn and name the process holding 47831, so an API user knows why their URL changed; 3. document port 47831 and the fallback rule (the docs only mention 8080, the Terminal path). **What I do today:** after each update I find the listening port in Strata's serving section. Observed on my Windows 11 machine updating v0.2.0-beta -> v0.2.1: the app stored most sessions on 47831 and one launch on a random port — the update where the old instance still held 47831. Not a deterministic reproduction, just what a normal update did. **Trigger detail:** this happened through the in-app updater (GUI -> update). Since the updater relaunches the app while the previous host may still be draining its engines (and holding 47831), the fresh instance picks a random fallback port on that restart. Closing the app first isn't an option in that flow — the updater drives the quit/relaunch itself. Thanks in advance, the app is awesome!
関連リンク
インストール・モデル・リリースへのサイト内リンク。