Summary
The PnP flow's buildSteps logic had incorrect saveChanges timing for the AutoParent scenario, and the flow control logic didn't properly handle AutoParent after saving.
Problem
In commit 436483bc (Release 1.2.12), when adding AutoParent support:
1. buildSteps saveChanges bug
// Bug: `? null : null` always returns null, WiFi steps never trigger saving
PersonalWiFiStep(saveChanges: !isGuestWiFiSupport && !isNightModeSupport ? null : null),
GuestWiFiStep(saveChanges: !isNightModeSupport ? null : null),
NightModeStep(saveChanges: null),
YourNetworkStep(saveChanges: _saveChanges), // All saving delayed to here
2. Flow control used isUnconfigured instead of showYourNetwork
_saveChanges whenComplete: AutoParent (isUnconfigured=false) skipped YourNetwork
_showNeedReconnect: Same issue after WiFi reconnection
onLastStep: Triggered duplicate saving for AutoParent
Fix
buildSteps
Align AutoParent with Unconfigured - save at last WiFi step before YourNetwork:
PersonalWiFiStep(saveChanges: !isGuestWiFiSupport && !isNightModeSupport ? _saveChanges : null),
GuestWiFiStep(saveChanges: !isNightModeSupport ? _saveChanges : null),
NightModeStep(saveChanges: _saveChanges),
YourNetworkStep(saveChanges: _confirmAddedNodes),
Flow control
Replace isUnconfigured with showYourNetwork (isUnconfigured || !isPrePaired) in:
_saveChanges whenComplete
_showNeedReconnect reconnect handler
onLastStep condition
UI improvement
Wrap Auto Master connection error view with AppCard and maxWidth constraint for better readability.
Related
Summary
The PnP flow's
buildStepslogic had incorrectsaveChangestiming for the AutoParent scenario, and the flow control logic didn't properly handle AutoParent after saving.Problem
In commit
436483bc(Release 1.2.12), when adding AutoParent support:1. buildSteps saveChanges bug
2. Flow control used isUnconfigured instead of showYourNetwork
_saveChangeswhenComplete: AutoParent (isUnconfigured=false) skipped YourNetwork_showNeedReconnect: Same issue after WiFi reconnectiononLastStep: Triggered duplicate saving for AutoParentFix
buildSteps
Align AutoParent with Unconfigured - save at last WiFi step before YourNetwork:
Flow control
Replace
isUnconfiguredwithshowYourNetwork(isUnconfigured || !isPrePaired) in:_saveChangeswhenComplete_showNeedReconnectreconnect handleronLastStepconditionUI improvement
Wrap Auto Master connection error view with AppCard and maxWidth constraint for better readability.
Related