fix: frozen web installer#22
Merged
Merged
Conversation
innerHTML += per log line re-parses the entire accumulated log and forces
a reflow on every line, which is O(n^2). composer update -v emits thousands
of lines, blocking the main thread for ~14s at 3000 lines and triggering
the browser's page-unresponsive dialog; killing the frozen tab aborts the
streamed response and terminates the running composer process mid-update.
Log lines are now appended as text nodes batched per network chunk (~150ms
at 3000 lines). Also fixes three related issues in the same path:
- decode with {stream: true} so multi-byte UTF-8 chars split across
chunks are no longer mangled
- a success:false status line previously threw inside its own try/catch,
surfacing as 'Unexpected end of stream' instead of 'update failed'
- log output is no longer interpreted as HTML
Only lines that parse to an object with a boolean 'success' property are
treated as the final status line, so JSON-looking log output (e.g. bare
numbers) no longer terminates the stream early.
Fixes shopware/shopware#17236
Covers the regressions fixed for shopware/shopware#17236: per-chunk DOM batching instead of per-line rendering, the success:false status line actually failing the update, multi-byte UTF-8 chars split across chunks, log output rendered as text instead of HTML, and JSON-like log lines not being mistaken for the status line. Adds a minimal vitest+jsdom setup, runs it as a js-unit job in the unit workflow, and blacklists node_modules from the phar build.
5bda88f to
f0cda14
Compare
Soner (shyim)
approved these changes
Jun 15, 2026
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.
See shopware/shopware#17236