{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":733813182,"defaultBranch":"master","name":"newspeak","ownerLogin":"mzimmerm","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2023-12-20T07:24:41.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/1468540?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1703057088.4167922","currentOid":""},"activityList":{"items":[{"before":"1d3577c475991ba17ec04cf76c902f115bf94abf","after":"283d91d53458192793507b229202fa0c129f043b","ref":"refs/heads/master","pushedAt":"2024-03-02T00:52:28.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"mzimmerm","name":"Milan Zimmermann","path":"/mzimmerm","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1468540?s=80&v=4"},"commit":{"message":"Fixed HTML (bold->strong) in the Help section of PWA Navigation.","shortMessageHtmlLink":"Fixed HTML (bold->strong) in the Help section of PWA Navigation."}},{"before":"0f8f2747b15d420affb4fd3d4991d27e69dbd6ca","after":"1d3577c475991ba17ec04cf76c902f115bf94abf","ref":"refs/heads/master","pushedAt":"2024-03-01T06:45:10.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"mzimmerm","name":"Milan Zimmermann","path":"/mzimmerm","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1468540?s=80&v=4"},"commit":{"message":"Changed PWA manifest from minimal-ui to standalone, to hide the explicit\npage navigation controls (because they only show refresh and back, not forward). Added help section (? button on top) explaining how navigation works in browser, PWA and Electron. Removed the \"I think\" fro README.md and comments in deployment scripts.","shortMessageHtmlLink":"Changed PWA manifest from minimal-ui to standalone, to hide the explicit"}},{"before":"a20837974f9e44f4733665c17ebc8f8d25dd6acf","after":"0f8f2747b15d420affb4fd3d4991d27e69dbd6ca","ref":"refs/heads/master","pushedAt":"2024-02-29T22:39:43.000Z","pushType":"push","commitsCount":8,"pusher":{"login":"mzimmerm","name":"Milan Zimmermann","path":"/mzimmerm","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1468540?s=80&v=4"},"commit":{"message":"Update sw.js\n\nPer Milan's comment","shortMessageHtmlLink":"Update sw.js"}},{"before":"13e7da90cc23412dea4d8ddd2a6a9ee7342b8daf","after":"a20837974f9e44f4733665c17ebc8f8d25dd6acf","ref":"refs/heads/master","pushedAt":"2024-02-24T19:30:58.000Z","pushType":"push","commitsCount":13,"pusher":{"login":"gbracha","name":"Gilad Bracha","path":"/gbracha","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4052598?s=80&v=4"},"commit":{"message":"Merge branch 'master' into master","shortMessageHtmlLink":"Merge branch 'master' into master"}},{"before":"2252e0ca253ac0ce83831f25174fb6dabeadc8d3","after":"13e7da90cc23412dea4d8ddd2a6a9ee7342b8daf","ref":"refs/heads/master","pushedAt":"2024-02-14T05:24:05.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"mzimmerm","name":"Milan Zimmermann","path":"/mzimmerm","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1468540?s=80&v=4"},"commit":{"message":"In the files in pull request https://github.com/newspeaklanguage/newspeak/pull/125, made suggested changes.","shortMessageHtmlLink":"In the files in pull request newspeaklanguage#125, made suggested cha…"}},{"before":"d60ed7785abca059d85ed7d60f3ac8072e595487","after":"2252e0ca253ac0ce83831f25174fb6dabeadc8d3","ref":"refs/heads/master","pushedAt":"2024-02-08T07:02:54.000Z","pushType":"push","commitsCount":6,"pusher":{"login":"mzimmerm","name":"Milan Zimmermann","path":"/mzimmerm","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1468540?s=80&v=4"},"commit":{"message":"Modified build script, added deploy scripts. Changed the way the PWA version numbers are managed and stored in git.\n\nOnly the PWA version for newspeaklanguage.org is kept in git. Others, such as the PWA version for localhost or any other URL is not kept in git, but users can choose to manage it locally outside of git.\n\nREADME.md is significantly modified and expanded, it now describes more details about\ninstalling Newspeak from scratch, building, deploying and serving Newspeak applications.","shortMessageHtmlLink":"Modified build script, added deploy scripts. Changed the way the PWA …"}},{"before":"ae7c45d6456e6bb3fef7894b462aee1fc9b1fcd7","after":"d60ed7785abca059d85ed7d60f3ac8072e595487","ref":"refs/heads/master","pushedAt":"2024-01-14T23:58:18.000Z","pushType":"push","commitsCount":6,"pusher":{"login":"mzimmerm","name":"Milan Zimmermann","path":"/mzimmerm","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1468540?s=80&v=4"},"commit":{"message":"Eliminate strings with spaces from messages displayed in method presenterss. This is a good, cheap heuristic, but not perfect. It would be more correct to parse all literal strings to check if they are valid selectors. We can check that later.","shortMessageHtmlLink":"Eliminate strings with spaces from messages displayed in method prese…"}},{"before":"6aed2ed3862c338b3fb5b5e09689c4a29ef9a488","after":"ae7c45d6456e6bb3fef7894b462aee1fc9b1fcd7","ref":"refs/heads/master","pushedAt":"2023-12-24T08:35:29.000Z","pushType":"push","commitsCount":7,"pusher":{"login":"mzimmerm","name":"Milan Zimmermann","path":"/mzimmerm","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1468540?s=80&v=4"},"commit":{"message":"Update version number.","shortMessageHtmlLink":"Update version number."}},{"before":"d0f8e47a5c2c9013588946bf6885e8b7c7e1e3f6","after":"6aed2ed3862c338b3fb5b5e09689c4a29ef9a488","ref":"refs/heads/master","pushedAt":"2023-12-23T07:16:45.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"mzimmerm","name":"Milan Zimmermann","path":"/mzimmerm","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1468540?s=80&v=4"},"commit":{"message":"TL;DR:\n - This commit fixes the failure of the Newspeak service worker (sw.js) to\n update its caches. This issue caused the Newspeak PWA client app on the user's\n device to never pick up server updates, notably the changed HopscotchWebIDE.vfuel.\n - The changed files are sw.js, index.html, build.sh; there is a new script 'increase-pwa-version.sh'\n called from 'build.sh'.\n - Apart from fixing the end-user experience, this change also touches Newspeak development\n (without any changes in the developer's workflow), as running '. ./build.sh' now changes\n the variable pwaVersion in 'sw.js'\n - How to test this change:\n - Server / build\n - Get the latest version and make sure webIDE/index.html is copied to the webIDE directory\n where Newspeak is served locally for https://localhost:8080/webIDE,\n or for https://newspeaklanguage.org/webIDE.\n I am serving from the git version of webIDE, so I do not have to copy anything.\n - Run . ./build.sh as normally.\n - Make sure the updated webIDE/sw.js is copied into the webIDE directory where Newspeak is served.\n I am serving from the git version of webIDE, so I do not have to copy anything.\n\n - PWA Client / browser\n - You do NOT have to do anything, the versioned sw.js should now be installed,\n and use its versioned cache. But if you want to check:\n - In Browser, navigate to https://localhost:8080/webIDE,\n or https://newspeaklanguage.org/webIDE.\n - Open the PWA\n - In both browser and PWA, if you press F12 to debug (Chrome) and look at:\n Application -> Storage -> Cache Storage.\n you should see a versioned cache number, such as 'newspeak-ide-cache-version-13'.\n - Every time a new server version is build and the new build deployed,\n you should see a new cache version on the client PWA or browser,\n such as 'newspeak-ide-cache-version-14'.\n\nMotivation for change:\n\n - 'Before this change': After a new Newspeak version deployment on\n https://newspeaklanguage.org/webIDE, the PWA client app on the user's device\n did not update even after multiple launches, unless a manual cache clean was performed.\n I had the same experience (the PWA client not updating) with the webIDE server\n running on localhost, and the PWA client created from it.\n In fact, even the in-browser running webIDE did not update after server deployment.\n\n - Having looked into how service workers function, it seems clear that\n the mechanism that causes the service worker update on the user's device\n (changing some bits) was never triggered. As a result, the service worker caches are never automatically\n updated, causing, among other things, the same (old) HopscotchWebIDE.vfuel to be used after server update.\n\nService worker lifecycle - summary\n\n - From https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Tutorials/CycleTracker/Service_workers:\n - Once the PWA is installed on the user's machine, THE ONLY WAY to inform\n the browser that there are updated files to be retrieved is to change\n the service worker (this file, sw.js) on the server.\n\n - Corollary: The only way for a PWA website to force an update of the service worker\n is to make a bit-change on the server's service worker (the sw.js).\n\n Such enforced update of the service worker, causes the browser to call a one-time 'install' and 'activate' on the\n service worker, which the service worker can use to delete old caches and cache the new assets.\n\nChanges in more detail:\n\n - index.html\n - moved caching of assets (cache.addAll) to the 'install' event in sw.js\n - added catching errors during serviceWorker.register\n - sw.js\n - almost complete rewrite, although keeping the basics of using cache-first strategy\n (assuming used to lighten load on the server)\n - added a version number which should be changed on every deployment,\n to support the reinstall of the service worker on the client PWA browser.\n This number is increased automatically, during running each '. ./build.sh'\n by calling the added 'increase-pwa-version.sh'\n - 'const pwaVersion = 12;'\n - added a versioned cache name\n - 'const pwaCacheName = 'newspeak-ide-cache-version-' + pwaVersion;'\n - added a full list of assets\n - 'const pwaAppResources = [ .. see code .. ];'\n - added processing in the 'install' event:\n - all assets listed in 'pwaAppResources' are added to the NEW cache version 'pwaCacheName'\n - added processing in the 'activate' event:\n - OLD caches are deleted\n - modified processing in the 'fetch' event\n - In principle, this remains the cache-first fetching, but error checking was added etc\n - Assets not in 'pwaAppResources' would still cache here from network\n - build.sh\n - added call to 'increase-pwa-version.sh' which increases version number in sw.js by 1, example\n - 'const pwaVersion = 12;' => 'const pwaVersion = 13;'\n - increase-pwa-version.sh\n - a simple sed script that edits sw.js and increases version number by 1.","shortMessageHtmlLink":"TL;DR:"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAECkUwAAA","startCursor":null,"endCursor":null}},"title":"Activity · mzimmerm/newspeak"}