aw-core icon indicating copy to clipboard operation
aw-core copied to clipboard

Only filter by app & title keys by default

Open iloveitaly opened this issue 4 years ago • 8 comments

Matching against url, editor payload keys, etc could be problematic. The existing rules are written against these two fields, as far as I can tell.

iloveitaly avatar May 06 '21 12:05 iloveitaly

This pull request introduces 1 alert when merging 4206a8d4cc571dd7fa1716fae6a93a57010b4e4f into b11fbe08a0405dec01380493f7b3261163cc6878 - view on LGTM.com

new alerts:

  • 1 for Syntax error

lgtm-com[bot] avatar May 06 '21 12:05 lgtm-com[bot]

@ErikBjare What do you think about updating the defaults of all existing rules with "select_keys":["app", "title"]? Agreed that it is more flexible to keep these defined on the frontend.

iloveitaly avatar May 13 '21 20:05 iloveitaly

This pull request introduces 1 alert when merging 876b32c5f747d8ab2bb408bb56318abef56051f1 into 5bd84b15759834e3e6e922db9bc39e5d1d4aea7a - view on LGTM.com

new alerts:

  • 1 for Syntax error

lgtm-com[bot] avatar May 13 '21 20:05 lgtm-com[bot]

What do you think about updating the defaults of all existing rules with "select_keys":["app", "title"]? Agreed that it is more flexible to keep these defined on the frontend.

If we added a way in the web-ui for the user to select the keys himself in a user-friendly way that would probably be OK for most rules. If it's a hidden configuration that the user can't change without exporting and then importing the rules again however I don't think it's a good idea to hide the behavior from the user.

johan-bjareholt avatar May 24 '21 17:05 johan-bjareholt

Agreed, my assumption here is we would add this to the webui at some point soon.

In the meantime, I'm wondering if it makes sense to add defaults to each default rule as I believe these are written to only match against the app & title keys. Introducing more keys may cause categorization errors.

iloveitaly avatar May 25 '21 21:05 iloveitaly

This pull request introduces 1 alert when merging cbdd7929306b1c9fa2c1cc8217acd67283f3e714 into 8aaa35376a4f0b270a1927dff4b4d34caee7707b - view on LGTM.com

new alerts:

  • 1 for Syntax error

lgtm-com[bot] avatar Jun 08 '22 12:06 lgtm-com[bot]

In the meantime, I'm wondering if it makes sense to add defaults to each default rule as I believe these are written to only match against the app & title keys. Introducing more keys may cause categorization errors.

@ErikBjare what do you think here?

iloveitaly avatar Jul 06 '22 14:07 iloveitaly

@iloveitaly Just keep the old behavior (server-side default to check all keys, undo https://github.com/ActivityWatch/aw-core/pull/100/commits/beac24bbd211cd333faec0ddb2cd20d0ea6e46b7), it's good enough for now.

ErikBjare avatar Jul 06 '22 14:07 ErikBjare