refactor(terminal-connection): streamline auto-connection logic and improve component readiness checks

This commit is contained in:
Andras Bacsai
2025-06-06 21:34:27 +02:00
parent ba970d909c
commit 7df6890920
2 changed files with 17 additions and 27 deletions

View File

@@ -168,11 +168,10 @@ class ExecuteContainerCommand extends Component
$this->connectionStatus = 'Waiting for terminal to be ready...';
}
#[On('initializeTerminalConnection')]
public function initializeTerminalConnection()
{
// Only auto-connect if containers are loaded and we haven't attempted before
if (! $this->containersLoaded || $this->autoConnectAttempted) {
if (! $this->containersLoaded || $this->autoConnectAttempted || $this->isConnecting) {
return;
}