fix: handle ^ and $ in rules#684
Merged
ErikBjare merged 1 commit intoActivityWatch:masterfrom Jun 2, 2025
istudyatuni:push-ymqtklzzlltx
Merged
fix: handle ^ and $ in rules#684ErikBjare merged 1 commit intoActivityWatch:masterfrom istudyatuni:push-ymqtklzzlltx
ErikBjare merged 1 commit intoActivityWatch:masterfrom
istudyatuni:push-ymqtklzzlltx
Conversation
Contributor
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to b4f5060 in 1 minute and 7 seconds. Click for details.
- Reviewed
42lines of code in2files - Skipped
0files when reviewing. - Skipped posting
2draft 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. src/util/classes.ts:218
- Draft comment:
Good improvement: appending the 'm' flag ensures '^' and '$' work as intended. For consistency, consider if regexes in other parts (e.g. in tests) should also use the same flag. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
2. src/util/color.ts:133
- Draft comment:
Using a newline separator (\n) ensures multiline matching with '^' and '$'. Ensure this change doesn't affect any logic that relied on a space separator. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
Workflow ID: wflow_6IefkUsCQp6AqF1w
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #684 +/- ##
=======================================
Coverage 26.30% 26.30%
=======================================
Files 29 29
Lines 1684 1684
Branches 296 288 -8
=======================================
Hits 443 443
- Misses 1180 1219 +39
+ Partials 61 22 -39 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
BelKed
approved these changes
Jun 1, 2025
Contributor
BelKed
left a comment
There was a problem hiding this comment.
Nice and clever solution 🔥
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.
Fix ActivityWatch/activitywatch#1148
Important
Fixes handling of
^and$in regex rules by adding 'm' flag and adjusting string concatenation inclasses.tsandcolor.ts.^and$in regex rules by adding 'm' flag inmatchStringinclasses.tsandgetCategoryColorFromEventincolor.ts.appandtitlewith line breaks ingetCategoryColorFromEventforcurrentwindowandweb.tab.currentbuckets.classifyEventsinclasses.tsindicating it's used only in tests.This description was created by
for b4f5060. You can customize this summary. It will automatically update as commits are pushed.