ActivityWatch / ActivityWatch/aw-server-rust

Category picking issues?

Đang mở
#597 11 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
315
Fork
96
Merge trung bình
2 ngày 21 giờ
Pull request đã merge (30 ngày)
14

Mô tả

It currently seems to base the priority of category application based on the depth and then position of a category.

https://github.com/ActivityWatch/aw-server-rust/blob/826efce375efde35baaa30aae5a498ed5e00f441/aw-transform/src/classify.rs#L116-L123

This means that in the scenario below, category 2b is picked over rule 1.

- Category 1 (matches)
- Category 2
- Category 2b (matches) ← picked

To avoid this, one needs to change it to:

- Category 1
- Category 1b (matches) ← picked
- Category 2
- Category 2b (matches)

This is inconvient and requires both exporting, manually editing the category JSON, and reimporting it, in addition to nesting category unnessarily.

I think it would be better to first prioritize the order and only override based on depth when it is a child of the previously picked category (e.g. overriding 2 with 2b).

This could be changed in the code above to only override it if the starting names match.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.