Repository navigation
setup: point Format Disk and the failed-exchange cleanup at the Blox in use - #7
Merged
Merged
Conversation
…in use SetBloxAuthorizer picks an ip-scoped variant for the exchange and the properties read, but two calls had no twin and always went to the hotspot: bloxFormatDisk -> 10.42.0.1:3500/partition bloxDeleteFulaConfig -> 10.42.0.1:3500/delete-fula-config Reaching this screen with an ?ip was previously only possible from ConnectToExistingBlox, where a re-paired box is usually formatted already. The new LAN step in ConnectToBlox sends first-time setups here, and a first-time box is exactly the one with an unformatted disk -- so Format Disk was a button that did nothing for the users the step was built for, and the cleanup after a failed exchange silently did not run, leaving the box half-claimed. Both take a base URL now, defaulting to the hotspot. The WAP setup listener serves the same mux on the LAN address, so the routes are there. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJyqpFReP1wbz86nsqsoXq
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.
A gap the new LAN step opened up, found in review of #4.
SetBloxAuthorizerchooses an ip-scoped variant for the exchange (exchangeConfigAtIp) and the properties read (getBloxPropertiesAtIp), but two calls had no twin and always went to the hotspot:Reaching this screen with an
?ipused to be possible only fromConnectToExistingBlox— re-pairing a box that is usually formatted already, so the gap stayed hidden. The LAN step added in #4 sends first-time setups here, and a first-time box is precisely the one with an unformatted disk. So:bloxFreeSpace.size === 0, then posts to an address that is unreachable from a home network.Both functions now take a base URL, defaulting to
API_URLso the hotspot and BLE paths are untouched. The WAP setup listener serves the same mux on the LAN address (functionland/go-fula#248), so/partitionand/delete-fula-configare there.Coverage
New test drives the LAN path into both: a failed exchange must call
bloxDeleteFulaConfig('http://10.0.0.2:3500'), and Format Disk must callbloxFormatDisk('http://10.0.0.2:3500'). The existing hotspot tests now assert the argument isAPI_URLrather than just "was called", and the LAN flow test asserts neither fires on the happy path. 810/810,tsc --noEmitandeslintgreen.Known, not fixed here
goBackreadsisLanSetup ? connectExisting : connectBlox.isLanSetupnow also means "came from ConnectToBlox's LAN step", so a direct load or reload of/setup/set-authorizer?ip=…sends Back to the existing-Blox screen. History-back covers every normal case; both destinations are working setup screens.🤖 Generated with Claude Code
https://claude.ai/code/session_01YJyqpFReP1wbz86nsqsoXq