-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
refactor: separate brave browser events into their own category #283
refactor: separate brave browser events into their own category #283
Conversation
Codecov Report
@@ Coverage Diff @@
## master #283 +/- ##
=======================================
Coverage 15.91% 15.91%
=======================================
Files 22 22
Lines 1062 1062
Branches 110 110
=======================================
Hits 169 169
Misses 848 848
Partials 45 45
Continue to review full report at Codecov.
|
Cool! Short Q: what is the name of the browser bucket created by aw-watcher-web when you use Brave? I think we used to have some issues with identifying if it's actually running in Brave or if it's indistinguishable from Chrome (they've tried to avoid fingerprinting to a fault...) |
I'm not using the browser extensions right now, but here's what is being reported by the window watcher:
|
I think this might break things (although things were probably already broken), see: ActivityWatch/activitywatch#461 |
@ErikBjare I didn't read the thread in detail, but I don't see how this would break anything: it should just properly categorize brave browser usage to a dedicated category instead of setting it to chrome. Feel free to close this out if you feel this isn't useful! |
Basically the "brave" field is currently unused in code since the web extension can't detect if its installed in Brave (it pretends to be Chrome). Therefore, using aw-watcher-web in Brave will report to the aw-watcher-web-chrome bucket instead of the aw-watcher-web-brave bucket (which is what the mapping is used for). However, as @johan-bjareholt mentioned in ActivityWatch/activitywatch#461 we might be able to address this by attributing Brave the window with the aw-watcher-web-chrome bucket (move all 'brave' entries to the 'chrome' key). However, this comes with problems if the watcher is installed in both browsers. Since both watchers would report to the same bucket, messing up the data. It's possible that there are already Brave users on some platform (with the specific appname this PR moves) who've effectively already had this workaround, and for them this PR would break things. Not sure what the right thing to do is here, maybe we should just merge this and fix Brave detection in aw-watcher-web. Will probably wait with merging this until there's a PR for the needed fixes to aw-watcher-web :) |
Makes sense! Thanks for the explanation. |
871a9e1
to
39de143
Compare
Looked into this. The PR is ready for merge. Paging @ErikBjare Used library aw-watcher-web: https://github.com/ActivityWatch/aw-watcher-web/blob/0b289c4208f308050979fc729a69cf0c57dd7d8f/src/client.js#L4 |
It looks like this was partially done, so I just cleaned it up. Also added the name of brave browser on macOS.