Feat: add regex-based title cleaning rules configuration and implementation#112
Open
AminZibayi wants to merge 1 commit intoActivityWatch:masterfrom
Open
Feat: add regex-based title cleaning rules configuration and implementation#112AminZibayi wants to merge 1 commit intoActivityWatch:masterfrom
AminZibayi wants to merge 1 commit intoActivityWatch:masterfrom
Conversation
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 18e1877 in 51 seconds. Click for details.
- Reviewed
180lines of code in4files - Skipped
0files when reviewing. - Skipped posting
3draft 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.
1. aw_watcher_window/config.py:20
- Draft comment:
Inconsistent config access: load_config now returns the full config (without indexing by 'aw-watcher-window') while parse_args still accesses config['aw-watcher-window']. Consider harmonizing how configuration is retrieved. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
2. aw_watcher_window/config.py:26
- Draft comment:
get_title_cleaning_rules() calls load_config_toml() directly, reloading the config. Consider reusing the result from load_config() or caching the cleaning rules to avoid redundant config parsing. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
3. aw_watcher_window/main.py:43
- Draft comment:
In clean_window_title(), regex patterns are recompiled on every call. Consider precompiling the regex patterns (possibly during config loading) to improve performance. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
Workflow ID: wflow_i0pKdKX8Sb5oBQe5
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You can configure regex-based title cleaning rules to modify window titles before they are sent to the server. This is useful for removing application-specific suffixes, temporary states (like unread message counts), or other noisy data from window titles, leading to cleaner and more accurate data aggregation.
Important
Add regex-based title cleaning rules to modify window titles before sending to server, with configuration and documentation updates.
clean_window_title()inmain.pyandget_title_cleaning_rules()inconfig.py.example-config.toml.~/.config/activitywatch/aw-watcher-window.toml.app,pattern, andreplacementfields.README.mdwith instructions for configuring title cleaning rules.This description was created by
for 18e1877. You can customize this summary. It will automatically update as commits are pushed.