Skip to content

T-026: first-run device setup — provision WiFi from the app - #29

Merged
Skeyelab merged 2 commits into
mainfrom
feat/t-026-first-run-setup
Jul 16, 2026
Merged

Skeyelab merged 2 commits into
mainfrom
feat/t-026-first-run-setup

Conversation

@Skeyelab

Copy link
Copy Markdown
Member

Meets the "the app sets up my device" first-run expectation. A fresh device is on its own
SoftAP (invisible to LAN discovery); the app now reaches it there, confirms it's ours, and
hands it the user's WiFi — over a partial POST /save that never clobbers other settings.

  • SetupNetwork — setup address (192.168.4.1) + fleet setup SSIDs, prefix-matched like DeviceMatch.
  • KitchenSyncClient.provisionWifi — WiFi-only /save (no full_form).
  • SetupViewModel — search → provision state machine, transport-agnostic for BLE (T-027) later.
  • SetupDeviceView sheet + "Set up a new device" leading the empty state.

11 new tests (real client vs StubURLProtocol); full app suite green. Verified on-device (built
straight onto a phone). Deferred to T-027/notes: NEHotspotConfiguration auto-join + auto-detect.

Closes T-026.
https://claude.ai/code/session_01F7YsQgso3KNpeXbP5vNVj6

…onWifi, SetupViewModel (T-026)

The tested guts of first-run device setup: a fresh device on its SoftAP is reached, confirmed,
and handed the user's WiFi — no LAN discovery involved (which is why it was invisible before).

  SetupNetwork          the fixed setup address (192.168.4.1) + the fleet's setup SSIDs
                        (KitchenSync-Setup / KSTouch-Config), matched as a prefix family like
                        DeviceMatch. For the setup UI + a future NEHotspotConfiguration join.
  KitchenSyncClient     provisionWifi(ssid:password:) — POSTs ONLY the WiFi fields to /save (a
                        partial form, no full_form), so setting a device up can never clobber
                        its other settings.
  SetupViewModel        the flow's decision logic: search (confirm a device answers /config.json
                        on the setup AP) then provision. Transport-agnostic so BLE (T-027) can
                        swap the credential transport without touching the flow.

11 tests, all through the REAL client against StubURLProtocol (setup-AP identity, the partial
/save never sending full_form, the search/provision/blank/failure states).

Also files T-027: BLE provisioning as the smoother premium path (no AP juggling), gated on the
ESP-026 ESP-IDF convergence — SoftAP here stays the baseline + fallback.

Next: the setup screen + the "Set up a new device" entry on the empty discovery state.

Claude-Session: https://claude.ai/code/session_01F7YsQgso3KNpeXbP5vNVj6
…026)

The UI over SetupViewModel: a sheet that searches for a device on its SoftAP, takes the user's
WiFi (SSID + password), hands it over, and closes the loop by pointing them back to their own
network where discovery picks the device up. Phases mirror the tested view model (searching /
no-device-with-join-instructions / form / provisioned). The empty discovery state now leads
with "Set up a new device" (the first-run affordance) with "Add by IP" demoted to secondary —
a fresh device is on its own AP, invisible to Bonjour, so "add by IP" was never the answer.

On-brand with the existing KS design tokens + KSField/KSPowerLED. Full app test suite green.

Claude-Session: https://claude.ai/code/session_01F7YsQgso3KNpeXbP5vNVj6
@Skeyelab
Skeyelab merged commit 4408cfc into main Jul 16, 2026
1 check passed
Skeyelab added a commit that referenced this pull request Jul 17, 2026
Flip status todo->done and record what shipped (SetupNetwork / provisionWifi /
SetupViewModel / "Set up a new device" entry) plus the ESP-044 firmware blocker
found during hardware verification (invisible Super Mini AP).

Claude-Session: https://claude.ai/code/session_01F7YsQgso3KNpeXbP5vNVj6

Co-authored-by: Eric Dahl <edahl@nd.edu>
Skeyelab added a commit that referenced this pull request Aug 23, 2026
T-026: first-run device setup — provision WiFi from the app
Skeyelab added a commit that referenced this pull request Aug 23, 2026
Flip status todo->done and record what shipped (SetupNetwork / provisionWifi /
SetupViewModel / "Set up a new device" entry) plus the ESP-044 firmware blocker
found during hardware verification (invisible Super Mini AP).

Claude-Session: https://claude.ai/code/session_01F7YsQgso3KNpeXbP5vNVj6

Co-authored-by: Eric Dahl <edahl@nd.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants