fix(queries): match Arc and Dia in the chrome appname patterns - #928
Conversation
Greptile SummaryThe PR fixes missing browser activity for Arc and Dia by matching their application names through the Chrome extension bucket instead of an unreachable standalone Arc mapping.
Confidence Score: 5/5The PR appears safe to merge, with the browser-name matching change aligned to the existing Chrome bucket-selection flow. Arc and Dia are now matched only when a Chrome browser bucket is selected, while terminal anchors prevent the new alternatives from matching unrelated Arc- or Dia-prefixed applications. Important Files Changed
Reviews (1): Last reviewed commit: "fix(queries): match Arc and Dia in the c..." | Re-trigger Greptile |
Chromium forks run the chrome build of the extension, which announces itself as chrome unless the browser name is overridden in the extension settings. So by default their events land in the aw-watcher-web-chrome bucket while aw-watcher-window reports their own app names, which the chrome patterns didn't match, leaving the Browser view empty. The standalone arc key stays: it covers buckets created when Arc is picked explicitly in the settings. Fixes ActivityWatch#927
0970fe9 to
7b475ba
Compare
|
Thanks for the diagnosis and the regex patch — that is the right shape. I opened #949 which takes the same chrome-regex approach (Dia/Arc
Happy to treat #949 as the follow-up on top of this PR instead, if you'd rather land this one first. No need for both to merge. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #928 +/- ##
=======================================
Coverage 42.50% 42.50%
=======================================
Files 44 44
Lines 2416 2416
Branches 518 490 -28
=======================================
Hits 1027 1027
- Misses 1313 1368 +55
+ Partials 76 21 -55 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Fixes #927. Should also cover ActivityWatch/activitywatch#1094, which is the same failure mode with Arc.
As described in the issue: forks like Dia and Arc run the chrome build of the extension, so by default their web events land in
aw-watcher-web-chrome_<host>, but aw-watcher-window reports them under their own app names ("Dia", "Arc"). Nothing in the chrome patterns matches those, sofilter_period_intersectcomes back empty and the Browser view shows no data.One correction to what I wrote in the issue: I claimed a standalone key can never bind because no bucket id contains the fork's name. That's only true for the default setup. The extension settings actually have a browser dropdown (Arc is one of the options) that overrides the detected name, and picking it changes the bucket to
aw-watcher-web-arc_<host>, which the existingarckey does bind to. So the standalone key stays for that case, and the chrome patterns pick up the default case.So this PR:
arcanddiaalternatives to the chrome regex, each with its own terminal anchor so names likearchiveorDialogdon't matcharcentries alone, with a comment on the chrome entry explaining which case each one coversNo
diakey for now since the dropdown has no Dia option, so nothing ever produces a dia bucket. Easy to add alongsidearcif the extension grows one.I've been running this patched into the bundled webui inside the .app for a couple days and Top Domains/URLs/Titles populate fine in Dia now.