fix: Fix tab reload/state loss whenever moving them to the rigbht
This commit is contained in:
@@ -720,6 +720,9 @@ export const Terminal = forwardRef<TerminalHandle, SSHTerminalProps>(
|
||||
setVisible(true);
|
||||
|
||||
return () => {
|
||||
console.log(
|
||||
`🔴 Terminal UNMOUNTING - this should NOT happen during drag!`,
|
||||
);
|
||||
isUnmountingRef.current = true;
|
||||
shouldNotReconnectRef.current = true;
|
||||
isReconnectingRef.current = false;
|
||||
@@ -742,10 +745,21 @@ export const Terminal = forwardRef<TerminalHandle, SSHTerminalProps>(
|
||||
}, [xtermRef, terminal]);
|
||||
|
||||
useEffect(() => {
|
||||
console.log(`📡 Terminal connection useEffect triggered:`, {
|
||||
terminal: !!terminal,
|
||||
hostConfig: !!hostConfig,
|
||||
visible,
|
||||
isConnected,
|
||||
isConnecting,
|
||||
});
|
||||
|
||||
if (!terminal || !hostConfig || !visible) return;
|
||||
|
||||
if (isConnected || isConnecting) return;
|
||||
|
||||
console.log(
|
||||
`🔌 Initiating NEW connection - this should only happen on mount!`,
|
||||
);
|
||||
setIsConnecting(true);
|
||||
|
||||
const readyFonts =
|
||||
|
||||
Reference in New Issue
Block a user