From 182df1cb079392173fe98a6633d5eb59698ecb81 Mon Sep 17 00:00:00 2001
From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com>
Date: Fri, 22 May 2026 17:00:08 +0200
Subject: [PATCH] fix(logs): keep stream polling active without collapsible
panel
Move log stream polling off the loading indicator so non-collapsible log panels continue polling while streaming, and cover the behavior with a Livewire feature test.
---
.../livewire/project/shared/get-logs.blade.php | 5 ++++-
tests/Feature/GetLogsCommandInjectionTest.php | 14 ++++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/resources/views/livewire/project/shared/get-logs.blade.php b/resources/views/livewire/project/shared/get-logs.blade.php
index 4ef77081e..230a2c22a 100644
--- a/resources/views/livewire/project/shared/get-logs.blade.php
+++ b/resources/views/livewire/project/shared/get-logs.blade.php
@@ -274,10 +274,13 @@
({{ $pull_request }})
@endif
@if ($streamLogs)
-
+
@endif
@endif
+ @if ($streamLogs)
+
+ @endif
diff --git a/tests/Feature/GetLogsCommandInjectionTest.php b/tests/Feature/GetLogsCommandInjectionTest.php
index c0b17c3bd..db75f7b75 100644
--- a/tests/Feature/GetLogsCommandInjectionTest.php
+++ b/tests/Feature/GetLogsCommandInjectionTest.php
@@ -130,6 +130,20 @@ describe('GetLogs Livewire action validation', function () {
});
});
+describe('GetLogs stream polling', function () {
+ test('streaming logs polls when log panel is not collapsible', function () {
+ Livewire::test(GetLogs::class, [
+ 'server' => $this->server,
+ 'resource' => $this->application,
+ 'container' => 'coolify-sentinel',
+ 'collapsible' => false,
+ ])
+ ->assertDontSeeHtml('wire:poll.2000ms="getLogs(true)"')
+ ->call('toggleStreamLogs')
+ ->assertSeeHtml('wire:poll.2000ms="getLogs(true)"');
+ });
+});
+
describe('GetLogs container name injection payloads are blocked by validation', function () {
test('newline injection payload is rejected', function () {
// The exact PoC payload from the advisory