Skip to content

Conversation

@weldonla
Copy link
Contributor

@weldonla weldonla commented Jan 7, 2026

…service worker, add disable service worker to connection settings.

…service worker, add disable service worker to connection settings.
@weldonla weldonla marked this pull request as draft January 8, 2026 14:36
};

const onDataLoaded = (data: LoadedData) => {
if ('serviceWorker' in navigator) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like instead of a manual toggle, this should instead be tied to some logic checking if a remote storage service is used at all? I can't think of a scenario where you could be simultaneously offline and using a remote data store? At least, that's how I had been considering doing something similar to this. Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That seems reasonable. To be honest, I'm not sure what the service worker does and why exactly hosting locally causes problems. Would you still run into this problem if you got a cert for it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

does this even need to be a separate bool then? or just if useWarehouse is true, unregister the service worker?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm also a little uncertain on how exactly the service worker works, but you probably still want to also check if it is in navigator, but otherwise yeah don't need to have a dedicated option bool for it. I would recommend still creating a logic method somewhere (which to start will just be 'is useWarehouse true')....but there might be other things coming that would also warrant disabling the serviceworker but don't involve that particular boolean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants