Update background script to sync user integration settings on login#311
Open
bluant wants to merge 1 commit into
Open
Update background script to sync user integration settings on login#311bluant wants to merge 1 commit into
bluant wants to merge 1 commit into
Conversation
Contributor
|
Hello @bluant. Thanks for your efforts to improve our project. In the coming days, we will review and test your changes, after which we will inform you of the next steps. All the best. 🙌 |
Contributor
|
Hello, @bluant. Can you provide us with the exact steps to reproduce the problem you solved with these changes? Our QA team is currently unable to reproduce this issue. Thanks in advance. |
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.
Fix Integrations After Reopeining Browser
Summary
This is a small fix for integrations not being avaialble after the browser is closed and opened again. When the user is already logged in, we now run the existing integration setup during browser startup as well.
Context
The extension can still be logged in after restart, but the integration scripts are not always registred again. In that case supported pages can load without the Clockify integration UI until something else causes the setup flow to run.
What Changed
runtime.onStartupfor logged-in users:setIntegrationSettingsForCurrentUser()unregisterAllIntegrations()registerEnabledIntegrations()Expected Behavior
User Impact
This should mostly be invisible to users. The main difference is that integrations should show up again after browser reopen, without users needing to refresh around or re-open the extension to get things working.
Files Changed
src/contentScripts/background.jsTesting
Commands run:
npm test- not available; this project currently has a placeholder test script that exits withError: no test specified.npm run compile.dev.chrome.nowatch- passed.npm run compile.dev.firefox.nowatch- passed.Manual validation that is still worth doing:
Risk
Low. The change is only in the startup listener and reuses the same setup calls that already exist in the login/install path. A quick manul pass is still recommended because this depends on browser lifecycle behaviour.