Repository navigation
setup: offer the LAN address as a last resort before the hotspot - #4
Merged
Merged
Conversation
ConnectToBlox asked three technical questions at once. It now asks one at a
time, in the order that needs least from the user:
bluetooth no cables, no addresses, no network - just Chrome's chooser.
lan only after Bluetooth failed. Needs the Blox on the network AND
its address, so it is offered rather than assumed; "I don't know
the address" moves on.
hotspot the always-works fallback. It costs the user their internet for a
minute, which is why it is last rather than first.
The typed address is checked against the private ranges before any request, so
setup traffic - including the call that CLAIMS the box - can never leave the
local network. An address that simply does not answer reads as "no Blox here",
not as an error: silence is the expected outcome on firmware without the LAN
setup listener and on a Blox that is not on this network, so it must not shout.
Nothing is probed on entering the LAN step. The Bluetooth chooser may have
consumed the user activation Chrome's local-network prompt needs, so the probe
waits for its own button press - the same reason the hotspot check was never
auto-fired after a Bluetooth failure.
The hint under the tower now follows the stage: naming what to pick in the
device chooser while that is the question, and the local-network explainer only
once something is actually about to make a LAN request.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YJyqpFReP1wbz86nsqsoXq
The LAN path was only covered as far as the navigation to SetBloxAuthorizer. It now walks through: the typed address reaches the ip-scoped calls and never the hotspot ones, and the flow goes straight to Setup complete. A Blox already on the home network has no Wi-Fi left to join, and every Wi-Fi endpoint is served only at 10.42.0.1, so routing it through ConnectToWifi would hand the user a step that cannot answer. Also clears mock usage between the two flow tests -- without that the second sees the first one's calls -- and asserts the per-stage hint. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 28, 2026
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.
What
ConnectToBloxasked three technical questions at once — Bluetooth, hotspot, local network access — before the user had answered any of them. It now asks one at a time, in the order that needs least from the user:The LAN step is the new one, and it is a last resort rather than the default: it is offered, not assumed, and "I don't know the address" moves straight on.
Safety
The typed address is checked against the private ranges (
bloxLanUrl→ipIsPrivateLan) before any request is made. Setup traffic includes/peer/exchange, the call that claims the box, so a typo or a pasted public address must never leave the local network.Behaviour worth calling out
10.42.0.1— routing it throughConnectToWifiwould hand the user a step that cannot answer, andCheckConnectionwould tell them to leave a hotspot they never joined. This was alreadySetBloxAuthorizer's behaviour forisLanSetup; it is now covered by a test rather than by inspection.Tests
ConnectToBlox.test.tsx13/13 and a second flow test insetupFlow.test.tsxthat walks the LAN entry point end to end: the typed address reaches only the ip-scoped API calls, never the hotspot ones, and the flow lands on Setup complete withgetWifiListuntouched. The hotspot tests now reach their stage the way a user does (Bluetooth fails → "I don't know the address"). Full suite,tsc --noEmitandeslintare green.Requires
functionland/go-fula#248 for a Blox that acquired its LAN address after boot to be listening at all — and that needs a go-fula release, not just a merge. Until then this step degrades to "no Blox answered" and the user falls through to the hotspot exactly as today.
🤖 Generated with Claude Code
https://claude.ai/code/session_01YJyqpFReP1wbz86nsqsoXq