Skip to content

Fix YouTube URL host matching#1176

Open
anirudh5harma wants to merge 1 commit into
supermemoryai:mainfrom
anirudh5harma:codex/1175-youtube-url-substring-detection
Open

Fix YouTube URL host matching#1176
anirudh5harma wants to merge 1 commit into
supermemoryai:mainfrom
anirudh5harma:codex/1175-youtube-url-substring-detection

Conversation

@anirudh5harma

@anirudh5harma anirudh5harma commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Parse YouTube URLs before classifying them in shared web helpers
  • Reject lookalike/path-only hosts such as notyoutube.com, evil.example/youtube.com, and youtube.com.evil.example
  • Route document modal, document icon, timeline grouping, and embedded video extraction through the shared helper
  • Add regression coverage for real YouTube hosts, uppercase schemes, bare youtu.be links, spoofed hosts, non-http protocols, and invalid video IDs

Closes #1175

Tests

  • bun test apps/web/components/utils.test.ts
  • bun test apps/web/components/*.test.ts apps/web/lib/*.test.ts
  • bunx biome check apps/web/components/utils.ts apps/web/components/utils.test.ts apps/web/components/document-modal/content/index.tsx apps/web/components/document-modal/content/yt-video.tsx apps/web/components/document-icon.tsx apps/web/components/timeline-view.tsx

Notes

  • bunx tsc --noEmit from apps/web still fails on existing unrelated app/package type errors, including missing workspace type resolution and pre-existing strictness errors outside this diff.

Session Details

  • Session: View Session
  • Requested by: Unknown
  • Address comments on this PR. Add (aside) to your comment to have me ignore it.

@anirudh5harma

Copy link
Copy Markdown
Contributor Author

@MaheshtheDev Have a look pls

@vorflux vorflux Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed — found 1 issue


Review with Vorflux

Comment thread apps/web/components/utils.ts
@vorflux

vorflux Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Testing evidence from delegated testing subagent:

Result: PASS — no functional bug found in the YouTube hostname-matching fix.

Checks performed:

  • Focused Bun runtime assertions for YouTube helper behavior: PASS (PASS 30 YouTube URL helper assertions)
  • Browser/UI check on reachable changed surfaces: PASS
  • Biome check on the five changed files: PASS

Evidence artifacts:


Attached Images and Videos

pr1176-e2e-memories.png

pr1176-e2e-impostor-modal.png

🎥 View recording: pr1176-youtube-browser.webm

pr1176-local-app.png

@anirudh5harma anirudh5harma force-pushed the codex/1175-youtube-url-substring-detection branch from bddd23a to 213ada8 Compare June 28, 2026 06:35

@vorflux vorflux Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the added focused tests; they cover the YouTube host matching and video ID extraction regression cases I requested. This addresses my previous comment.


Review with Vorflux

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.

YouTube URL detection matches domains by substring

1 participant