Repository navigation
chore(transform): deprecate chunk_events_by_key - #758
Conversation
Decided in ActivityWatch/activitywatch#1466: nothing first-party uses it, it never supported the subevents aw-core's version produces, and merge_events_by_keys covers the use case. Mark the transform #[deprecated] and log a warning when a query calls it. Behavior is unchanged.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
🤖 AI code reviewThis PR deprecates chunk_events_by_key in aw-transform and aw-query. It adds #[deprecated] to the aw-transform function, adds #[allow(deprecated)] to the re-export, query function, and test module, and adds a one-time log warning in the query function. The behavior of the function itself is unchanged. Safe to merge — no P0/P1 findingsConfidence 5/5 ✅ No findings. The diff looks correct to me on this pass. Files changed (3) — the diff as I read it
Previous review passes
Reviewed Maintainer commands
|
…ted replacement Queries run repeatedly (dashboard refreshes), so log the deprecation warning once per process. merge_events_by_keys isn't a drop-in replacement (it merges across gaps), so say so instead of recommending it. Same wording as aw-core (from the review of ActivityWatch/aw-core#173).
|
@greptileai review |
Decided in ActivityWatch/activitywatch#1466:
chunk_events_by_keyis deprecated in both servers, with its behavior kept for now.subeventsreader (TimelineInspect.vue) is registered but never used.subeventsthat aw-core's version produces, so the two servers return differently shaped data for it anyway.merge_events_by_keysis the closest alternative, but it isn't a drop-in replacement: it merges all events with the same value, also across gaps. The deprecation note says so rather than recommending it.Changes:
aw_transform::chunk_events_by_keyis#[deprecated]with a doc note. The re-export, the query function and the unit test have#[allow(deprecated)], soclippy -D warningsstays clean.chunk_events_by_keyquery function logs a warning once per process, since queries run repeatedly (for example on every dashboard refresh).The aw-core counterpart (a
DeprecationWarningplus a docstring note) is in the aw-core PR for #1466.cargo clippy -p aw-transform -p aw-query -- -D warningsandcargo test -p aw-transform chunkpass locally.