fix: match Helium with chrome web watcher bucket#898
Conversation
TimeToBuildBob
left a comment
There was a problem hiding this comment.
Reviewed the diff carefully. This is a clean, well-designed fix.
What it does: When Helium is running with the Chrome Web Store extension (reports to aw-watcher-web-chrome_*), the chrome query now includes helium in the app-name regex — but only when there's no dedicated aw-watcher-web-helium_* bucket, preventing double-counting when a proper Helium bucket exists.
Code quality: Good factoring — browserBucketMatches/browserBucketExists helpers keep the logic readable, and browserAppnameRegex cleanly handles the conditional case. Tests cover both configurations (with and without a dedicated Helium bucket), which is exactly the right coverage.
No concerns: Backward compatible — no behavior change when Helium is absent. The conditional regex routing is straightforward. Greptile also passed.
LGTM ✓
Summary
Heliumfor Chrome web watcher buckets when no dedicated Helium bucket exists.Heliumthrough the Chrome bucket when anaw-watcher-web-helium_*bucket is also present.Why
Helium can install and run the Chrome Web Store ActivityWatch extension, which reports URL events into an
aw-watcher-web-chrome_*bucket. In that setup, the active window app name isHelium, so the Chrome bucket filter would otherwise drop those browser events even though the data exists.The PR now also guards the edge case where both a Chrome-extension bucket and a dedicated Helium bucket are present, so the same Helium browsing activity is not claimed by both browser paths.
Test
npm test -- --selectProjects node --runTestsByPath test/unit/queries.test.node.ts npx prettier --check src/queries.ts test/unit/queries.test.node.ts