@@ -119,10 +119,7 @@ const errors = {
119119 } ,
120120}
121121
122- if ( isLinux ) {
123- // this is likely in StepCode.CONNECTING
124- errors [ ErrorCode . LOST_CONNECTION ] . description += ' Did you forget to unbind the device from qcserial?'
125- }
122+ // Note: qcserial unbind hint is added dynamically in the component based on device type
126123
127124
128125function LinearProgress ( { value, barColor } ) {
@@ -307,15 +304,21 @@ function ConnectInstructions({ deviceType, onNext }) {
307304
308305 < ol className = "text-left space-y-3 text-lg dark:text-white" >
309306 < li className = "flex gap-3" >
310- < span className = "flex-shrink-0 w-7 h-7 rounded-full bg-[#51ff00] text-black flex items-center justify-center font-bold text-sm" > 1 </ span >
311- < span > Unplug the device and wait for the LED to switch off </ span >
307+ < span className = "flex-shrink-0 w-7 h-7 rounded-full bg-[#51ff00] text-black flex items-center justify-center font-bold text-sm" > a </ span >
308+ < span > Unplug the device</ span >
312309 </ li >
310+ { ! isCommaFour && (
311+ < li className = "flex gap-3" >
312+ < span className = "flex-shrink-0 w-7 h-7 rounded-full bg-[#51ff00] text-black flex items-center justify-center font-bold text-sm" > b</ span >
313+ < span > Wait for the light on the back to fully turn off</ span >
314+ </ li >
315+ ) }
313316 < li className = "flex gap-3" >
314- < span className = "flex-shrink-0 w-7 h-7 rounded-full bg-[#51ff00] text-black flex items-center justify-center font-bold text-sm" > 2 </ span >
317+ < span className = "flex-shrink-0 w-7 h-7 rounded-full bg-[#51ff00] text-black flex items-center justify-center font-bold text-sm" > { isCommaFour ? 'b' : 'c' } </ span >
315318 < span > Connect the < strong > { isCommaFour ? 'right' : 'lower' } </ strong > USB-C port < strong > (port 1)</ strong > to your computer</ span >
316319 </ li >
317320 < li className = "flex gap-3" >
318- < span className = "flex-shrink-0 w-7 h-7 rounded-full bg-[#51ff00] text-black flex items-center justify-center font-bold text-sm" > 3 </ span >
321+ < span className = "flex-shrink-0 w-7 h-7 rounded-full bg-[#51ff00] text-black flex items-center justify-center font-bold text-sm" > { isCommaFour ? 'c' : 'd' } </ span >
319322 < span > Connect power to the < strong > { isCommaFour ? 'left' : 'upper' } </ strong > port < strong > (port 2)</ strong > </ span >
320323 </ li >
321324 </ ol >
@@ -489,6 +492,14 @@ export default function Flash() {
489492 } )
490493 } , [ config , imageManager . current ] )
491494
495+ // Transition to flash screen when connected
496+ useEffect ( ( ) => {
497+ if ( connected && ( wizardScreen === 'connect' || wizardScreen === 'unbind' ) ) {
498+ setWizardScreen ( 'flash' )
499+ setWizardStep ( getStepIndex ( 'Flash' ) )
500+ }
501+ } , [ connected , wizardScreen ] )
502+
492503 // Handle user clicking start on landing page
493504 const handleStart = ( ) => {
494505 setStep ( StepCode . DEVICE_PICKER )
@@ -521,17 +532,14 @@ export default function Flash() {
521532 setWizardScreen ( 'unbind' )
522533 setWizardStep ( getStepIndex ( 'Unbind' ) )
523534 } else {
524- // Go directly to flash (show WebUSB picker)
525- setWizardScreen ( 'flash' )
526- setWizardStep ( getStepIndex ( 'Flash' ) )
535+ // Start connection - stay on connect screen until connected
527536 qdlManager . current ?. start ( )
528537 }
529538 }
530539
531540 // Handle linux unbind done
532541 const handleUnbindDone = ( ) => {
533- setWizardScreen ( 'flash' )
534- setWizardStep ( getStepIndex ( 'Flash' ) )
542+ // Start connection - stay on unbind screen until connected
535543 qdlManager . current ?. start ( )
536544 }
537545
@@ -603,11 +611,17 @@ export default function Flash() {
603611 )
604612 }
605613
614+
606615 const uiState = steps [ step ] || { }
607616 if ( error ) {
608617 Object . assign ( uiState , errors [ ErrorCode . UNKNOWN ] , errors [ error ] )
609618 }
610- const { status, description, bgColor = 'bg-gray-400' , icon = bolt , iconStyle = 'invert' } = uiState
619+ let { status, description, bgColor = 'bg-gray-400' , icon = bolt , iconStyle = 'invert' } = uiState
620+
621+ // Add qcserial hint for Linux + comma 3/3X only
622+ if ( error === ErrorCode . LOST_CONNECTION && isLinux && selectedDevice === DeviceType . COMMA_3 ) {
623+ description += ' Did you forget to unbind the device from qcserial?'
624+ }
611625
612626 let title
613627 if ( message && ! error ) {
0 commit comments