wordpress-playground
wordpress-playground copied to clipboard
Progress bar broken
This is a high priority issue.
The progress bar foes from 0% to 50% in one go without any visible increments. The problem seems to be with the requests routed through the service worker – the fetch()
in web worker isn't getting any progress updates from the readable stream, as if the service worker was buffering the response body stream before passing the Response object to the app. This also means we're not stream-loading the PHP WASM file anymore.
Here's one workaround I found on the internet:
https://github.com/anthumchris/fetch-progress-indicators/blob/master/sw-basic/sw-simple.js
I almost refuse to believe it's this complicated, though. Maybe we're missing something obvious around here:
https://github.com/WordPress/wordpress-playground/blob/1f28d7725de2d37a9cc81f63b216f14afaa2a864/packages/playground/remote/service-worker.ts#L92-L95
cc @bgrgicak @brandonpayton