Display download progress bar when loading profiles from URLs#5919
Open
kim-em wants to merge 1 commit intofirefox-devtools:mainfrom
Open
Display download progress bar when loading profiles from URLs#5919kim-em wants to merge 1 commit intofirefox-devtools:mainfrom
kim-em wants to merge 1 commit intofirefox-devtools:mainfrom
Conversation
When loading profiles via from-url or public data sources, the app previously showed only a decorative animation with no indication of download progress. This replaces that with a real progress bar using the ReadableStream API to track bytes received. - Stream response body via response.body.getReader() instead of response.arrayBuffer() to report progress during download - Pre-allocate buffer when Content-Length is known to avoid 2x memory spike; fall back to chunk accumulation when unknown or wrong - Throttle progress dispatches to ~10/s to avoid excessive renders - Show determinate bar with "X MB / Y MB" when Content-Length known, indeterminate animation with "X MB downloaded" otherwise - Aggregate progress across parallel downloads in compare mode - Add ARIA progressbar role, aria-valuetext, and localized aria-label - Add Fluent localization strings for all user-visible text - Respect prefers-reduced-motion: reduce Co-Authored-By: Claude Opus 4.6 (1M context) <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.
This PR adds a download progress bar when loading profiles from URL-based data sources (
from-url,public, andcompare). Currently the app shows a decorative animation with no indication of actual download progress, which can be confusing when loading large profiles (100+ MB is common).The fetch path is changed from
response.arrayBuffer()(which provides no intermediate feedback) to streaming viaresponse.body.getReader(), reporting progress through a newPROFILE_DOWNLOAD_PROGRESSRedux action. When the server provides aContent-Lengthheader, a determinate progress bar with "X MB / Y MB" is shown; otherwise an indeterminate animation with "X MB downloaded" is displayed. In compare mode, progress is aggregated across the parallel downloads into a single bar.Memory-conscious: when
Content-Lengthis known, the response is read directly into a pre-allocated buffer (identical memory footprint to the originalresponse.arrayBuffer()). Progress dispatches are throttled to ~10/s to avoid excessive Redux/React overhead. Falls back gracefully toresponse.arrayBuffer()whenresponse.bodyis unavailable.Accessibility: the progress bar uses
role="progressbar"witharia-valuenow,aria-valuemax,aria-valuetext(formatted sizes), and a localizedaria-label. Respectsprefers-reduced-motion: reduce. All user-visible strings go through Fluent (en-US only, as expected).🤖 Prepared with Claude Code