coolify/app/Livewire/Project
Andras Bacsai aa18c48823 fix: resolve uncloseable database restore modal on MariaDB import (#7335)
Fixes the "Snapshot missing on Livewire component" error that occurs when
toggling the "Backup includes all databases" checkbox during MariaDB database
import operations.

Root Cause:
- ActivityMonitor component was initialized without proper lifecycle hooks
- When parent Import component re-rendered (via checkbox toggle), the
  ActivityMonitor's Livewire snapshot became stale
- Missing null checks caused errors when querying with undefined activityId
- No state cleanup when slide-over closed, causing issues on subsequent opens

Changes:
- Add updatedActivityId() lifecycle hook to ActivityMonitor for proper hydration
- Add defensive null check in hydrateActivity() to prevent query errors
- Track activityId in Import component for state management
- Add slideOverClosed event dispatch in slide-over component
- Add event listener in Import component to reset activityId on close

Testing:
- Manually verify checkbox toggle doesn't trigger popup
- Verify actual restore operations work correctly
- Test both file-based and S3-based restore methods
- Ensure X button properly closes the modal
- Verify no console errors or Livewire warnings

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 10:43:07 +01:00
..
Application fix: normalize preview paths and use BUILD_TIME_ENV_PATH constant 2025-11-18 14:54:21 +01:00
Database fix: resolve uncloseable database restore modal on MariaDB import (#7335) 2025-11-26 10:43:07 +01:00
New feat: display service logos in original colors with consistent sizing 2025-10-24 10:22:33 +02:00
Resource fix: enable docker network connection for pgadmin service 2025-10-13 14:13:40 +02:00
Service Merge branch 'next' into port-detection-lol 2025-11-11 11:21:26 +01:00
Shared feat: add environment variable autocomplete component 2025-11-19 10:54:19 +01:00
AddEmpty.php fix(project): update redirect logic after resource creation to include environment UUID 2025-10-07 20:46:32 +02:00
CloneMe.php fix(clone): update destinations method call to ensure correct retrieval of selected destination 2025-09-18 13:44:56 +02:00
DeleteEnvironment.php feat(auth): enhance authorization checks in Livewire components for resource management 2025-08-26 10:27:38 +02:00
DeleteProject.php feat(auth): enhance authorization checks in Livewire components for resource management 2025-08-26 10:27:38 +02:00
Edit.php feat(validation): centralize validation patterns for names and descriptions 2025-08-19 12:14:48 +02:00
EnvironmentEdit.php feat(validation): centralize validation patterns for names and descriptions 2025-08-19 12:14:48 +02:00
Index.php refactor: simplify project data retrieval and enhance OAuth settings handling 2025-10-27 17:03:19 +01:00
Show.php feat(validation): centralize validation patterns for names and descriptions 2025-08-19 12:14:48 +02:00