new editor features

This commit is contained in:
2026-02-04 08:42:42 -05:00
parent c2e7ed01b4
commit 6e7ff0ae1d
4 changed files with 101 additions and 8 deletions

View File

@@ -459,6 +459,7 @@
let activeInterval = null;
// Only auto-poll if we have a latest run
let currentRunId = {{ active_run.id if active_run else 'null' }};
const initialRunStatus = "{{ active_run.status if active_run else '' }}";
function fetchLog() {
if (!currentRunId) return;
@@ -509,8 +510,9 @@
} else {
if (activeInterval) clearInterval(activeInterval);
activeInterval = null;
// Reload page on completion to show download buttons
if (data.status === 'completed' && !document.querySelector('.alert-success')) {
// Reload if we were polling (watched it finish) OR if page loaded as running but is now done
if (initialRunStatus === 'running' || initialRunStatus === 'queued') {
window.location.reload();
}
}