fix: live progress display + better disconnect resilience #11
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "schwifty/fix-progress-and-reconnect"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What was wrong
No progress shown during provisioning — the assignment sheet displayed
provisioningProgress(a static@Statethat stayed stuck at "Provisioning beacon...") instead ofprovisioner.progress(which has live updates like "Connecting...", "Authenticating...", "Writing config 1/24..."). The check-config sheet already usedprovisioner.progresscorrectly — this was just missed on the provisioning side.Disconnect retries too aggressive — only 2 retries with 2s/3s backoff wasn't enough for flaky DX-Smart BLE. The beacon needs more breathing room between reconnect attempts.
Write timeout timer not cancelled on disconnect — if a disconnect happened mid-write, the 5s write timeout could still fire and cause a double-failure (disconnect handler + timeout handler both trying to fail/retry).
Changes
provisioner.progressinto the assignment sheet (falls back toprovisioningProgressfor pre-BLE steps like "Getting beacon config...")Test plan
- Wire provisioner.progress into assignment sheet UI (was showing static "Provisioning beacon..." instead of live updates like "Connecting...", "Authenticating...", "Writing config 1/24...") - Increase disconnect retries from 2 to 3 with longer backoff (3s/4s/5s) - Cancel write timeout timer on disconnect to prevent double-failure - Bump global timeout from 30s to 45s for extra retry headroom - Improve error message with actionable guidance ("move closer and retry")