Skip to content

First-run UX: benchpod setup, readable status, login email, refusal hints - #22

Merged
wardviaene merged 1 commit into
mainfrom
first-run-ux
Oct 9, 2026
Merged

wardviaene merged 1 commit into
mainfrom
first-run-ux

Conversation

@wardviaene

@wardviaene wardviaene commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Summary

  • benchpod setup (new): guided first-time setup following the getting-started guide, skipping finished steps: find the pod (USB + mDNS, or --connection), network (Ethernet lease wait or Wi-Fi via the set-wifi path), board I/O voltage, embeddedci.com (login + register an unregistered pod; names it when it is on your account; explains and leaves alone a pod on another account), save the connection, next steps (SWD on LA11/LA12, benchpod flash, pytest, docs). Flags: --la-voltage, --ssid, --password-stdin, --no-register, --yes (never prompts; fails naming the flag to pass). Step logic is unit-tested with a fake environment.
  • I/O voltage saved to the wiring profile: the pod forgets its LA voltage on a restart, and the web checklist kept "I/O voltage" open. When this machine is signed in and the pod is registered to that account, setup step 3 also saves la_mv (1800/3300) to the pod's stored wiring profile on embeddedci.com, so the server re-applies it on every connect and the checklist ticks. The server's PUT /api/benchpod/devices/{id}/wiring replaces the whole map, so this is a read-modify-write that keeps every other field byte-for-byte (serverapi.GetDeviceWiring, PutDeviceWiring, SetDeviceWiringLaMV; no PUT when the profile already has the value). It also saves when the pod already had the voltage but the profile has none or another one, and right after setup registers a pod. A failed save warns and setup goes on. benchpod la voltage <v> does the same over the network or an embeddedci: connection (not over USB).
  • benchpod status: readable summary over the network (firmware + latest release from GitHub's redirect, 3 s budget, skipped on failure; gateware; I/O voltage or "not set"; target power from target_status; network; cloud registration and account check reusing discover's; lease). --json prints the raw reply. USB keeps the console text.
  • benchpod login: prints the account email (Logged in as you@x.com, Already logged in as ...). Email added to serverapi.TokenResponse and authstore.Tokens, kept across refreshes from an older server; falls back to the user id. Needs the server PR that adds email to the device token and refresh responses.
  • Refusal hints: la voltage not set now points at benchpod la voltage 3.3V (or 1.8V) or the web Wiring tab. In pin conflict: LAn is in use by X; <hint>, the raw-JSON hints (gpio, sensor_stop, spi_stop, gps_stop) and the uart/SWD ones are reworded to say where to free the pin. The CLI has no command that frees them, so the hint names the web app / SDK / MCP. Unknown hints are shown unchanged. All texts are pinned in internal/fwrefusals/refusals.json against firmware origin/main.
  • "no connection set" suggests benchpod discover --save (and setup) first.
  • Root help rewritten to match the code, with commands grouped (Setup / The pod / The target / embeddedci.com). The main.go doc comment is fixed too.
  • discover/setup now match a dual-homed pod (Ethernet + Wi-Fi) by cloud device id. Before this, baea06 showed up as 2 pods: USB reported .220 and mDNS answered on .221.
  • README documents setup, status --json and the login output.

Test plan

  • go test ./... and go vet ./... (fwrefusals run with BENCHPOD_FIRMWARE_DIR set to an origin/main export; the sibling benchpod-firmware checkout is 104 commits behind and fails the pinned-text check even on main)
  • HW (benchpod-baea06, under podlock): discover, status, status --json, setup --la-voltage 3.3V --yes, setup --connection usb, setup --connection 192.168.1.221 --yes. Everything was detected as done and only the LA voltage was (re)set to 3.3 V. No wifi, register or flash.
  • HW, profile save (baea06, under podlock, LAN .220): stored wiring before {"uart_rx":3}; setup --la-voltage 3.3V --yes printed "Set to 3.3 V on the pod and saved to its wiring profile on embeddedci.com."; after {"la_mv":3300,"uart_rx":3} (only la_mv changed). A second run printed "its wiring profile on embeddedci.com already has it"; without --la-voltage it printed "Done: already 3.3 V.". Profile reset to {"uart_rx":3}, then la voltage 3.3V saved it again ("Saved to the pod's wiring profile on embeddedci.com"). Left at la_mv 3300.
  • Refresh the embeddedci.com CLI docs snapshot (BENCHPOD_DOCS_TREE=.../cli.json go test ./cmd/benchpod-cli -run TestDocsCommandTree) in embeddedci-server

🤖 Generated with Claude Code

…ints

- New `benchpod setup`: guided first-time setup that walks the getting-started
  steps and skips what is done (find over USB + mDNS, Ethernet lease or Wi-Fi,
  board I/O voltage, register / account check, save the connection, next
  steps). Flags --la-voltage, --ssid, --password-stdin, --no-register, --yes.
- `benchpod status` prints a short summary over the network (firmware and
  latest release, gateware, I/O voltage, target power, network, cloud and
  account, lease); --json keeps the raw reply.
- `benchpod login` prints the account email (Email in the token response and
  token file), falling back to the user id for older servers/token files.
- "la voltage not set" points at `benchpod la voltage 3.3V` / the Wiring tab;
  pin-conflict hints with raw JSON are reworded (texts pinned in fwrefusals).
- "no connection set" suggests `benchpod discover --save` first.
- Root help: accurate USB/network split, commands grouped (setup, pod,
  target, embeddedci.com).
- discover/setup match a pod on Ethernet and Wi-Fi at once by cloud device id.
- README documents setup, status --json and the login output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wardviaene
wardviaene merged commit 58eaadf into main Oct 9, 2026
2 checks passed
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.

1 participant