Skip to content

Conversation

konrad-krol-incubly
Copy link

@konrad-krol-incubly konrad-krol-incubly commented Oct 2, 2025

Changes introduced within this PR:

  • updated project dependencies
    • jvm target to 11
    • updated gradle to 8.14
    • updated kotlin to 1.9
    • updated project libraries
  • implemented generic web watcher (as a replacement for chrome watcher), which is capable to track activities in:
    • Google Chrome
    • Mozilla Firefox
    • Samsung Internet
    • Opera
    • Microsoft Edge
  • bucket name has been changed to aw-watcher-android-web
  • added new browser property to web activity events
  • added instrumentation test coverage for web watcher - it actually runs on all browsers available on target device (real device/emulator) and visits couple of test web pages, then verifies if specific events has been registered
  • added new logic to web watcher that keep track of windowId and ignores events without packageName but with identical windowId as previous event - this issue has been discovered during Firefox testing
  • fixed some issues discovered by lint plugin - especially deprecation of onBackPressed callback

Discovered issues to be addressed within next commits:


Important

Introduce a generic web watcher to track browser activities across multiple browsers, update dependencies, and add test coverage.

  • Web Watcher:
    • Replaces ChromeWatcher with WebWatcher in WebWatcher.kt to track activities in Chrome, Firefox, Samsung Internet, Opera, and Edge.
    • Adds browser property to web activity events.
    • Tracks windowId and ignores events without packageName but with identical windowId.
  • Testing:
    • Adds WebWatcherTest.kt for instrumentation test coverage across all available browsers.
    • Introduces CustomTabsWrapper.kt for handling custom tab interactions in tests.
    • Updates ScreenshotTest.kt to use InstrumentationRegistry for screenshots.
  • Build and Dependencies:
    • Updates JVM target to 11 and Gradle to 8.14 in build.gradle and gradle-wrapper.properties.
    • Updates various dependencies in mobile/build.gradle.
  • Miscellaneous:
    • Changes bucket name to aw-watcher-android-web.
    • Fixes deprecation of onBackPressed in MainActivity.kt and OnboardingActivity.kt.

This description was created by Ellipsis for 9b94818. You can customize this summary. It will automatically update as commits are pushed.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Changes requested ❌

Reviewed everything up to 9b94818 in 1 minute and 35 seconds. Click for details.
  • Reviewed 897 lines of code in 14 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. mobile/src/androidTest/java/net/activitywatch/android/watcher/utils/CustomTabsWrapper.kt:44
  • Draft comment:
    Binding the CustomTabs service relies on CompletableFuture without explicit error handling. It may help to handle service disconnection or timeout exceptions explicitly.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% This is test code, which typically doesn't need the same level of robust error handling as production code. The code already has timeout handling and a fallback mechanism. The empty onServiceDisconnected handler is fine for tests. The CompletableFuture is used in a relatively straightforward way with timeout handling. I might be underestimating the importance of handling service disconnection errors in test code. There could be race conditions or edge cases I'm not seeing. While better error handling is always possible, the existing timeout and fallback mechanisms are sufficient for test code. Adding more error handling would make the test code more complex without providing significant benefits. The comment should be deleted as the existing error handling is adequate for test code, and adding more complexity would not be beneficial.
2. mobile/build.gradle:72
  • Draft comment:
    Dependency and JVM target updates look good; double-check that switching from kotlin-stdlib-jdk7 to jdk8 and Gradle version bumps are fully compatible with all modules.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_ZvN1gE6Qp9htdXGH

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

return (0 until info.childCount)
.mapNotNull { info.getChild(it) }
.firstNotNullOfOrNull { child ->
findWebView(child).also { child.recycle() }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recycling the child in the recursive findWebView() may lead to returning a recycled node. Consider deferring recycling until after you’ve determined the returned node is not needed further.

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