Files
pipelines/app/notes/browser-network-discovery.md
T

27 lines
1.6 KiB
Markdown

# Browser discovery and machine names
Browser discovery uses the authenticated same-origin `/api/discovery` endpoint,
which browses the hosting server's LAN. Native discovery still uses Bonjour.
Malformed announcements cannot hide valid machines; failed/unsupported discovery
is reported instead of being shown as an empty successful scan. Finite browser
scans stop their progress indicator when the reply arrives.
Add server now includes discovery, prefills an editable machine name/address,
and saves only after explicit review. Onboarding likewise reviews and persists
the discovered name before probing/signing in. Root wires saveServerProfile.
Verification: 34 focused discovery/onboarding/saved-server tests passed, including
name editing, no premature connection, browser errors/duplicates/default ports,
and native discovery regressions. Analyzer clean (NWAPbG), full-app fixture build passed. Material dark
1280px and Cupertino light560px browsercaptures under
/tmp/review/browser-discovery-{material,cupertino} were inspected: discovered
results and editable selected name/address fit. The fixture served controlled
JSON at /api/discovery; actual backend auth/discovery has separate Node/Go tests.
No production deployment or device testing in this commit.
Saved browser server rows no longer offer an exclusive Use action or navigate on
tap. All saved machines connect for chat; primary selection is explicitly for
pipelines/runs on native hosts. A widget regression covers preservation of the
browser's current server identity when another saved machine is tapped. Combined
discovery/settings layout suite: 43 tests passed (out.c7dJ7j).