From 13a9816770d3bd17f5e9ff212d87f7b733d462e3 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Thu, 3 Jul 2025 15:08:13 +0200 Subject: [PATCH] fix(service): ensure configuration changes are properly tracked and dispatched --- app/Actions/Service/StartService.php | 1 + app/Livewire/Project/Service/Heading.php | 2 +- app/Livewire/Project/Shared/EnvironmentVariable/Show.php | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Actions/Service/StartService.php b/app/Actions/Service/StartService.php index d48594e62..dfef6a566 100644 --- a/app/Actions/Service/StartService.php +++ b/app/Actions/Service/StartService.php @@ -19,6 +19,7 @@ class StartService StopService::run(service: $service, dockerCleanup: false); } $service->saveComposeConfigs(); + $service->isConfigurationChanged(save: true); $commands[] = 'cd '.$service->workdir(); $commands[] = "echo 'Saved configuration files to {$service->workdir()}.'"; if ($pullLatestImages) { diff --git a/app/Livewire/Project/Service/Heading.php b/app/Livewire/Project/Service/Heading.php index d78fbe9ed..3492da324 100644 --- a/app/Livewire/Project/Service/Heading.php +++ b/app/Livewire/Project/Service/Heading.php @@ -63,7 +63,7 @@ class Heading extends Component $this->service->databases->each(function ($database) { $database->refresh(); }); - if (is_null($this->service->config_hash) || $this->service->isConfigurationChanged()) { + if (is_null($this->service->config_hash)) { $this->service->isConfigurationChanged(true); } $this->dispatch('configurationChanged'); diff --git a/app/Livewire/Project/Shared/EnvironmentVariable/Show.php b/app/Livewire/Project/Shared/EnvironmentVariable/Show.php index 535ac6c67..966d626b1 100644 --- a/app/Livewire/Project/Shared/EnvironmentVariable/Show.php +++ b/app/Livewire/Project/Shared/EnvironmentVariable/Show.php @@ -170,6 +170,7 @@ class Show extends Component $this->syncData(true); $this->dispatch('success', 'Environment variable updated.'); $this->dispatch('envsUpdated'); + $this->dispatch('configurationChanged'); } catch (\Exception $e) { return handleError($e); }