diff --git a/CHANGELOG.md b/CHANGELOG.md index 62ceca8..f0364ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ ## 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) The `.stack-detail-header` is a `flex` / `space-between` row holding the `.stack-title-row` (logo + diff --git a/controller/internal/web/templates/settings.html b/controller/internal/web/templates/settings.html index e92c4ac..6e4a900 100644 --- a/controller/internal/web/templates/settings.html +++ b/controller/internal/web/templates/settings.html @@ -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')); } }) .catch(function(e){ alert('Hiba: '+e); }); } - // Resume view: if a migration is already running when the page loads, show the panel. - (function(){ fetch('/api/storage/migrate/status').then(function(r){return r.json();}).then(function(d){ if(d.data&&d.data.job){ migWatch(); } }).catch(function(){}); })(); + // Resume view: if a migration is STILL IN PROGRESS when the page loads, show the panel and watch. + // 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(){}); })(); {{else}}