[Website] Display ZIP import progress - #4176
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the “Preparing WordPress” loader to show the current ZIP import phase and a determinate percentage, replacing the previous indeterminate animation and boolean flag.
Changes:
- Replace
siteImportIsRunningwithsiteImportProgresscarrying caption + progress details. - Dispatch/import progress updates from the ZIP import tracker and clear them when the site is ready.
- Update loader UI (ARIA + determinate bar styling) and adjust Playwright coverage for ZIP import flow.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/playground/website/src/lib/state/redux/slice-ui.ts | Replaces boolean import flag with ProgressDetails state and action. |
| packages/playground/website/src/lib/state/redux/site-management-api-middleware.ts | Dispatches progress details during ZIP import and clears them when ready. |
| packages/playground/website/src/components/playground-viewport/style.module.css | Adds determinate progress bar + details styling. |
| packages/playground/website/src/components/playground-viewport/index.tsx | Renders determinate import progress (caption/percent) with ARIA attributes. |
| packages/playground/website/playwright/e2e/opfs.spec.ts | Updates E2E test expectations to validate determinate import progress. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adamziel
force-pushed
the
adamziel/report-site-import-progress
branch
from
July 27, 2026 15:02
ae1ee90 to
8da90f3
Compare
adamziel
force-pushed
the
adamziel/report-site-import-progress
branch
from
July 27, 2026 15:41
8da90f3 to
92bf1d2
Compare
adamziel
force-pushed
the
adamziel/report-site-import-progress
branch
from
July 27, 2026 19:02
67a0606 to
353fa0b
Compare
adamziel
force-pushed
the
adamziel/report-site-import-progress
branch
from
July 27, 2026 21:33
4d67252 to
47a8592
Compare
adamziel
changed the base branch from
trunk
to
adamziel/route-window-apis-through-messageports
July 27, 2026 21:34
adamziel
force-pushed
the
adamziel/report-site-import-progress
branch
2 times, most recently
from
July 27, 2026 21:50
1854148 to
48152a3
Compare
adamziel
added a commit
that referenced
this pull request
Jul 27, 2026
Window-backed `consumeAPI()` connections now use `Window.postMessage()` only to request a dedicated Comlink `MessagePort`. Every later request and response uses that point-to-point port. ## Background Window messages fan out to the application's main world and browser-extension isolated worlds. In Chromium 150, an isolated-world listener registered first could evaluate `event.data` and receive a transferred `ReadableStream`. The application listener was then skipped without receiving either `message` or `messageerror`. Evernote Web Clipper 7.41.1 triggered this path. Its content script evaluates `event.data` in a `switch`. When `remote.html` returned a `StreamedPHPResponse` containing headers, stdout, and stderr streams, Evernote's listener ran before Playground's Comlink listener. The parent-side `runStream()` promise never resolved. The saved-site importer had already copied the uploaded ZIP into PHP. It then waited for a streamed PHP response to scan the ZIP metadata, leaving the UI at `Reading archive, 45%`. ## This change The Window bootstrap message transfers only Comlink's endpoint port. Later API messages, including transferred streams, travel through that port and are not visible to unrelated Window listeners. Chromium retains native stream transfer; Safari retains the existing MessagePort chunk protocol when its capability probe fails. The browser regression test creates a Chromium isolated world, installs its listener first, and confirms that an iframe API stream still arrives through a native MessagePort transfer. #4176 is stacked on this PR and adds measured ZIP-import progress. ## Testing Import a large saved Playground with Evernote Web Clipper enabled and several other Playgrounds already stored in the browser. Confirm that the import continues past `Reading archive` and survives a reload. With 11 saved Playgrounds in the tested profile, a 135.9 MiB OPFS export completed in 15.2 seconds. Its 134,217,728-byte file and PHP marker remained after reload.
Base automatically changed from
adamziel/route-window-apis-through-messageports
to
trunk
July 27, 2026 22:33
adamziel
force-pushed
the
adamziel/report-site-import-progress
branch
from
July 27, 2026 22:35
48152a3 to
7a4473c
Compare
adamziel
force-pushed
the
adamziel/report-site-import-progress
branch
from
July 27, 2026 22:36
7a4473c to
4941a78
Compare
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.
#4168 reports progress between
ZipArchiveextraction batches. The websitestill discarded those details and showed the same indeterminate viewport for
the entire import.
This PR keeps that progress in Redux and renders it in the site viewport. The
bar remains animated until the first non-zero update, then becomes determinate
and shows
Extracting {processed}/{total}as its only status line. Ordinaryboot and import progress use the same
LoadingViewportrendering path.PHP executes synchronously inside its worker, so
flush()alone cannot delivera progress line until execution returns. On PHP 7+,
unzipFile()yields afterthe first and final updates and no more than once every 50 ms between them.
Extraction still uses only
ZipArchive; this PR adds no file-transfer,metadata-scanning, or alternate ZIP-extraction path.
Testing
Open the website without
storage=tempand import a ZIP containing thousandsof entries. Confirm the viewport changes from an animated bar to
Extracting {processed}/{total}with a determinate bar, then opens the importedsite. Reload and confirm the saved site remains available.