Repository navigation
Conversation
#2395 Bundle Size — 2.04MiB (+0.38%).8c623d5(current) vs c6e6bbf main#2392(baseline) Warning Bundle contains 16 duplicate packages – View duplicate packages Bundle metrics
Bundle size by type
Bundle analysis report Branch pr/individual-MessageChannels Project dashboard Generated by RelativeCI Documentation Report issue |
commit: |
phryneas
commented
Nov 20, 2026
Comment on lines
-28
to
-39
| actor.on( | ||
| "explorerSubscriptionTermination", | ||
| () => subscription.unsubscribe(), | ||
| options | ||
| ); | ||
| if (subscription.closed) return; | ||
| const stop = () => subscription.unsubscribe(); | ||
| const { signal } = options; | ||
| if (signal?.aborted) return stop(); | ||
|
|
||
| if (options.signal) { | ||
| options.signal.addEventListener( | ||
| "abort", | ||
| () => subscription.unsubscribe(), | ||
| { once: true } | ||
| ); |
Member
Author
There was a problem hiding this comment.
Both of these listeners were never cleaned up and could start accumulating.
phryneas
commented
Nov 20, 2026
| if (result === SKIP_RESPONSE) { | ||
| return; | ||
| } | ||
| if (options.signal?.aborted) return; |
Member
Author
There was a problem hiding this comment.
Without this, closing the panel while a request was ongoing could cause postMessage on a closed port.
phryneas
marked this pull request as draft
November 20, 2026 16:18
phryneas
marked this pull request as ready for review
November 20, 2026 17:23
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.
Building on the router PR, this changes the connection model around.
Each Client gets its own MessageChannel, and separate Port instances all the way to the router. Each Client is considered its own individual connection. Client ids are now created and managed on a router level, while any level before that doesn't have to concern itself with them.
Frames themselves also have a "root connection" that is used for global concerns like registering new client connections or
loadErrorCodes.While a MessageChannel Port doesn't have a disconnect event, the final runtime Port used to transport data into the extension has a disconnect event. Where applicable, that is now used to close down subscriptions.
Stack created with GitHub Stacks CLI • Give Feedback 💬