Repository navigation
feat(update): show download speed, percent and time left during the panel update - #52
Merged
Merged
Conversation
Parse the per-layer byte counts from docker pull progress lines (current and total, in docker's decimal units) and keep them in the update status. The overall share uses bytes only once every unfinished layer has a known size. Until then it uses the layer share, because a layer that has not started has no size yet and would make the byte share read too high. Download rate is measured over the last five seconds from the byte samples. Time left is (total - done) / rate. Both stay null until there is enough data, and the time left is never negative or infinite. The update command and its flow are unchanged. The update script's output is piped rather than sent to a terminal, so byte counts may not appear there; the layer share is the fallback in that case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
While the image downloads, the downloading step shows a progress bar with the percentage, the download speed in MB/s and the estimated time left. Speed and time left read unknown until there is enough data. The detail lines are now block elements so the bar can sit between them, and the step content fills the dialog width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The update script's output is piped, so docker prints no byte counts there. Pull the image through the local Docker client before the script runs, and read the JSON progress events, which carry each layer's bytes and total. The script's own docker pull then finds the image present. If the engine pull fails, the error is logged, the partial layer progress is dropped, and the script pulls the image as before. Error events inside the stream are checked explicitly, since docker-modem reports only stream failures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The router passes the image of the chosen update source, so the engine pull can run before the update script. The script's command is unchanged; the official image reference moves into a helper that the command reuses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The displayed percent no longer goes backwards when a large layer gets its size after smaller ones finished. - The progress bar exposes its value to assistive technology. - An engine pull with no event for 90 seconds is cancelled and the update falls back to the script pull. The timer is cleared on every exit. - The engine pull is skipped when a Docker host is set in the environment, because the script's docker CLI may then use a different daemon. - At 100% the panel shows "Finishing" instead of a decaying speed. Tests cover the monotonic percent, the rendered aria value, the idle timeout with fake timers, and the remote host skip. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The "Server update in progress" dialog now shows download progress as a bar with a percentage, the current download speed in MB/s, and an estimate of the time left. The existing layer summary and elapsed time stay.
How it works
docker pullfinds the image present.Limits
Test plan
biome checkpasses on each changed file;tsc --noEmitpasses inpackages/serverandapps/dokploy.bun run test __test__/settings __test__/server: 33 files, 376 tests pass. The new tests use recorded event sequences, including a layer with no total yet, a complete layer, and a failed pull that falls back.🤖 Generated with Claude Code