Skip to content

User feedback on v0.14.02b #247

Description

@0xbrayo

User wrote on discord

I only found out with Qwen that there is a left-swipe menu with sync options
sync has no feedback, no "last date synced" or failed/success indicator
sync seems to not work. No change in the chosen folder. I'm still checking out why that is.
import categorization only works in the webbrowser mode. In app mode there is no feedback after pressing the button
import categorization opens a menu to select a picture file or camera output
import categorization: after selecting the json file it imports seemingly successfully, but the webbrowser mode breaks down after saving. Afterward opening the app the default categorizations are still active

Thank you very much for the continued work! 
v0.14.0b2

Then later

Relevant LLM cites:
- "sync_datastores calls ds_from.get_buckets() → HTTP GET /api/0/buckets/ → 401 Unauthorized"
- "get_client() in android.rs must read the API key from config.toml (same path the server uses) and pass it via AwClient::new_with_api_key()."

@TimeToBuildBob address these issues

Activity

  1. TimeToBuildBob commented on Aug 31, 2026

    @TimeToBuildBob
    Contributor

    Addressed the two concrete breakage reports from the v0.14.0b2 feedback:

    1. Sync 401 / empty SAF folder — Android get_client() in aw-sync never forwarded [auth].api_key from filesDir/config.toml, so GET /api/0/buckets returned 401. Fix: fix(aw-sync): forward API key on Android JNI client aw-server-rust#666. Needs a submodule bump in this repo after that merges.

    2. In-app category import opens camera/gallery, no document picker — WebUIFragment had no WebChromeClient.onShowFileChooser. Fix: fix(webview): open a document picker for untyped file inputs #248.

    Not in these PRs (still open on this issue):

    I did not bump aw-server-rust in this repo yet; that waits on #666 merging.

  2. TimeToBuildBob commented on Aug 31, 2026

    @TimeToBuildBob
    Contributor

    ActivityWatch/aw-server-rust#666 merged. Submodule bump + SyncInterface.setDataDir: #249.

    Still open here: sync UX/discoverability, category-import save persistence, #220 SIGABRT.

  3. akirad3d4 commented on Aug 31, 2026

    @akirad3d4

    Also I've noticed that the "Activity" in the hamburger menu and the one you can access by swiping left behave differently. The first one works as expected, while the second one opens the same activity page, but with the host name unknown and default views (not specific to Android). Because of this, the visualizations don't work there.

  4. TimeToBuildBob commented on Aug 31, 2026

    @TimeToBuildBob
    Contributor

    Confirmed — the left-swipe Activity item (and notification taps) hardcoded /#/activity/unknown/. The hamburger builds /activity/<real-hostname> from buckets, which is why that path gets Android visualizations.

    Fix: #250. Drawer + notification now use the same sanitized device hostname as the Android buckets.

    Still open here: sync UX/discoverability, last-sync/success-fail UI, category-import save persistence. Sync 401 is #249 (awaiting maintainer merge).

  5. TimeToBuildBob commented on Sep 1, 2026

    @TimeToBuildBob
    Contributor

    The three concrete breakages are now merged:

    I also opened #251 for the remaining sync-feedback gap. It persists and shows the last full-sync timestamp plus success/failure, and no longer treats a failed configured-directory mirror as a successful worker sync. Full JVM unit suite passes locally; CI is running.

    Still unresolved from the original report: category-import save persistence (defaults returning after save). I am leaving #247 open until that path is reproduced and fixed rather than claiming the merged pieces close the whole report.

  6. TimeToBuildBob commented on Sep 1, 2026

    @TimeToBuildBob
    Contributor

    Remaining category-import persistence from the original report:

    Fix: ActivityWatch/aw-webui#956. Import accepts Android-ambiguous JSON MIME types with a visible error, and save is a single awaited persist. The Android app still needs an aw-webui submodule bump after that merges; leaving #247 open until then.

    Sync feedback remains #251 (CI-green, waiting on a maintainer merge).

  7. Judemasic commented on Sep 2, 2026

    @Judemasic

    Follow-up to the Activity-view report above (#250): fixing the hostname doesn't make the
    Activity view show data on master builds, there's a second independent cause.

    Even with the correct host in the URL, Activity reports Time active: 0s and
    Top Applications: No data while the Timeline shows events for the same host and day.
    aw-webui's canonicalEvents merges Android events by ["app", "title"], and
    aw-watcher-android events have no title key, so merge_events_by_keys drops every one
    of them and the whole day evaluates to zero.

    Regression from aw-webui bf0fc84 (2026-07-24). Not in v0.14.0b2 — that pins
    aw-server-rust e8e6e90 → aw-webui 749585f, which predates it. aw-android master pins
    aw-server-rust 2ded7d7 → aw-webui 3cbe349, which contains it, so master builds are
    affected.

    Details, measurements and a suggested fix: ActivityWatch/aw-webui#959

  8. TimeToBuildBob commented on Sep 2, 2026

    @TimeToBuildBob
    Contributor

    Thanks @Judemasic — root-cause confirmed and fix is up.

    ActivityWatch/aw-webui#960 — restores the Android Activity view by fixing both merge-key sites in queries.ts.

    The short version: bf0fc84 added "title" to the merge_events_by_keys call for the Android path to support iOS ScreenTime, but aw-watcher-android events never carry a title key. merge_events_by_keys in aw-server-rust silently skips any event missing a requested key, so every Android event was dropped and the Activity view showed 0s. The fix gates "title" on an isIos flag; the regular watcher path goes back to ["app"].

    The v0.14.0b2 release pins an older aw-webui that predates the regression, so only master builds are affected.

  9. Ansar-04 commented on Sep 3, 2026

    @Ansar-04

    Description:
    On the OnePlus 7 with ActivityWatch Android app v0.14.02b, the live timeline updates correctly while the app is open. However, once the app is closed (swiped away or force-stopped), the web UI at localhost:5600 no longer shows new events for the Android bucket. Furthermore, when attempting to download the bucket data via the API (e.g., /api/0/buckets//events), the resulting JSON file is empty specifically for events whose start time falls after the app was closed. Re‑opening the app forces all “missed” events to appear in both the UI and the API response.

    Steps to Reproduce:

    • Open ActivityWatch on the Android device (OnePlus 7, app version v0.14.02b) and verify that new activity appears in the live timeline.
    • Close the app completely (e.g., swipe it away from the recent apps list or force‑stop it).
    • Wait a few minutes for new activity to occur (this activity should generate new events).
    • Open a browser and go to localhost:5600 – observe that the Android bucket timeline shows no updates after the app was closed.
    • Using the API, request the bucket’s events, e.g., GET /api/0/buckets//events?start=... (or download via the web UI’s export function).
    • Note that the returned JSON is empty, or contains only events that predate the app closure – any events that should have started after the closure are missing.
    • Re‑open the Android app – all events that were missing suddenly appear in the web UI and become available via the API.

    Expected Behavior:

    • The Android bucket data should be continuously persisted to disk or made available to the server, so that the web UI and API reflect the latest events even when the app is not in the foreground.
    • Exporting the bucket via API should always return all recorded events, including those that occurred while the app was closed.

    Actual Behavior:

    • No new events are visible in the web UI or API after the app is closed.
    • The API returns an empty JSON file (or missing events) specifically for the time interval starting from the moment the app was closed.
    • Only after restarting the app are the buffered events flushed to the server/database.

    Environment:
    Device: OnePlus 7
    OS: Android 12
    App Version: v0.14.02b
    Server/Web UI: localhost:5600 (latest version)

  10. TimeToBuildBob commented on Sep 3, 2026

    @TimeToBuildBob
    Contributor

    Thanks @Ansar-04 — split this out as #252 so it has its own reproduction and acceptance criteria.

    The “missed events appear after reopening” behavior means Android still has the usage history, but ActivityWatch's local server/parser was not running to persist and expose it. v0.14.0b2 already uses a foreground BackgroundService, returns START_STICKY, and does not opt into stopWithTask, so this needs lifecycle evidence on the affected OnePlus/OxygenOS device rather than a speculative restart patch.

    One important distinction:

    • Swipe away from recents: the service should survive or recover; this is the bug tracked in Local server stops after swipe-away until app is reopened #252.
    • Force-stop from Android settings: Android intentionally blocks the app's services, alarms, and restarts until the user launches it again. ActivityWatch cannot bypass that platform behavior.

    Could you confirm whether the persistent ActivityWatch notification disappears after a swipe-away only (not force-stop)? #252 includes a filtered adb logcat command that will tell us whether the service is destroyed, the process is killed, or the native server exits while the service remains alive.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions