Skip to content

Conversation

@ErikBjare
Copy link
Member

@ErikBjare ErikBjare commented Nov 15, 2023

Builds on ActivityWatch/aw-client-js#44 to accomplish ActivityWatch/activitywatch#991

Also fixed so that we don't fetch bucket events if vis_timeline is not in the Activity view. (big perf improvement, major decrease in requests!)

For now there will be some verbose logs to make it easy to debug if something is not working, but it can easily be removed in the future.

For now the cache is cleared on page reload.

… fetch bucket events if vis_timeline is not in the Activity view
@codecov
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (a3f9e7d) 24.00% compared to head (cf7f197) 23.94%.

Files Patch % Lines
src/stores/activity.ts 0.00% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #501      +/-   ##
==========================================
- Coverage   24.00%   23.94%   -0.06%     
==========================================
  Files          27       27              
  Lines        1600     1604       +4     
  Branches      266      267       +1     
==========================================
  Hits          384      384              
- Misses       1191     1195       +4     
  Partials       25       25              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ErikBjare ErikBjare merged commit 33784bd into master Nov 15, 2023
@ErikBjare ErikBjare deleted the dev/query-caching branch November 15, 2023 12:10
},
methods: {
getTimelineBuckets: async function () {
if (this.type != 'vis_timeline') return;
Copy link
Member Author

Choose a reason for hiding this comment

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

This got rid of a ton of unnecessary requests!

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