Fix social URL host matching - #1174
Conversation
|
Vorflux skipped this auto review because this account has reached its Auto Review daily review limit (20/20). You can change this in Auto Review Settings: https://us1.vorflux.com/supermemory/settings?section=pull-requests |
1b3d1ca to
7e37463
Compare
|
Verified the update: the uppercase Checks run:
|
There was a problem hiding this comment.
Validated this PR. I think it is needed: main currently classifies URLs by substring, so a normal webpage like https://notx.com/profile is treated as Twitter in the document modal before the webpage branch runs. This patch fixes that by parsing the URL and matching the hostname/path instead.
No blockers found. Focused tests pass, all apps/web/lib tests pass, and Biome passes on the touched files. Typecheck still fails on the existing @supermemory/memory-graph missing vitest declarations, which is unrelated to this diff.
|
@MaheshtheDev this needs someone for another review |
MaheshtheDev
left a comment
There was a problem hiding this comment.
LGTM. Re-reviewed the latest head after the test file removal and verified the URL helper behavior manually.
Checks run:
- npx --yes bun@1.3.6 test apps/web/lib/*.test.ts passed
- npx --yes bun@1.3.6 x biome check apps/web/lib/url-helpers.ts passed
- Manual Bun check confirms uppercase HTTP/HTTPS Twitter links are filtered, notx.com is kept, spoofed LinkedIn paths are rejected, and LinkedIn company pages are rejected
- Typecheck still fails only on the existing @supermemory/memory-graph missing vitest type declarations, unrelated to this diff
Summary
Closes #1173
Tests
bun test apps/web/lib/url-helpers.test.tsbun test apps/web/lib/*.test.tsbunx biome check apps/web/lib/url-helpers.ts apps/web/lib/url-helpers.test.tsbunx turbo run check-types --filter='@supermemory/ai-sdk' --filter='@supermemory/memory-graph'Session Details
(aside)to your comment to have me ignore it.