Add localhost hint for proxy restart logs

When restarting the proxy on localhost (server id 0), shows a warning
banner in the logs sidebar explaining that the connection may be
temporarily lost and to refresh the browser if logs stop updating.

Also cleans up notification noise by commenting out intermediate
status notifications (restarting, starting, stopping) that were
redundant with the visual status indicators.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai 2025-12-03 16:33:33 +01:00
parent 387a093f04
commit d53a12182e
2 changed files with 11 additions and 4 deletions

View file

@ -75,7 +75,7 @@ public function restart()
// Always use background job for all servers
RestartProxyJob::dispatch($this->server);
$this->dispatch('info', 'Proxy restart initiated.');
// $this->dispatch('info', 'Proxy restart initiated.');
// Reset the flag after a short delay to allow future restarts
$this->restartInitiated = false;
@ -171,15 +171,15 @@ public function showNotification($event = null)
}
break;
case 'stopping':
$this->dispatch('info', 'Proxy is stopping.');
// $this->dispatch('info', 'Proxy is stopping.');
$this->lastNotifiedStatus = $this->proxyStatus;
break;
case 'starting':
$this->dispatch('info', 'Proxy is starting.');
// $this->dispatch('info', 'Proxy is starting.');
$this->lastNotifiedStatus = $this->proxyStatus;
break;
case 'restarting':
$this->dispatch('info', 'Proxy is restarting.');
// $this->dispatch('info', 'Proxy is restarting.');
$this->lastNotifiedStatus = $this->proxyStatus;
break;
case 'error':

View file

@ -2,6 +2,13 @@
<x-slide-over @startproxy.window="slideOverOpen = true" fullScreen closeWithX>
<x-slot:title>Proxy Startup Logs</x-slot:title>
<x-slot:content>
@if ($server->id === 0)
<div class="mb-4 p-3 text-sm bg-warning/10 border border-warning/30 rounded-lg text-warning">
<span class="font-semibold">Note:</span> This is the localhost server where Coolify runs.
During proxy restart, the connection may be temporarily lost.
If logs stop updating, please refresh the browser after a few minutes.
</div>
@endif
<livewire:activity-monitor header="Logs" fullHeight />
</x-slot:content>
</x-slide-over>