Skip to content

fix(web): track Brave browser URLs - #307

Open
NikitaMGrimm wants to merge 3 commits into
ActivityWatch:masterfrom
NikitaMGrimm:fix/brave-web-watcher
Open

NikitaMGrimm wants to merge 3 commits into
ActivityWatch:masterfrom
NikitaMGrimm:fix/brave-web-watcher

Conversation

@NikitaMGrimm

@NikitaMGrimm NikitaMGrimm commented Sep 24, 2026 •

Copy link
Copy Markdown

Closes #306.

Brave's page events omit the toolbar from event.source, so read its url_bar from the active window. Ignore the bar while it is focused, when it can show Brave's search hint.

I checked example.com → IANA on an Android 16 emulator: both URLs appear in the web bucket. Chrome still records the same navigation. Watcher unit tests pass, and the Android test sources compile.

Before / after (the after clip includes repeated test visits):

aw-android-brave-before-after-continuous.mp4

@greptile-apps

greptile-apps Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

The PR should not merge until switching into Brave with an unavailable URL correctly closes the preceding browser session.

Findings

  1. P1 Previous browser session stays open ▶
  2. P2 Brave focus behavior lacks coverage ▶

Summary

Adds Brave to the supported browser packages and reads its URL bar from the active window rather than the accessibility event source. The device test stops requiring Brave page titles.

  • A temporarily unavailable Brave URL can leave the preceding browser session open.
  • The new focus-dependent path lacks a dedicated device regression scenario.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Tracked browser session] --> B[Switch to Brave]
  B --> C{Brave URL available?}
  C -->|Yes| D[Close prior session; start Brave session]
  C -->|No| E[Skip tracker update]
  E --> F[Prior session remains open]
Loading

Reviews (1) · Last reviewed commit: "fix(web): track Brave browser URLs"

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.

Web watcher: add support for Brave (com.brave.browser missing from KNOWN_BROWSER_PACKAGES)

1 participant