coolify/app/Livewire/Project/Shared
Andras Bacsai f77ad4cbd9 Complete Livewire legacy model binding migration (25+ components)
This completes the migration from Livewire's legacy `id="model.property"`
pattern to explicit properties with manual synchronization. This allows
disabling the `legacy_model_binding` feature flag.

**Components Migrated (Final Session - 9 components):**
- Server/Proxy.php (1 field)
- Service/EditDomain.php (1 field) - Fixed Collection/string bug & parent sync
- Application/Previews.php (2 fields - array handling)
- Service/EditCompose.php (4 fields)
- Service/FileStorage.php (6 fields)
- Service/Database.php (7 fields)
- Service/ServiceApplicationView.php (10 fields)
- Application/General.php (53 fields) - LARGEST migration
- Application/PreviewsCompose.php (1 field)

**Total Migration Summary:**
- 25+ components migrated across all phases
- 150+ explicit properties added
- 0 legacy bindings remaining (verified via grep)
- All wire:model, id, @entangle bindings updated
- All updater hooks renamed (updatedApplicationX → updatedX)

**Technical Changes:**
- Added explicit public properties (camelCase)
- Implemented syncData(bool $toModel) bidirectional sync
- Updated validation rules (removed model. prefix)
- Updated all action methods (mount, submit, instantSave)
- Fixed updater hooks: updatedBuildPack, updatedBaseDirectory, updatedIsStatic
- Updated Blade views (id & wire:model bindings)
- Applied Collection/string confusion fixes
- Added model refresh + re-sync pattern

**Critical Fixes:**
- EditDomain.php Collection/string confusion (use intermediate variables)
- EditDomain.php parent component sync (refresh + re-sync after save)
- General.php domain field empty (syncData at end of mount)
- General.php wire:model bindings (application.* → property)
- General.php updater hooks (wrong naming convention)

**Files Modified:** 34 files
- 17 PHP Livewire components
- 17 Blade view templates
- 1 MIGRATION_REPORT.md (documentation)

**Ready to disable legacy_model_binding flag in config/livewire.php**

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 15:38:59 +02:00
..
EnvironmentVariable fix(environment): clear computed property cache after adding environment variables 2025-10-07 13:57:59 +02:00
ScheduledTask feat(executions): add 'Load All' button to view all logs and implement loadAllLogs method for complete log retrieval 2025-09-15 11:05:29 +02:00
Storages Complete Livewire legacy model binding migration (25+ components) 2025-10-13 15:38:59 +02:00
ConfigurationChecker.php feat(event): introduce ApplicationConfigurationChanged event to handle team-specific configuration updates and broadcast changes 2025-09-22 09:44:30 +02:00
Danger.php feat(auth): enhance authorization checks in Livewire components for resource management 2025-08-26 10:27:38 +02:00
Destination.php refactor(application): enhance application stopping logic to support multiple servers 2025-05-26 21:44:34 +02:00
ExecuteContainerCommand.php feat(domains): implement domain conflict detection and user confirmation modal across application components 2025-08-28 10:52:41 +02:00
GetLogs.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
HealthChecks.php Complete Livewire legacy model binding migration (25+ components) 2025-10-13 15:38:59 +02:00
Logs.php refactor(logs): remove unused methods and debug functionality from Logs.php for cleaner code 2025-06-10 10:48:08 +02:00
Metrics.php Removed debug logging for metrics 2025-09-19 23:28:25 +05:30
ResourceLimits.php Complete Livewire legacy model binding migration (25+ components) 2025-10-13 15:38:59 +02:00
ResourceOperations.php refactor(clone): consolidate application cloning logic into a dedicated function for improved maintainability and readability 2025-09-11 10:38:08 +02:00
Tags.php feat(acl): Change views/backend code to able to use proper ACL's later on. Currently it is not enabled. 2025-08-26 10:27:38 +02:00
Terminal.php refactor(terminal): simplify command construction for SSH execution 2025-07-03 15:48:59 +02:00
UploadConfig.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
Webhooks.php feat(acl): Change views/backend code to able to use proper ACL's later on. Currently it is not enabled. 2025-08-26 10:27:38 +02:00