fix(UI): clear stale update banner after successful update

After an update completes, the page reloads but the KV store still has
updateAvailable=true from the pre-update check. This causes the banner
to show "Current 1.30.0-rc.1 → New 1.30.0-rc.1" until the user
manually clicks Check Again.

Now triggers a version re-check before the post-update reload so the
KV store is updated and the banner reflects the correct state.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Chris Sherwood 2026-03-20 09:25:52 -07:00 committed by Jake Turner
parent 85492454a5
commit 6b41ebbd45

View File

@ -258,7 +258,13 @@ export default function SystemUpdatePage(props: { system: Props }) {
// Check if update is complete or errored // Check if update is complete or errored
if (response.stage === 'complete') { if (response.stage === 'complete') {
// Give a moment for the new container to fully start // Re-check version so the KV store clears the stale "update available" flag
// before we reload, otherwise the banner shows "current → current"
try {
await api.checkLatestVersion(true)
} catch {
// Non-critical - page reload will still work
}
setTimeout(() => { setTimeout(() => {
window.location.reload() window.location.reload()
}, 2000) }, 2000)