fix(queries): match Dia/Arc chrome forks and surface empty Browser view - #949
TimeToBuildBob wants to merge 8 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #949 +/- ##
==========================================
+ Coverage 51.99% 53.74% +1.74%
==========================================
Files 48 49 +1
Lines 2927 3003 +76
Branches 652 719 +67
==========================================
+ Hits 1522 1614 +92
+ Misses 1385 1310 -75
- Partials 20 79 +59 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Greptile SummaryThe PR expands Chrome-bucket window matching to recognize Dia and Arc and adds a localized explanation when Browser analytics resolve without matching activity.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
Buckets[Browser watcher buckets] --> Detect[Detect browser bucket types]
Detect --> Query[Intersect browser events with matching active windows]
Query --> Pair{Chrome and standalone Arc both present?}
Pair -->|Yes| Union[Deduplicate Chrome and Arc streams]
Pair -->|No| Concat[Concatenate browser stream]
Union --> Others[Concatenate unrelated browser streams]
Concat --> Results[Domain, URL, title, and duration summaries]
Others --> Results
Results --> Empty{Browser bucket available but result empty?}
Empty -->|Yes| Hint[Show localized allowlist hint]
Empty -->|No| Visualizations[Render Browser visualizations]
Reviews (5): Last reviewed commit: "fix(queries): union only chrome+Arc dupl..." | Re-trigger Greptile |
|
CI-green and mergeable — waiting only on a maintainer click. This PR is ready to merge, but the bot has pull-only access to this repo and can't self-merge — surfacing it here so it isn't lost. The monitoring loop will stop re-flagging it now that this note is posted. |
|
@greptileai review |
|
@greptileai review |
|
Current head |
|
@TimeToBuildBob Merged #928, address conflicts |
17feed1 to
50c1501
Compare
|
Rebased onto master, then scoped What's in this PR:
CI green, Greptile 5/5. Bob has pull-only access here — remaining action is maintainer review/merge. |
|
@greptileai review |
|
@greptileai review |
514a1fc to
8cf736b
Compare
|
Rebased onto current Verified locally: 29 targeted tests pass across |
Chromium forks run the chrome extension, so web events land in the chrome bucket while aw-watcher-window reports app names like "Dia". Nothing in the chrome patterns matched, so filter_period_intersect returned empty and Top Domains/URLs/Titles silently showed "No data". Add Dia/Arc process-name alternatives to the chrome regex, the Dia macOS bundle id to the exact list, and an info hint when a browser bucket exists but the window intersection is empty. Fixes ActivityWatch#927. Git-Session-Id: 47fd40d1-68e2-5710-b21c-e61a21b8e5cd
Git-Session-Id: 47fd40d1-68e2-5710-b21c-e61a21b8e5cd
Git-Session-Id: 47fd40d1-68e2-5710-b21c-e61a21b8e5cd
Git-Session-Id: 47fd40d1-68e2-5710-b21c-e61a21b8e5cd
Master gained sv.ts via ActivityWatch#947 after this PR opened. Keep the empty-state key in every locale so Swedish does not silently fall back to English. Git-Session-Id: 47fd40d1-68e2-5710-b21c-e61a21b8e5cd
union_no_overlap across every browser bucket dropped legitimate concurrent activity from later streams (Chrome+Firefox, etc.). Keep concat for distinct browsers; union only the chrome/Arc pair that can actually duplicate the same events. Git-Session-Id: 47fd40d1-68e2-5710-b21c-e61a21b8e5cd
8cf736b to
06d1d87
Compare
|
Rebased onto current |
🤖 AI code reviewSafe to merge — 1 P1 disposed (accepted-tradeoff)Updated after inline dispositions on finding threads — this is the current state; the verdict below is frozen at review time and is kept as the historical record of that pass. Finding disposition
Not safe to merge — 1 P1 openConfidence 3/5 ℹ️ Consensus was degraded on this run: 2 of 3 passes answered, so findings were filtered at 2-of-2 agreement rather than 2-of-3 — less filtered than usual; 2 of 3 fan-out jobs answered, so the findings above were filtered against less evidence than the threshold assumes. 2 findings · ❌ 1 P1 ·
|
| commit | score | findings | engine | when |
|---|---|---|---|---|
06d1d87d080e |
4/5 | 1 | agent | 2026-09-16 09:08 UTC |
42b01322a91a |
3/5 | 1 | llm | 2026-09-16 12:02 UTC |
Reviewed 420d0bde37b8 · openrouter/deepseek/deepseek-v4-flash-0731 · llm (in-band) engine · 220s · about this reviewer
Maintainer commands
@TimeToBuildBob review (own line) — fresh review · @TimeToBuildBob fix — a worker acts on the findings. Once per comment; 👀 = received.
…erlap-masking union_no_overlap(events_chrome, events_arc) used the Arc stream purely as a subtraction mask: its events never entered browser_events, so genuine Arc activity was dropped whenever it overlapped chrome-bucket events (separate extensions used simultaneously), and heartbeats from two watchers never align exactly, so the duplicate case yielded clipped fragments rather than a dedup. Instead, when an Arc bucket participates, generate the chrome stream with an Arc-free regex: the Arc bucket owns Arc events, the streams concat without duplication or loss, and no server-side exclude primitive (exclude_keyvals is Rust-only) is needed. Git-Session-Id: 5df795b8-1278-52df-aed8-58188e5391c3
chrome_regex_no_forks dropped both Arc and Dia whenever an Arc bucket existed, so Dia activity vanished for anyone who also had Arc. Build the chrome window regex from one helper that strips only forks with a dedicated bucket. Git-Session-Id: 4c4ade14-5ef4-5d33-a975-00c73628ddc4
Fixes #927. Complements #928 (same regex, plus the Dia bundle id and a visible empty-state).
Problem
The Browser view (Top Domains / URLs / Titles) is permanently empty in Chromium forks such as Dia. The extension works and events land in
aw-watcher-web-chrome_<host>, butbrowserEvents()intersects those against window events whoseappmust match the chrome entry insrc/queries.ts. Forks report themselves as"Dia"/"Arc"(and on macOS Dia, bundle idcompany.thebrowser.dia), sofilter_period_intersectreturns nothing and all three columns render "No data" with no error.This is the same failure mode as ActivityWatch/activitywatch#1094 (Arc). A standalone
arc/diakey cannot bind:browsersWithBuckets()matches on bucket id substring, and the chrome build of the extension never produces a bucket containing"arc"or"dia"unless the user overrides the browser name in the extension settings.What this PR does
arcanddiaprocess-name alternatives tobrowser_appname_regex.chrome, each$-anchored so names likearchive/Dialogdo not match.company.thebrowser.diatobrowser_appnames.chrome(macOS bundle id; reverse-domain names are not matched by the process-name regex).arckey in place for the settings-override case.The regex half follows the diagnosis and patch from @TiberiusNemesis in #927 / #928. This PR adds the bundle-id path they also confirmed, plus the empty-state so the next fork reports itself instead of looking like a broken install.
Tests
Dia/Arcand rejectsDialog/archive.company.thebrowser.dia.isBrowserAllowlistMisscovers the empty / loading / no-bucket / matched cases.npx jest --selectProjects node --testPathPattern='(queries.test.node.ts|browserAllowlist.test.node.ts)$'— 28 passed.Out of scope
Helium is already a standalone key on master (
net.imput.helium). If Helium also writes to the chrome bucket by default, that is the same bug and belongs with #898 rather than this PR.