Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: changed many rules in browser-to-appname map to use case-insensitive regexes #561

Closed

Conversation

ErikBjare
Copy link
Member

@ErikBjare ErikBjare commented May 6, 2024

Replaces #283

🚀 This description was created by Ellipsis for commit f53f8b8

Summary:

Enhanced the browser_appnames mapping in /src/queries.ts with improved regex patterns for flexible, case-insensitive browser identification, including updates for LibreWolf, Brave, and other browsers.

Key points:

  • Updated browser_appnames in /src/queries.ts to use regex for flexible, case-insensitive matching.
  • Regex patterns handle variations in browser names across platforms and versions.
  • Enhanced matching for LibreWolf with new variant librewolf-default.
  • Improved regex patterns for Brave and other browsers.

Generated with ❤️ by ellipsis.dev

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 09dece0 in 1 minute and 1 seconds

More details
  • Looked at 94 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 additional comments because they didn't meet confidence threshold of 50%.

Workflow ID: wflow_S5ewNwVlugTgGMsh


You can customize Ellipsis with review rules, user-specific overrides, quiet mode, and more. See docs.

13 days left in your free trial, upgrade for $20/seat/month or contact us.

Copy link

codecov bot commented May 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 25.60%. Comparing base (14043b2) to head (f53f8b8).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #561   +/-   ##
=======================================
  Coverage   25.60%   25.60%           
=======================================
  Files          27       27           
  Lines        1613     1613           
  Branches      281      273    -8     
=======================================
  Hits          413      413           
- Misses       1141     1174   +33     
+ Partials       59       26   -33     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 6490244 in 35 seconds

More details
  • Looked at 14 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 additional comments because they didn't meet confidence threshold of 50%.
1. src/queries.ts:242:
  • Assessed confidence : 33%
  • Comment:
    The regex pattern for LibreWolf has been updated to include '-default' as an optional suffix. Ensure that this change aligns with the application naming conventions across different platforms and versions as intended.
  • Reasoning:
    The regex pattern for LibreWolf in the browser_appnames map has been updated to include an optional '-default' suffix. This change is intended to handle variations in the application name, as indicated by the comment and linked Discord discussion. The regex pattern seems correctly formed to match 'LibreWolf', 'LibreWolf-Portable', and 'LibreWolf-default' with optional '.exe' suffix, and it is case-insensitive.

Workflow ID: wflow_QjfcICgtmYRZ6AN4


You can customize Ellipsis with review rules, user-specific overrides, quiet mode, and more. See docs.

13 days left in your free trial, upgrade for $20/seat/month or contact us.

@ErikBjare
Copy link
Member Author

@ellipsis-dev Is this free of regressions?

Copy link

ellipsis-dev bot commented May 6, 2024

Based on my review of the changes, I don't see any obvious issues that could introduce regressions. The regex patterns appear to be correct, and there are no comments in the code that indicate potential issues. However, without being able to run the unit tests or the application itself, I can't definitively say that the changes are free of regressions. I would recommend running the unit tests and doing some manual testing to ensure that the changes are indeed free of regressions.


Responding to this comment by @ErikBjare. For more information about Ellipsis, check the documentation.

src/queries.ts Outdated
Comment on lines 226 to 227
// Brave (should this be merged with the brave entry?)
'Brave-browser',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious — Is there some reason for not moving these lines to the Brave Browser category?

Copy link
Member Author

@ErikBjare ErikBjare May 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember...

Found ActivityWatch/activitywatch#461
Looks like we should merge: #283
But something stalled it.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on f53f8b8 in 1 minute and 4 seconds

More details
  • Looked at 23 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 additional comments because they didn't meet confidence threshold of 50%.
1. src/queries.ts:242:
  • Assessed confidence : 100%
  • Grade: 0%
  • Comment:
    The PR description mentions updates for LibreWolf using regex, but the diff does not reflect any changes to the LibreWolf entry. Please ensure that the intended changes are included in the PR.
  • Reasoning:
    The PR description mentions that the browser_appnames map has been updated to use regex for case-insensitive matching, including a new variant for LibreWolf. However, the diff provided does not show any changes related to LibreWolf. This could be an oversight or an error in the PR description. It's important to ensure that the changes mentioned in the PR description are reflected in the code changes.

Workflow ID: wflow_rESCZdsC2Un83gkA


You can customize Ellipsis with review rules, user-specific overrides, quiet mode, and more. See docs.

13 days left in your free trial, upgrade for $20/seat/month or contact us.

@ErikBjare
Copy link
Member Author

Looks like I can't pass regexes? Makes sense if the mapping goes into the query...

@ErikBjare
Copy link
Member Author

This will never work.

@ErikBjare ErikBjare closed this May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants