-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
feat: check for new releases (ActivityWatch/activitywatch#114) #225
feat: check for new releases (ActivityWatch/activitywatch#114) #225
Conversation
07e3bd6
to
b9fe58b
Compare
b5fe7df
to
81a6985
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice work!
I haven't reviewed super carefully but overall very happy with the changes :)
Great! Thanks for the words of encouragement, I'll make the changes soon 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question regarding the jest config, but I'm overall very happy with these changes, so I'll go ahead and merge :)
displayName: 'node', | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
testMatch: ['**/test/**/*.test.node.js?(x)'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this work for tests written in TypeScript?
Thanks a lot for the contribution! 🎉 This is a huge improvement. Making sure ActivityWatch is kept up-to-date is important for so many reasons (just to pick a few: no bug reports for old versions, improved user retention/engagement, a step towards becoming "evergreen" software). |
Thanks @ErikBjare! I am glad to help with this useful project. If you have any coding-related work that needs help with, feel free to let me know. I'd be happy to try my hand on it. I've looked at the rest of the issues in the to-do list of Road to 1.0 and these three seem like they haven't been visited in a while:
If you don't need a hand with these I can always dig up other issues to work on. |
@billangli Missed your comment, sorry! #151 looks a bit messy/unclear, but would love to see you work on the others! |
@ErikBjare great! Thanks for letting me know |
Web UI Changes
I added the following alerts to the top of the webpages. The following shows if there is a new update.



After clicking disable, the follow up tells the user that they can re-enable the check.
The following is where you can change the settings.
All of the above components will not be rendered if the web app is built using
npm run build -- --os=android
instead of justnpm run build
. See ActivityWatch/aw-android#50.When does it check?
Let's define checking by getting the release versions from the
/info
endpoint and the GitHub API and displying the notification if there is a different version.Every time the web app is loaded (e.g. on a refresh or close and then reopen tab), it will perform check if the backoff period ends. The backoff period is usually 1 day. After 5 consecutive notifications reminding the user to download the update, it will change the backoff period to 5 days.
Notes
semver
packagenpm test
(because it wasn't run before, but now it's getting picked up by my changes in jest.config.js)Fixes ActivityWatch/activitywatch#114