You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: add handler to the "request:match" event - #2834
No actionable comments were generated in the recent review.
Walkthrough
The request:match event now includes the matched RequestHandler alongside the request ID and request. Runtime and type tests verify the event payload for matching and passthrough cases, and for Node and browser listeners.
Changes: Request Match Event
Layer / File(s)
Summary
Event payload and emission src/core/experimental/frames/http-frame.ts
A new RequestMatchEvent carries the request ID, request, and matched handler. HttpNetworkFrame emits it for request:match.
Runtime and type validation src/core/experimental/frames/http-frame.test.ts, test/msw-api/setup-server/life-cycle-events/on.node.test.ts, test/typings/life-cycle-events.test-d.ts
Runtime tests assert that request:match includes the registered handler. Type tests assert that Node and browser listener arguments include a RequestHandler.
The matched handler reaches lifecycle listeners. The reported Node 26 test failure still needs investigation.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title clearly describes the main change: adding the matched handler to the request:match event.
Description check
The description references issue #2833, which requests adding the matched handler to the request:match event.
Linked Issues check
Issue #2833 requires request:match to expose the matched handler with requestId and request. HttpNetworkFrame.resolve now emits RequestMatchEvent with all three fields. Runtime tests assert …
Out of Scope Changes check
The source change implements issue #2833. The runtime and type-test changes verify the new event payload. No unrelated changes appear in the pull request diff.
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Linked Issues check
Explanation
Issue #2833 requires request:match to expose the matched handler with requestId and request. HttpNetworkFrame.resolve now emits RequestMatchEvent with all three fields. Runtime tests assert the handler for matched responses and passthroughs, and type tests cover Node and browser listeners.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 4 files.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the match event’s new field, The handler joins the request it helped yield. Node tests nod, browser types agree, The event now carries all three. I hop away, content with the key.
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 9159a722-372d-45fc-a578-f01e3d12df9f
Commits
Reviewing files that changed from the base of the PR and between 9bbfe99 and a07dc88.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
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
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.
request:matchevent #2833