Repository navigation
feat: status-bar polish — window fit, client telemetry, async LAN rebind, loopback default - #93
Merged
Merged
Conversation
added 5 commits
November 3, 2026 17:16
The bind route handler runs on the uvicorn thread, so a synchronous rebind() had stop() join the current thread (RuntimeError) — and a server cannot release its port while still serving the request that asked for the rebind. The route now answers 'rebinding' immediately and a worker thread performs the rebind after the response, emitting BIND_CHANGED / BIND_CHANGE_FAILED. The UI polls /api/system for the actual outcome instead of trusting an instant refetch.
--host now defaults to 127.0.0.1: the status-bar LAN toggle makes LAN exposure a one-click opt-in, so serving the network by default is no longer justified. --host 0.0.0.0 pre-enables LAN for headless launches. BackgroundServer's own default flips too (safe at every layer), and the server-only banner advertises Network URLs only when the bind exposes them. Spec amended with a dated revision; guides + CHANGELOG updated.
New CopyableUrl component (monospace URL + icon-only copy button with success/error callbacks); ConfirmDialog.message now accepts a ReactNode so the LAN dialog can embed the URL rows. Clipboard feedback follows the existing path/filename copy toasts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #92 (LAN serving): make the window fit the enlarged status bar, log web-client activity to the application logger, fix the LAN toggle (which could never work through the HTTP route), and flip the default bind to loopback-only now that LAN is a one-click opt-in.
Window geometry
min_size800×500 → 1000×500 — the status bar with the LAN toggle needs ~1050px.Client connection telemetry (
profiles.log)WEB_CLIENT event="reconnected"/event="disconnected": idle-threshold sweep (120 s — above the ~60 s browser background-tab throttle — checked every 15 s by a lifespan watchdog).BIND_CHANGED(INFO) on a successful rebind,BIND_CHANGE_FAILED(WARNING) on failure + revert — no silent failures.docs/operations/log-format.mdcatalogue gains the missingWEB_CLIENTrow plus the two bind rows.Fix: LAN toggle (RuntimeError on rebind)
rebind()→stop()→self._thread.join()joined the current thread (RuntimeError, HTTP 500). A synchronous in-request rebind is structurally impossible anyway — the old server cannot release its port while serving the request that asked for the rebind.POST /api/system/bindnow answers{"status": "rebinding"}immediately; a worker thread rebinds after the response is flushed (revert-on-failure untouched); the UI pollsGET /api/systemfor the real outcome (~1 s) and toasts accordingly.Loopback-only by default
--host/ProFileApp/BackgroundServerall default to127.0.0.1;--host 0.0.0.0pre-enables LAN for headless launches, or use the status-bar toggle at runtime.Network:URLs only when the bind actually exposes them.2026-11-03-lan-serving-design.md) amended with a dated revision; network-server-guide EN/FR and CHANGELOG updated.Web UX
CopyableUrlcomponent;ConfirmDialog.messagenow accepts aReactNode.Verification
pytest: 1383 passed, failing set a strict subset of the Windows baseline (68 vs 70 — the loopback default fixed 2 pre-existing failures); coverage gate 87.55% ≥ 85%.vitest177/177,tsc -bclean,dist/rebuilt.BackgroundServer+ real HTTP POST); banner, sweep, and dialog tests added.