Skip to content
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

API type safety updates #457

Merged
merged 11 commits into from
Dec 28, 2023

Conversation

toasted-nutbread
Copy link

More type safety via use of API maps, this time covering mostly all of the messages that are sent to the frontend; i.e. either content scripts or extension web pages.

@toasted-nutbread toasted-nutbread requested a review from a team as a code owner December 26, 2023 21:34
Copy link

github-actions bot commented Dec 26, 2023

✔️ No visual differences introduced by this PR.

View Playwright Report (note: open the "playwright-report" artifact)

djahandarie
djahandarie previously approved these changes Dec 27, 2023
@djahandarie
Copy link
Collaborator

(Merge conflict)

Copy link
Collaborator

@djahandarie djahandarie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! BTW, I've noticed that sometimes the version of the code running in the service worker and the version of the code running in the content script can get desynced, at least in Chrome, due to the service worker not properly updating even when the extension updates. I guess that might be quite problematic for an api-breaking change like this. It'd be nice if we could have the content script check the service worker version (and vice versa?) and somehow make it force restart if needed. Not sure if that is even possible though...

@djahandarie djahandarie added this pull request to the merge queue Dec 28, 2023
Merged via the queue into themoeway:master with commit 76805bc Dec 28, 2023
5 checks passed
@toasted-nutbread
Copy link
Author

I've not seen that happen. I know that some of the extension scripts usually won't update as you're editing them live, but that's expected. Do you know under what conditions you've seen that happen? I usually manually reload the extension after making changes, and haven't seen any issues doing it that way.

@djahandarie djahandarie added the kind/meta The issue or PR is meta label Dec 29, 2023
@djahandarie
Copy link
Collaborator

Looks like it was likely just fixed in a patch version update of Chrome... https://bugs.chromium.org/p/chromium/issues/detail?id=1498035

Taking this update fixed the most obvious way I was reproducing it. So hopefully it fixes it for others too. Though not sure if everyone will be on such a fresh Chrome version...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/meta The issue or PR is meta
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants