Repository navigation
fix(work-report): name hosts by bucket hostname and query their real bucket ids - #1067
Merged
ErikBjare merged 1 commit intoOct 6, 2026
Conversation
…bucket ids Host names were derived from bucket ids, so synced devices appeared as 'home-desktop-synced-from-home-desktop' and Android as 'aw-watcher-android-synced-from-pixel-8'. The query then rebuilt 'aw-watcher-window_<host>' ids, which don't exist for synced buckets. Group buckets by hostname (as the device menu does) and pass each host's actual window/afk bucket ids to the Work Report and Billing queries. Part of ActivityWatch#1058 Git-Session-Id: c7e4
7 tasks
Contributor
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1067 +/- ##
==========================================
+ Coverage 63.30% 63.45% +0.15%
==========================================
Files 52 52
Lines 3608 3623 +15
Branches 892 849 -43
==========================================
+ Hits 2284 2299 +15
Misses 1309 1309
Partials 15 15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Covers the Work report host select item of #1058. It's the one item #1059 lists as still open, and no other PR covers it.
Bug:
src/util/workReport.tsbuilt host names by strippingaw-watcher-window_/aw-watcher-afk_from bucket IDs. As a result:home-desktop-synced-from-home-desktop, and Android asaw-watcher-android-synced-from-pixel-8;aw-watcher-window_<host>from that name, so a selected synced host queried a bucket that doesn't exist.Fix: group buckets by
bucket.hostname(falling back todata.hostname), the same key the header device menu uses. A host can be selected when it has a desktop window bucket and an AFK bucket. The newgetWorkReportHostBuckets()returns each selected host's real window/AFK bucket IDs, and bothbuildWorkReportQueryandbuildBillingQueryquery those IDs. This is the same approachbuildMultideviceHostParamsalready takes for the Activity view (#969). Android-only hosts stay listed as disabled, labelled with their hostname.Tests: new regression with a synced desktop and a synced Android bucket. It checks the option labels, the bucket IDs chosen per host, and the generated query. The existing snapshot is unchanged. jest (7/7), eslint,
tsc --noEmitandvue-cli-service buildall pass.Not verified: a live render against an aw-server with synced buckets. The generated query is covered by the unit test. The
screenshots.py --only work-reportcriterion in #1058 still needs a run.Part of #1058