diff --git a/resources/views/livewire/project/shared/get-logs.blade.php b/resources/views/livewire/project/shared/get-logs.blade.php
index e05ef34eaa..7b000c8a78 100644
--- a/resources/views/livewire/project/shared/get-logs.blade.php
+++ b/resources/views/livewire/project/shared/get-logs.blade.php
@@ -1,3 +1,4 @@
+
@if (! $canReadLogs)
Container logs can contain secrets.
@@ -315,3 +316,4 @@
@endif
+
diff --git a/tests/Feature/Authorization/TaskAndLogOutputVisibilityTest.php b/tests/Feature/Authorization/TaskAndLogOutputVisibilityTest.php
index eb51d9c4b3..891711458b 100644
--- a/tests/Feature/Authorization/TaskAndLogOutputVisibilityTest.php
+++ b/tests/Feature/Authorization/TaskAndLogOutputVisibilityTest.php
@@ -136,3 +136,16 @@ it('shows task commands and task output to an owner in the ui', function () {
Livewire::test(GetLogs::class, ['server' => $this->server, 'resource' => $this->application, 'container' => 'app-container'])
->assertDontSee('Hidden (only admins can view)');
});
+
+it('renders logs inside one root element so the parent can re-render it', function (string $role) {
+ $this->actingAs($role === 'owner' ? $this->owner : $this->member);
+ session(['currentTeam' => $this->team]);
+
+ $html = Livewire::test(GetLogs::class, ['server' => $this->server, 'resource' => $this->application, 'container' => 'app-container'])
+ ->html();
+
+ // Livewire reuses the first tag name as the placeholder for kept children; a leading comment gives an empty tag.
+ preg_match('/<([a-zA-Z0-9\-]*)/', $html, $matches);
+
+ expect($matches[1])->toBe('div');
+})->with(['owner', 'member']);