fix(transform): use scheme as domain for file:// URLs#570
fix(transform): use scheme as domain for file:// URLs#570ErikBjare merged 2 commits intoActivityWatch:masterfrom
Conversation
When splitting URLs, file://, about:, and other URLs without a host produced an empty string for $domain. This caused all such events to cluster together as a single empty entry in "Top Browser Domains". Now falls back to using the URL scheme (e.g. "file", "about") as the domain when host is None. Matches the corresponding fix in aw-core (ActivityWatch/aw-core#129). Fixes ActivityWatch/aw-core#67
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to f342ec8 in 8 seconds. Click for details.
- Reviewed
52lines of code in1files - Skipped
0files when reviewing. - Skipped posting
0draft 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.
Workflow ID: wflow_FCtBlEM9V014vhZY
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Greptile SummaryChanged
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: f342ec8 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #570 +/- ##
==========================================
- Coverage 70.81% 68.02% -2.80%
==========================================
Files 51 54 +3
Lines 2916 3143 +227
==========================================
+ Hits 2065 2138 +73
- Misses 851 1005 +154 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@TimeToBuildBob Fix lint Also consider adding a pre-commit config that prevents committing code that doesn't pass/auto-fixes lints (catching it early), worth adding in a separate PR (along with any other pre-commit config improvements to make). |
|
Fixed — rustfmt wanted the |
Summary
split_url_eventprocessesfile://,about:, or other URLs without a host, it now uses the URL scheme as$domaininstead of an empty stringTest plan
file:///home/user/document.pdf→$domain == "file"about:blank→$domain == "about"Fixes ActivityWatch/aw-core#67
Important
Fix
split_url_eventto use URL scheme as domain for URLs without a host, preventing clustering under an empty domain.split_url_event, use URL scheme as$domainfor URLs without a host (e.g.,file://,about:).file:///home/user/document.pdfensuring$domain == "file".about:blankensuring$domain == "about".This description was created by
for f342ec8. You can customize this summary. It will automatically update as commits are pushed.