The page beforeunload/cleanup fetch that posts run_id to kill running scripts uses fetch(..., keepalive: true) but no timeout or Abort handling. If the backend is unresponsive the promise can hang and the cleanup may fail or block graceful exit. Location: ui/app.js. Steps to reproduce: put backend into unresponsive state and close page; browser may hang or not reliably kill remote run. Expected: cleanup request should be best-effort and not block unload. Suggested fix: use navigator.sendBeacon() for fire-and-forget where appropriate, or wrap fetch with AbortController and a short timeout (1000–2000ms) so the page unload isn't blocked.
@siddu-k Assign me this
The page
beforeunload/cleanup fetch that postsrun_idto kill running scripts usesfetch(..., keepalive: true)but no timeout or Abort handling. If the backend is unresponsive the promise can hang and the cleanup may fail or block graceful exit. Location: ui/app.js. Steps to reproduce: put backend into unresponsive state and close page; browser may hang or not reliably kill remote run. Expected: cleanup request should be best-effort and not block unload. Suggested fix: usenavigator.sendBeacon()for fire-and-forget where appropriate, or wrapfetchwithAbortControllerand a short timeout (1000–2000ms) so the page unload isn't blocked.@siddu-k Assign me this