fix(research): recognize original browser aliases - #142
Conversation
Greptile SummaryThis PR restores Arc, Vivaldi, and Windows Chromium aliases to the synchronized Python and Swift Research Edition browser sets.
Confidence Score: 5/5The PR appears safe to merge; the only remaining concern is a non-blocking brittleness issue in the existing parity test. No new correctness, privacy, security, or repository-rule violations were identified. The previous parity-test finding is only partly fixed: the updated regular expression now tolerates harmless whitespace and line-layout changes, but the extracted Swift aliases are still compared without normalization, so harmless casing differences can continue to produce false failures. Files Needing Attention: tests/test_research_filter.py Important Files Changed
Reviews (2): Last reviewed commit: "fix(research): recognize original browse..." | Re-trigger Greptile |
| match = re.search( | ||
| r"let researchBrowserApps = Set\(\[\n(?P<entries>.*?)\n\]\)", | ||
| swift, | ||
| re.DOTALL, | ||
| ) | ||
| self.assertIsNotNone(match) | ||
| swift_browser_apps = set(re.findall(r'"([^"]+)"', match.group("entries"))) | ||
| self.assertEqual(swift_browser_apps, BROWSER_APPS) |
There was a problem hiding this comment.
This parity test depends on the exact whitespace and casing of the Swift source rather than its runtime behavior. Harmless changes such as placing an entry on the same line as Set([, or using a mixed-case alias that Swift normalizes with lowercased(), would fail the test even though browser recognition remains identical. Parse the declaration without depending on its layout and compare normalized values so unrelated Swift edits do not cause false failures.
Knowledge Base Used: Research-mode filtering
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
45aca78 to
d0b0779
Compare
|
@greptileai review |
Summary
Companion to ActivityWatch/activitywatch#1431. That retained-app change leaves the watcher app-category map empty; this PR ensures these proven browser identities still take the browser categorization path.
Verification
poetry run python -m pytest tests/test_research_filter.py tests/test_main.py -q— 64 passedmake test— 70 passed; mypy clean