From 96aceeeaa10a4e5873cc70715bf10b79d6845abf Mon Sep 17 00:00:00 2001 From: nexxo Date: Sat, 25 Jul 2026 13:06:31 +0200 Subject: [PATCH] fix(engine-b): stop customer dashboard polling once provisioning failed Show the failure state but only poll while pending/running/waiting. Co-Authored-By: Claude Opus 4.8 --- app/Livewire/CustomerProvisioning.php | 15 ++++++++++++--- .../livewire/customer-provisioning.blade.php | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/Livewire/CustomerProvisioning.php b/app/Livewire/CustomerProvisioning.php index b96b033..d5dcd9a 100644 --- a/app/Livewire/CustomerProvisioning.php +++ b/app/Livewire/CustomerProvisioning.php @@ -39,12 +39,21 @@ class CustomerProvisioning extends Component public function render() { $run = $this->currentRun(); - $active = $run !== null && $run->status !== ProvisioningRun::STATUS_COMPLETED; + + // Show the card while provisioning is in flight OR terminally failed; but + // only POLL while it can still change (terminal failed must not poll forever). + $show = $run !== null && $run->status !== ProvisioningRun::STATUS_COMPLETED; + $polling = $run !== null && in_array($run->status, [ + ProvisioningRun::STATUS_PENDING, + ProvisioningRun::STATUS_RUNNING, + ProvisioningRun::STATUS_WAITING, + ], true); return view('livewire.customer-provisioning', [ - 'active' => $active, + 'active' => $show, + 'polling' => $polling, 'failed' => $run?->status === ProvisioningRun::STATUS_FAILED, - 'steps' => $active ? $this->buildRunSteps($run) : [], + 'steps' => $show ? $this->buildRunSteps($run) : [], ]); } } diff --git a/resources/views/livewire/customer-provisioning.blade.php b/resources/views/livewire/customer-provisioning.blade.php index 6392a2e..16293af 100644 --- a/resources/views/livewire/customer-provisioning.blade.php +++ b/resources/views/livewire/customer-provisioning.blade.php @@ -1,4 +1,4 @@ -
+
@if ($active)