dataset download eta - #2351
dataset download eta#2351martastn wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an estimated time remaining (ETA) indicator to the Geant4 dataset download UI, improving user feedback during long downloads.
Changes:
- Compute a smoothed download speed per dataset and derive an ETA string for the DOWNLOADING state.
- Update dataset status rendering to show the ETA next to the dataset name.
- Adjust the accordion summary click handler (adds
stopPropagation) and extend progress bar mapping to includeIDLE.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The progress bars gets into unknown state when I refresh the page (to stop download) in the middle of the download process. I would expect that after refresh and page reload the "progress bars" would be sliding left and right but stand still... Take a look around second 13... simplescreenrecorder-2026-03-30_16.43.10.mp4 |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1fd94b0 to
418dfd1
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The change introduces non-trivial stateful timing/ETA logic in a user-facing component with no automated test coverage, so it warrants a final human review.
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0 new
- Review effort level: Balanced
…ix stale ETA when dataset download fails
|
|
||
| export type SpeedHistory = Record<string, SpeedHistoryEntry>; | ||
|
|
||
| export const SPEED_SMOOTHING = 0.1; |
There was a problem hiding this comment.
add comment why this was added
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The EMA speed calculation advances lastTime on stalled polls without keeping the matching lastDone, causing speed to be measured over too short an interval and producing significantly underestimated ETAs for slow datasets.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
| return { lastDone: done, lastTime: currentTime, currentSpeed: 0 }; | ||
| } | ||
|
|
||
| const timeDelta = (currentTime - prev.lastTime) / 1000; |
…ile progress stalls

This PR adds a real-time "estimated time remaining" indicator to the Geant4 dataset download UI.
Download progress and estimation
(est. Xs remaining)/(est. Xm Ys remaining)next to each dataset name while it's downloading, based on a smoothed (exponential moving average) download speed derived from consecutive progress updates.useDatasetManager(Geant4DatasetManager.ts) alongside the existing 500ms progress polling and exposed per dataset via a newestimatedSecondsRemainingfield onDatasetStatus, instead of being recomputed independently by each dataset row component. This keeps the estimate consistent across datasets and lets it survive UI remounts .UI/UX