fix(buckets): render device.device_id instead of missing device.id - #983
Conversation
bucketsByDevice returns device_id; the Raw Data card interpolated device.id, which is always undefined. Dead while data.device_id is unpopulated (hostname fallback makes the v-if never true) and would show "ID: undefined" the moment ActivityWatch/activitywatch#302 starts writing real device IDs. Add a bucketsByDevice fixture that actually carries data.device_id, covering the mismatch branch and the several-IDs collection. Fixes ActivityWatch#982 Git-Session-Id: 29bd6617-cb27-5894-bcad-90edffb3610c
Review guide (auto-posted)Structured warm-up for reviewers — what changed, what to run, where to look. Key files
Suggested verification
Known risks / watch points
Suggested review focus
Generated by |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #983 +/- ##
==========================================
+ Coverage 53.11% 54.13% +1.01%
==========================================
Files 48 48
Lines 2984 2989 +5
Branches 681 683 +2
==========================================
+ Hits 1585 1618 +33
+ Misses 1379 1351 -28
Partials 20 20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
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. |
🤖 AI code reviewSafe to merge — no P0/P1 findings on latest reviewUpdated after inline dispositions on finding threads — this is the current state; the verdict below is frozen at review time and is kept as the historical record of that pass. Finding disposition
The PR changes the Buckets view to display device.device_id instead of the nonexistent device.id, and updates the bucketsByDevice getter to prefer a UUID-shaped device_id over a hostname fallback when grouping buckets by device. It adds two test files: a static source check for the template and a unit test suite for the bucketsByDevice getter. Needs a look — P2 onlyConfidence 4/5 2 findings ·
|
| commit | score | findings | engine | when |
|---|---|---|---|---|
c9977b376dbc |
4/5 | 3 | llm | 2026-09-16 09:46 UTC |
d2ec3d7c69be |
4/5 | 2 | llm | 2026-09-16 10:41 UTC |
Reviewed 716a184e9ea6 · openrouter/deepseek/deepseek-v4-flash-0731 · llm engine · 23s · about this reviewer
Maintainer commands
@TimeToBuildBob review (own line) — fresh review · @TimeToBuildBob fix — a worker acts on the findings. Once per comment; 👀 = received.
… groups When a hostname group contains both buckets without data.device_id (which fall back to the hostname) and buckets with a real UUID, device_id was picking the hostname fallback if it appeared first in device_ids[0]. The Buckets view then hid the ID label because hostname === device_id. Now we prefer any device_id that differs from the hostname, so partially migrated device groups correctly surface the real UUID in the label. Git-Session-Id: 37a7
|
Fixed in d2ec3d7. The root cause: when a hostname group had both buckets without Fix: prefer any non-hostname entry in const device_id = device_ids.find(id => id !== hostname) || device_ids[0];Added a test for the mixed-bucket case ( |
|
@greptileai review |
|
@ErikBjare You're right — I declared merge-ready while Greptile still had a P1. Mixed groups could pick the hostname fallback as |
…e_id; guard ID label against empty device_id Git-Session-Id: 2b238130-ce91-50d6-a8e6-4befe75fbe1a
Git-Session-Id: 2b238130-ce91-50d6-a8e6-4befe75fbe1a
|
Review cycle converged. Both remaining AI-review threads are now resolved (dispositions posted on-thread, no code change):
Status: CI green, |
|
Merged as |
Pulls in ActivityWatch/aw-webui#969 (multidevice query uses actual bucket IDs, fixes BucketNotFound with aw-sync data) and ActivityWatch/aw-webui#983 (Raw Data page renders device.device_id instead of the missing device.id). d0cf630..52ad886
bucketsByDevicereturnsdevice_id; the Raw Data card interpolateddevice.id. Dead whiledata.device_idis unpopulated (hostname fallback makes thev-ifnever true), and it would showID: undefinedonce ActivityWatch/activitywatch#302 starts writing real device IDs.device.id→device.device_iddata.device_id, plus the several-IDs collectionDoes not populate
data.device_iditself — that's the identity work. Independent of the aw-sync v0.14.0 slice.Fixes #982