From 84b5b2d028b8c1b68f346412642d025152485553 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Mar 2026 12:56:11 +0000 Subject: [PATCH] feat: stay on main screen after triggering a deploy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously clicking Deploy redirected to the app detail page. Now the page stays put and immediately flips the deploy badge to "building". The existing 5-second status poller advances both the deploy badge (building → success/failed) and the container badge (→ running) without any manual refresh. https://claude.ai/code/session_01FKCW3FDjNFj6jve4niMFXH --- server/src/routes/ui.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/server/src/routes/ui.rs b/server/src/routes/ui.rs index 6857f7e..356c40f 100644 --- a/server/src/routes/ui.rs +++ b/server/src/routes/ui.rs @@ -278,8 +278,16 @@ pub async fn index(State(s): State) -> Result, StatusCode async function deploy(id) {{ if (!confirm('Deploy ' + id + ' now?')) return; const r = await fetch('/api/apps/' + id + '/deploy', {{method: 'POST'}}); - if (r.ok) window.location.href = '/apps/' + id; - else alert('Error: ' + await r.text()); + if (r.ok) {{ + // Immediately show building; the 5 s poller will advance to the final status. + const row = document.querySelector(`tr[data-id="${{id}}"]`); + if (row) {{ + const db = row.querySelector('[data-deploy-badge]'); + if (db) db.innerHTML = deployBadgeHtml('building'); + }} + }} else {{ + alert('Error: ' + await r.text()); + }} }} async function del(id) {{ if (!confirm('Delete app "' + id + '"? This cannot be undone.')) return;