Repository navigation
feat(ui): show download progress and completion #3250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
908835a
5eb352f
0728e2b
1966156
6c67d22
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3002,6 +3002,15 @@ impl Session { | |||||||||||||||||||||||||||||
| self.notify(text, error); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| for n in &news { | ||||||||||||||||||||||||||||||
| if let crate::grids::News::Finished { grids, bytes } = n { | ||||||||||||||||||||||||||||||
| self.notify_text( | ||||||||||||||||||||||||||||||
| crate::notice_text::NoticeText::format( | ||||||||||||||||||||||||||||||
| if *grids == 1 { "Downloaded {count} datum grid, {size}" } else { "Downloaded {count} datum grids, {size}" }, | ||||||||||||||||||||||||||||||
| [("count", grids.to_string().into()), ("size", crate::grids::size_text(*bytes).into())], | ||||||||||||||||||||||||||||||
| ), | ||||||||||||||||||||||||||||||
| false, | ||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||
|
Comment on lines
+3006
to
+3012
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The batch total is always printed as
Suggested change
Category: bug
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 5eb352f. Per-grid notices, completion notices, the Settings ribbon and the install card share the existing decimal size formatter, now taking |
||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| // Its download is over: one tried again (the setting turned on again) is said again. | ||||||||||||||||||||||||||||||
| if let crate::grids::News::Got { name, .. } | crate::grids::News::Failed { name, .. } = n { | ||||||||||||||||||||||||||||||
| self.grid_downloads_said.remove(name); | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new batch test covers success and failure accounting, but no assertion checks the batch counters on the two paths that change them without a download finishing: this line (the setting turned off with grids still queued), and the 2 GB refusal in the branch just below (
batch_done += 1). Both decide whenNews::Finishedis told and what the Settings progress shows, and the publicprogress()(line 204) has no test at all. A short test that callstake_next(false)with a queued grid, andtake_next(true)withbytes = MAX_BYTES, then asserts(batch_total, batch_done, batch_active)would pin them.Category: quality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving these additional batch-counter and
progress()assertions for the release quality pass. The existing limit/setting test exercises both queued-grid refusal and dropping; their new counter values are not asserted. I found no incorrect accounting on those paths, so this is a coverage addition rather than a demonstrated defect.