There is no information on 'Top Browser Domains'. It is just empty (see attached screenshot).
I am new to both Brave and ActivityWatch. I am not sure whether logs are of any use in this case, but I can provide them if needed.

Did you install the web extension?
Yes, installed and active.
I think I know what the issue is. We just need to add "Brave Browser" here: https://github.com/ActivityWatch/aw-webui/blob/0036b4860fb52f428e7e14fdba1fe22950e17db8/src/queries.ts#L124
@bawasi Can you confirm if the bucket name (on the "Raw Data" page) is aw-watcher-web-chrome or aw-watcher-web-brave?
I am having the same issue with seeing no browser data from Brave. My bucket id is aw-watcher-web-chrome.
Yes, bucket id is also for me aw-watcher-web-chrome
@ErikBjare It should not be added to the "brave" dict, older versions of brave for a short while had that but removed it because they had incompatibilities with some sites. The developers instead made their own exotic API for others to detect if the user is running or brave or not instead of following internet standards.
https://github.com/brave/brave-browser/issues/1052#issuecomment-585581518
So the only possible solution to this is to add it to the "chrome" section, but if any user has both chrome and brave running at the same time your activity will be completely wrong because now two watchers will write to the same bucket at the same time creating invalid data.
So brave developers has essentially shot themselves in the foot by tricking every website that they are chrome even if they are not. For most sites that fixes issues, but in our case that's exactly what breaks our use-case. The responsible thing for Brave would have been to be honest that it's in fact brave and if some site works fine on brave but lies that it's incompatible it could have had a "whitelist" for those sites so it only fakes it on those specific sites. But they have gone the easy route and trick everyone instead of just the bad actors.
I am considering if we should just remove Brave support completely and refer to that GitHub issue upstream (others have reported that it has worked on Linux, but also complained about the bug when running both brave and chrome).
@johan-bjareholt That's pretty crazy.
If you want to deal with upstream that's all good but I think we're good with just saying "because Brave doesn't want anyone to know that their users are using Brave, watching both Chrome and Brave at the same time leads to undefined behavior", and then go ahead and keep putting Brave in the "chrome" field anyway.
Does this mean we should move the existing Brave entry into the chrome field? I guess it's useless right now?
Flooding might partially fix it for those few cases that watch Chrome and Brave simultaneously, so it wouldn't be worthless, just kinda corrupted/inaccurate.
Edit: After reading that issue, aren't there more reliable ways to figure out the browser name than checking the User-Agent?
Does this mean we should move the existing Brave entry into the chrome field? I guess it's useless right now?
Yes
Flooding might partially fix it for those few cases that watch Chrome and Brave simultaneously, so it wouldn't be worthless, just kinda corrupted/inaccurate.
The URLs and titles would be correct, but "kinda corrupted/inaccurate" is an understatement as the durations would be completely wrong.
If both watchers heartbeat at the same time all the time (which will be the case because aw-watcher-web is not aware if the user is afk or not) they will take turns on sending heartbeats making most heartbeats a new unique event instead of actually merging them resulting in a bucket getting filled rather quickly. The durations will be completely random as both write at the same time but will most likely average out to be 50% brave and 50% chrome even though you might be using brave 95% of the time.
Edit: After reading that issue, aren't there more reliable ways to figure out the browser name than checking the User-Agent?
Not that is compatible with all browsers. User-Agents are already complicated as is, which is why we use the ua-parse library in aw-watcher-web. We could use braves unique API to find out whether it's brave or not, but I'd prefer to avoid having brave specific code.
function isBraveUA () {
if (!window.Promise) {
return false;
}
if (typeof navigator.brave == "undefined" ||
typeof navigator.brave.isBrave != "function")
{
return new Promise(function (resolve) {
resolve(false);
});
}
return navigator.brave.isBrave()
.then((response) => {
return response;
})
.catch((error) => {
return false;
});
}