Merge pull request #52208 from NousResearch/bb/desktop-update-steps

fix(desktop): stop the update overlay looking frozen while it works
This commit is contained in:
brooklyn! 2026-06-24 19:29:02 -05:00 committed by GitHub
commit d635a6d507
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View file

@ -407,7 +407,11 @@ export function DesktopInstallOverlay({ enabled = true }: DesktopInstallOverlayP
const totalCount = stages.length
const failed = Boolean(state.error)
const progressPct = totalCount > 0 ? Math.round((completedCount / totalCount) * 100) : 0
// Count the running stage as half-done so the bar advances *during* a long
// stage instead of sitting frozen at the last completed step while its logs
// stream (e.g. "0 of 2" pinned at 0% for the whole first stage).
const progressUnits = completedCount + (!failed && currentStage ? 0.5 : 0)
const progressPct = totalCount > 0 ? Math.round((progressUnits / totalCount) * 100) : 0
const currentStartedAt = currentStage ? state.stages[currentStage]?.startedAt : null
const currentElapsed = typeof currentStartedAt === 'number' ? formatElapsed(now - currentStartedAt) : ''

View file

@ -531,7 +531,9 @@ function ingestProgress(payload: DesktopUpdateProgress): void {
applying: !terminal,
stage: payload.stage,
message: payload.message,
percent: payload.percent,
// Streamed log lines carry percent: null; keep the last milestone percent
// (10/60/…) instead of resetting the bar to indeterminate on every line.
percent: payload.percent ?? current.percent,
error: payload.error,
// 'manual' carries the command to run in its message field.
command: payload.stage === 'manual' ? payload.message : current.command,