fix: prevent Livewire snapshot error in database restore modal

Wrap ActivityMonitor components in wire:ignore to prevent parent component
re-renders from destroying the Livewire component and causing "Snapshot missing"
errors in production mode.

The issue occurred when toggling the "Backup includes all databases" checkbox
during database restore operations. The checkbox uses wire:model.live which
triggers immediate parent re-renders, destroying the nested ActivityMonitor
component in the slide-over.

Changes:
- Wrap ActivityMonitor in wire:ignore div in import.blade.php
- Apply same fix preventatively to heading.blade.php

wire:ignore prevents Livewire from re-rendering the DOM inside the wrapper,
while still allowing event listeners and Alpine.js functionality to work
correctly. The existing reset logic (slideOverClosed event) continues to
function properly.

Fixes #7335

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai 2025-11-28 09:21:32 +01:00
parent 93771b9611
commit eda0d13399
2 changed files with 6 additions and 2 deletions

View file

@ -3,7 +3,9 @@
<x-slide-over @startdatabase.window="slideOverOpen = true" closeWithX fullScreen>
<x-slot:title>Database Startup</x-slot:title>
<x-slot:content>
<livewire:activity-monitor header="Logs" fullHeight />
<div wire:ignore>
<livewire:activity-monitor header="Logs" fullHeight />
</div>
</x-slot:content>
</x-slide-over>
<div class="navbar-main">

View file

@ -225,7 +225,9 @@ class="flex-1 p-6 border-2 rounded-sm cursor-pointer transition-all"
<x-slide-over @databaserestore.window="slideOverOpen = true" closeWithX fullScreen>
<x-slot:title>Database Restore Output</x-slot:title>
<x-slot:content>
<livewire:activity-monitor wire:key="database-restore-{{ $resource->uuid }}" header="Logs" fullHeight />
<div wire:ignore>
<livewire:activity-monitor wire:key="database-restore-{{ $resource->uuid }}" header="Logs" fullHeight />
</div>
</x-slot:content>
</x-slide-over>
@else