Skip to content

Conversation

@xuang7
Copy link
Contributor

@xuang7 xuang7 commented Aug 17, 2025

Purpose

This PR enhances the upload experience by displaying real-time speed, elapsed time, and estimated time remaining (ETA) in a compact tag, so users can understand progress at a glance and reference the final upload duratione via tooltip after completion. Closes #3678.

Changes

  • dataset.service.ts: add uploadSpeed, totalTime, estimatedTimeRemaining to MultipartUploadProgress; apply smoothing for speed/ETA; cap ETA at 24h; add basic bounds checks.
    • Speed Calculation: The upload speed is calculated using a moving average of the last 5 speed samples, where each sample represents the overall average speed (total bytes / total time).
    • ETA Calculation: The estimated time remaining uses the average speed to calculate remaining time, with a 30% change rate limiter to prevent sudden jumps. When the upload reaches 95% completion, the ETA is capped at 10 seconds for better user experience near completion.
    • Update Throttling: Progress updates are throttled to once per second
  • dataset-detail.component.ts/html/scss: render compact status tag <speed> - <time> elapsed, <time> left; apply fixed/min width to time/speed to reduce jitter; update the task row auto-hide duration from 3 seconds to 5 seconds.
  • user-dataset-staged-objects-list.component.ts/html: show post-upload duration in the file tooltip (full path + upload time)
  • gui/src/app/common/util/format.util.ts: add formatting utilities for time and speed.

Demonstration

Single File:

1file.mov

Speed-limited (throttled):

limited.mov

Multiple Files:

multi.mov

@xuang7 xuang7 marked this pull request as ready for review August 17, 2025 01:38
@aglinxinyuan aglinxinyuan added the frontend Changes related to the frontend GUI label Aug 17, 2025
@aglinxinyuan aglinxinyuan self-requested a review August 17, 2025 01:48
xuang7 and others added 2 commits August 16, 2025 19:07
Signed-off-by: Xuan Gu <162244362+xuang7@users.noreply.github.com>
@xuang7 xuang7 marked this pull request as draft August 17, 2025 05:50
@xuang7 xuang7 marked this pull request as ready for review August 19, 2025 04:49
Copy link
Contributor

@aglinxinyuan aglinxinyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aglinxinyuan
Copy link
Contributor

Had several offline discussions regarding the design; the design in the PR description reflects those discussions.

@aglinxinyuan aglinxinyuan merged commit 594f9ef into apache:master Aug 20, 2025
11 checks passed
@xuang7 xuang7 changed the title feat: enable file upload speed and time display feat: display file upload speed and time Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants