@@ -30,9 +30,13 @@ export class PhoneIslandController {
3030 //make sure the size is equal to [0,0] when you want to close the phone island, otherwise the size will not close and will generate slowness problems.
3131 if ( h === 0 && w === 0 ) {
3232 window . hide ( )
33+ } else if ( this . isWarmingUp ) {
34+ // During warm-up: force hide even if size changes
35+ Log . info ( `[RESIZE] FORCING HIDE during warm-up (size: ${ w } x${ h } , visible: ${ window . isVisible ( ) } )` )
36+ window . hide ( )
3337 } else {
34- // Don't show window during warm-up
35- if ( ! window . isVisible ( ) && ! this . isWarmingUp ) {
38+ // Normal flow: show if not visible (no logging)
39+ if ( ! window . isVisible ( ) ) {
3640 window . show ( )
3741 window . setAlwaysOnTop ( true )
3842 }
@@ -49,6 +53,12 @@ export class PhoneIslandController {
4953 const window = this . window . getWindow ( )
5054 if ( window ) {
5155
56+ // Block showPhoneIsland during warm-up
57+ if ( this . isWarmingUp ) {
58+ Log . info ( `[SHOW_PHONE_ISLAND] BLOCKED during warm-up (size: ${ size . w } x${ size . h } )` )
59+ return
60+ }
61+
5262 this . resize ( size )
5363 if ( process . platform !== 'linux' ) {
5464 const phoneIslandPosition = AccountController . instance . getAccountPhoneIslandPosition ( )
@@ -178,9 +188,10 @@ export class PhoneIslandController {
178188 try {
179189 const window = this . window . getWindow ( )
180190 if ( window ) {
191+ const wasVisible = window . isVisible ( )
181192 this . isWarmingUp = true
182193 window . hide ( )
183- Log . info ( ' PhoneIsland window hidden' )
194+ Log . info ( `[FORCE_HIDE] PhoneIsland window hidden (was visible: ${ wasVisible } , isWarmingUp now: ${ this . isWarmingUp } )` )
184195 }
185196 } catch ( e ) {
186197 Log . warning ( 'error during force hiding PhoneIsland:' , e )
@@ -194,10 +205,13 @@ export class PhoneIslandController {
194205 this . isWarmingUp = false
195206 // Only show if there's actually content (size > 0)
196207 const bounds = window . getBounds ( )
208+ Log . info ( `[FORCE_SHOW] Attempting to show (isWarmingUp now: ${ this . isWarmingUp } , bounds: ${ bounds . width } x${ bounds . height } )` )
197209 if ( bounds . width > 0 && bounds . height > 0 ) {
198210 window . show ( )
199211 window . setAlwaysOnTop ( true )
200- Log . info ( 'PhoneIsland window shown' )
212+ Log . info ( '[FORCE_SHOW] PhoneIsland window shown' )
213+ } else {
214+ Log . info ( '[FORCE_SHOW] Not showing - no content (size is 0)' )
201215 }
202216 }
203217 } catch ( e ) {
0 commit comments