refactor: reuse dev-middleware overlay and progress indicator - #5735
Draft
bjohansebas wants to merge 4 commits into
Draft
refactor: reuse dev-middleware overlay and progress indicator#5735bjohansebas wants to merge 4 commits into
bjohansebas wants to merge 4 commits into
Conversation
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
bjohansebas
marked this pull request as draft
September 6, 2026 04:53
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.
Summary
Reuse the overlay and compilation progress indicator exported by
webpack-dev-middleware8.3.0. This removes the duplicated overlay state machine, runtime error listeners, and progress element from the dev-server client.The shared overlay handles pagination, dismissal, and runtime errors. The client retains webpack diagnostic formatting and resolves editor links to module paths across pages.
client.progress: true,"linear", and"circular"now enable the shared indicator alongside progress logging.What kind of change does this PR introduce?
Refactor with client UI and runtime error filtering changes.
Did you add tests for your changes?
Yes. Added jsdom coverage for shared overlays, pagination with buttons and arrow keys, editor links, replacement and dismissal of build errors, and progress indicator lifecycle. Updated runtime error tests and complete HTML/style snapshots, including pagination controls.
Client tests, client type checking, targeted lint checks, and the client build passed. All 35 overlay e2e tests passed before the final runtime-listener cleanup; the final e2e change for an explicit error cause is left for CI.
Does this PR introduce a breaking change?
Yes. The overlay DOM and progress UI now come from
webpack-dev-middleware;"linear"and"circular"no longer select distinct indicator styles, andtruealso enables the visual indicator. Integrations targeting the old overlay or progress selectors need to use the shared components' DOM.Runtime error filters receive the middleware's normalized error. To inspect a rejected object's data through
error.cause, reject anErrorwith an explicit cause, for examplePromise.reject(new Error("Request failed", { cause: details })). Rejecting a plain object no longer automatically places that object inerror.cause.If relevant, what needs to be documented once your changes are merged or what have you already documented?
Document the shared progress indicator behavior and the explicit
Error.causerequirement for runtime error filters. No documentation changes are included in this PR.Use of AI
OpenAI Codex assisted with implementation, tests, snapshot updates, validation, and drafting this PR description. The contributor directed the work through iterative feedback on reuse of middleware functionality, pagination, and snapshot coverage.