From e0447c551ad4260b92fdb31c7c6865957428cc4b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Apr 2026 01:38:04 +0000 Subject: [PATCH 1/2] Initial plan From c139496af948bf89ed16f329fced4e6bdc7cc024 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Apr 2026 01:40:43 +0000 Subject: [PATCH 2/2] fix: clear stale rebuild log before new rebuild and delay first poll Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/eee95839-bfd2-4733-9799-a034178bcdd6 Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> --- app/sovran_systemsos_web/server.py | 6 ++++++ app/sovran_systemsos_web/static/app.js | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/sovran_systemsos_web/server.py b/app/sovran_systemsos_web/server.py index 58d88c2..9695032 100644 --- a/app/sovran_systemsos_web/server.py +++ b/app/sovran_systemsos_web/server.py @@ -950,6 +950,12 @@ async def api_features_toggle(req: FeatureToggleRequest): await loop.run_in_executor(None, _write_hub_overrides, features, nostr_npub) + # Clear the old rebuild log so the frontend doesn't pick up stale results + try: + open(REBUILD_LOG, "w").close() + except OSError: + pass + # Start the rebuild service await asyncio.create_subprocess_exec( "systemctl", "reset-failed", REBUILD_UNIT, diff --git a/app/sovran_systemsos_web/static/app.js b/app/sovran_systemsos_web/static/app.js index ddcd132..d3d93ef 100644 --- a/app/sovran_systemsos_web/static/app.js +++ b/app/sovran_systemsos_web/static/app.js @@ -543,7 +543,8 @@ function openRebuildModal() { if ($rebuildSave) $rebuildSave.style.display = "none"; if ($rebuildClose) $rebuildClose.disabled = true; $rebuildModal.classList.add("open"); - startRebuildPoll(); + // Delay first poll slightly to let the rebuild service start and clear stale log + setTimeout(startRebuildPoll, 1500); } function closeRebuildModal() {