medic / cht-core

The CHT Core Framework makes it faster to build responsive, offline-first digital health apps that equip health workers to provide better care in their communities. It is a central resource of the Community Health Toolkit.
https://communityhealthtoolkit.org
GNU Affero General Public License v3.0
468 stars 217 forks source link

Display app-version from service worker deploy-info.json in Webapp About page #8645

Open dianabarsan opened 1 year ago

dianabarsan commented 1 year ago

What feature do you want to improve? The version of the code running on a device is determined by: a) the version of the JS code composing the app b) the version of the ddoc providing database view queries

a) is now stored in a deploy-info.json file that is cached by the service worker. \

Describe the improvement you'd like Display service-worker version information in the about page and include it in telemetry.

Additional context When upgrading the client app, there will be a period of desync when the device will be running the new ddoc views on top of the old webapp code. Users can ignore the reload modal or delay reload by significant time.

dianabarsan commented 2 weeks ago

https://github.com/medic/cht-core/commit/5152cc5e542c607c5d05e19ae8a30f15b8c4a4df adds a deploy-info.json file to the service worker that contains deployment information from the server. However, at this time this is only used when generating feedback docs.

The app version from deploy-info should be displayed somewhere on the about page.