Skip to content

fix: frozen web installer#22

Merged
Soner (shyim) merged 4 commits into
mainfrom
fix/frozen-web-installer
Jun 15, 2026
Merged

fix: frozen web installer#22
Soner (shyim) merged 4 commits into
mainfrom
fix/frozen-web-installer

Conversation

@BrocksiNet

Copy link
Copy Markdown
Contributor

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.
@shyim Soner (shyim) merged commit 3ccd034 into main Jun 15, 2026
12 checks passed
@shyim Soner (shyim) deleted the fix/frozen-web-installer branch June 15, 2026 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants