Skip to content

fix(queries): match Helium in the chrome bucket when no dedicated bucket exists - #989

Open
TimeToBuildBob wants to merge 1 commit into
ActivityWatch:masterfrom
TimeToBuildBob:helium-chrome-bucket
Open

TimeToBuildBob wants to merge 1 commit into
ActivityWatch:masterfrom
TimeToBuildBob:helium-chrome-bucket

Conversation

@TimeToBuildBob

Copy link
Copy Markdown
Contributor

Summary

Helium can run the Chrome Web Store extension build, which reports the
"Helium" app name into aw-watcher-web-chrome_* buckets instead of a
dedicated Helium bucket. The chrome regex only matched
google-chrome/chrome/chromium, so those events fell through the
active-window filter and the Browser view (Top Domains/URLs/Titles)
renders empty for those users.

Reproduces #898's semantics (approved, closed unmerged by its author after
going stale) on top of #949's CHROME_FORK_ALTS mechanism: add helium as
a fork alt so it's matched by default in the chrome stream, and
automatically excluded when a dedicated aw-watcher-web-helium_* bucket
participates (so that bucket owns its own events instead of double
counting) — the same pattern already used for Arc.

Closes #898 (superseded).

Test plan

  • npx jest test/unit/queries.test.node.ts — 29/29 pass (added: known-name
    coverage for Helium/helium.exe, false-positive guard, fork-exclusion
    unit test, and two fullDesktopQuery regression tests mirroring the
    existing Arc/Dia ones — chrome-only bucket still matches Helium; a
    dedicated Helium bucket excludes it from the chrome stream)
  • npx eslint src/queries.ts test/unit/queries.test.node.ts — clean
  • npx prettier --check src/queries.ts test/unit/queries.test.node.ts — clean

…ket exists

Helium can run the Chrome Web Store extension build, which reports the
"Helium" app name into aw-watcher-web-chrome_* buckets instead of a
dedicated Helium bucket. The chrome regex only matched
google-chrome/chrome/chromium, so those events fell through the
active-window filter and the Browser view (Top Domains/URLs/Titles)
rendered empty.

Reproduces aw-webui#898's semantics (approved, closed unmerged) on top
of ActivityWatch#949's CHROME_FORK_ALTS mechanism: add helium as a fork alt so it's
matched by default in the chrome stream, and automatically excluded
when a dedicated aw-watcher-web-helium_* bucket participates (so that
bucket owns its own events instead of double counting).

Closes ActivityWatch#898 (superseded)

Git-Session-Id: 5061
@codecov

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.54%. Comparing base (5d5378a) to head (1ab6aa8).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #989   +/-   ##
=======================================
  Coverage   57.54%   57.54%           
=======================================
  Files          51       51           
  Lines        3208     3208           
  Branches      782      787    +5     
=======================================
  Hits         1846     1846           
  Misses       1286     1286           
  Partials       76       76           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@greptile-apps

greptile-apps Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the Helium fallback and dedicated-bucket exclusion follow the existing fork-handling design and are covered by focused regressions.

Summary

This PR adds Helium to the established Chrome-fork matching mechanism so Chrome Web Store extension events are included when no dedicated Helium bucket exists and excluded from Chrome when a dedicated bucket participates.

  • Adds an anchored Helium application-name alternative to the Chrome stream.
  • Reuses dedicated-bucket exclusion to prevent Chrome/Helium double counting.
  • Adds regex, exclusion, and generated-query regression coverage.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    B[Browser buckets] --> H{Dedicated Helium bucket?}
    H -- No --> C[Chrome stream]
    C --> M[Chrome regex includes Helium]
    H -- Yes --> CE[Chrome stream excludes Helium]
    H -- Yes --> HE[Dedicated Helium stream owns Helium events]
    M --> O[Browser activity output]
    CE --> O
    HE --> O
Loading

Reviews (1) · Last reviewed commit: "fix(queries): match Helium in the chrome..."

@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

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.

@TimeToBuildBob

TimeToBuildBob commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

🤖 AI code review

Adds 'helium' to CHROME_FORK_ALTS so the chrome bucket regex matches Helium app names by default, and excludes Helium from the chrome stream when a dedicated aw-watcher-web-helium bucket is present. Updates unit tests to cover Helium matching, false positives, fork exclusion, and generated query behavior.

Safe to merge — no P0/P1 findings

Confidence 5/5

No findings. The diff looks correct to me on this pass.

Files changed (2) — the diff as I read it
  • src/queries.ts — Adds helium to CHROME_FORK_ALTS and updates comments to document Helium's chrome-bucket behavior.
  • test/unit/queries.test.node.ts — Adds Helium to known-name lists, false-positive guards, fork-exclusion tests, and two fullDesktopQuery regression tests.

Reviewed 1ab6aa83b8c8 · openrouter/deepseek/deepseek-v4-flash-0731 · llm engine · 37s · about this reviewer

Maintainer commands

@TimeToBuildBob review (own line) — fresh review · @TimeToBuildBob fix — a worker acts on the findings. Once per comment; 👀 = received.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant