replit / desktop

Replit Desktop App
116 stars 7 forks source link

Add checkForUpdates() API #115

Closed sergeichestakov closed 1 year ago

sergeichestakov commented 1 year ago

Why

Currently, we check for updates once on startup and then on an interval with exponential backoff. While that is fine in most cases, I can see a world where we want web to trigger the update flow instead at any point in time. That way we have more control via the UI when the app updates and can base it on explicit user actions.

Web already has the ability to check if the client its running on is out of date by checking the version returned by https://desktop.replit.com/latest and comparing it to the replitDesktop.version key exposed on the window. In these cases, we can render some UI that allows the user to update immediately.

What changed

Add checkForUpdates() API

Test plan

Will use in follow up but this should essentially trigger an update immediately from web