From a11ddb82a6550ea13c379d0ca29defb14c3dc53b Mon Sep 17 00:00:00 2001 From: Chaim Date: Mon, 30 Mar 2026 09:02:11 +0000 Subject: [PATCH] fix: sync now resets installed_version when extension removed from server - Backend: sync_customer_extensions now sets installed_version=NULL when extension is missing_on_server (previously only detected drift without updating DB) - Frontend: refresh button now calls /sync endpoint before reloading, ensuring the dashboard reflects actual server state Co-Authored-By: Claude Opus 4.6 (1M context) --- dashboard/src/App.jsx | 22 ++++++++++++++++++---- server.py | 6 ++++++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/dashboard/src/App.jsx b/dashboard/src/App.jsx index a88bbb2..badf7ab 100644 --- a/dashboard/src/App.jsx +++ b/dashboard/src/App.jsx @@ -204,6 +204,20 @@ function CustomerDetail({ customerId }) { const [selected, setSelected] = useState(new Set()) const [batchDeploying, setBatchDeploying] = useState(false) const [batchProgress, setBatchProgress] = useState({ current: 0, total: 0, module: '' }) + const [syncing, setSyncing] = useState(false) + + const syncAndReload = async () => { + setSyncing(true) + setDeployResult(null) + try { + await fetch('/sync', { + method: 'POST', headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ customer_id: customerId }) + }) + } catch (_) {} + reload() + setSyncing(false) + } if (!customer) return @@ -311,10 +325,10 @@ function CustomerDetail({ customerId }) {

{customer.name}

{customer.espocrm_url}

-