fix: Beállítások endless-refresh loop after a migration (v0.68.3)
The migration journal keeps returning the last completed job; the resume-view watched any job and migWatch's done-branch reloads the page -> endless reload loop after any migration. Resume-view now watches only in-progress jobs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,20 @@
|
|||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
### v0.68.3 — fix Beállítások page endless-refresh loop after a migration (2026-06-15)
|
||||||
|
|
||||||
|
Found while live-validating the M3 migration: once any data migration finished, the **Beállítások
|
||||||
|
(settings) page reloaded itself every ~1.5 s, forever**. The migration journal keeps returning the
|
||||||
|
last completed job indefinitely (`MigrationStatus` is not cleared on `done`); the page's resume-view
|
||||||
|
IIFE called `migWatch()` for *any* returned job, and `migWatch`'s `done` branch does
|
||||||
|
`setTimeout(location.reload, 1500)`. So every load saw the persisted `done` job → watched it →
|
||||||
|
reloaded → saw it again → looped endlessly.
|
||||||
|
|
||||||
|
Fix (settings.html): the resume-view now starts the watcher **only for an in-progress job**
|
||||||
|
(`phase !== 'done' && phase !== 'aborted'`). The one-time post-completion reload still fires from the
|
||||||
|
*active* watcher started by `storageMigrateAll`, so a real migration still refreshes drive state once
|
||||||
|
when it finishes — but a stale terminal job in the journal no longer triggers the loop. Template-only
|
||||||
|
change.
|
||||||
|
|
||||||
### v0.68.2 — fix stack-card state-badge clipping on unhealthy apps (CSS) (2026-06-15)
|
### v0.68.2 — fix stack-card state-badge clipping on unhealthy apps (CSS) (2026-06-15)
|
||||||
|
|
||||||
The `.stack-detail-header` is a `flex` / `space-between` row holding the `.stack-title-row` (logo +
|
The `.stack-detail-header` is a `flex` / `space-between` row holding the `.stack-title-row` (logo +
|
||||||
|
|||||||
@@ -390,8 +390,12 @@ function pollUntilBack() {
|
|||||||
.then(function(r){return r.json();}).then(function(d){ if(d.ok){ migWatch(); } else { alert('Hiba: '+(d.error||'ismeretlen')); } })
|
.then(function(r){return r.json();}).then(function(d){ if(d.ok){ migWatch(); } else { alert('Hiba: '+(d.error||'ismeretlen')); } })
|
||||||
.catch(function(e){ alert('Hiba: '+e); });
|
.catch(function(e){ alert('Hiba: '+e); });
|
||||||
}
|
}
|
||||||
// Resume view: if a migration is already running when the page loads, show the panel.
|
// Resume view: if a migration is STILL IN PROGRESS when the page loads, show the panel and watch.
|
||||||
(function(){ fetch('/api/storage/migrate/status').then(function(r){return r.json();}).then(function(d){ if(d.data&&d.data.job){ migWatch(); } }).catch(function(){}); })();
|
// Must NOT re-watch a terminal (done/aborted) job: the journal keeps returning the last completed
|
||||||
|
// job indefinitely, and migWatch's done-branch reloads the page — so watching a persisted 'done'
|
||||||
|
// job on every load creates an endless refresh loop. Only the active watcher (started from
|
||||||
|
// storageMigrateAll) should fire the one-time post-completion reload.
|
||||||
|
(function(){ fetch('/api/storage/migrate/status').then(function(r){return r.json();}).then(function(d){ var job=d.data&&d.data.job; if(job && job.phase!=='done' && job.phase!=='aborted'){ migWatch(); } }).catch(function(){}); })();
|
||||||
</script>
|
</script>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="empty-state" style="padding:1.5rem">
|
<div class="empty-state" style="padding:1.5rem">
|
||||||
|
|||||||
Reference in New Issue
Block a user