fix: pass bucket ID correctly for event editing in timeline views#765
Conversation
…okup
When showRowLabels=false (e.g. in the Raw Data bucket view), group.content
is set to '' to hide row labels, causing onSelect to resolve an empty bucket
ID and producing broken API calls like:
GET /api/0/buckets//events/{event_id}
Fix by using group.id (always the bucket ID) instead of group.content for
the bucketId lookup.
Also guard against editing events with null ID (merged query results) or
placeholder bucket IDs ('events', 'search') used in Search/Query views,
where no real bucket is available. These cases now return early instead of
making a doomed 404 request.
Fixes ActivityWatch#576
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to c696b50 in 5 seconds. Click for details.
- Reviewed
24lines of code in1files - Skipped
0files when reviewing. - Skipped posting
0draft 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.
Workflow ID: wflow_DyzcwyI6KwzjPaez
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #765 +/- ##
=======================================
Coverage 25.67% 25.67%
=======================================
Files 30 30
Lines 1741 1741
Branches 316 311 -5
=======================================
Hits 447 447
+ Misses 1272 1228 -44
- Partials 22 66 +44 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Greptile SummaryFixed event editing from timeline views by correcting bucket ID retrieval. Previously, the code read Changes:
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: c696b50 |
|
The |
Summary
Fixes #576 — events couldn't be edited from Raw Data, Search, or Query views because the bucket ID was missing in the API URL.
Root cause:
VisTimeline.vue'sonSelecthandler read the bucket ID fromgroup.contentinstead ofgroup.id. WhenshowRowLabels=false(Raw Data / Bucket view),contentis set to''to hide labels, producing broken API calls likeGET /api/0/buckets//events/{id}.Fix:
group.idinstead ofgroup.contentto get the bucket ID'search','events') and null event IDs from merged query results, preventing doomed 404 requestsImportant
Fixes bucket ID retrieval in
VisTimeline.vueto prevent broken API calls when editing events in timeline views.onSelectmethod ofVisTimeline.vueby usinggroup.idinstead ofgroup.content.'search','events') or null event IDs.This description was created by
for c696b50. You can customize this summary. It will automatically update as commits are pushed.