-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: remove UI initialisation callbacks #26969
Conversation
Quality Gate passedIssues Measures |
if (isManifestV3 && isUIInitialised) { | ||
// Currently when service worker is revived we create new streams | ||
// in later version we might try to improve it by reviving same streams. | ||
updateUiStreams(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that we can now be certain the service worker will never restart while the browser is open, meaning this logic and the resetExtensionStreamAndListeners
branch below is superfluous.
But for the sake of keeping this PR as a pure refactor with no functional changes, I've left it for now.
Builds ready [2918681]
Page Load Metrics (1937 ± 246 ms)
Bundle size diffs
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #26969 +/- ##
===========================================
+ Coverage 70.17% 70.19% +0.02%
===========================================
Files 1425 1425
Lines 49647 49639 -8
Branches 13889 13886 -3
===========================================
+ Hits 34836 34842 +6
+ Misses 14811 14797 -14 ☔ View full report in Codecov by Sentry. |
Description
Replace legacy callback chain in UI initialisation with promises and async functions to improve readability and simplify maintenance.
Also removes some duplication in MV3 and legacy code.
Related issues
Manual testing steps
No functional changes.
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist