Skip to content

feat(providers): YouTube bridge and provider for the browser extension (#136) - #395

Merged
rowkav09 merged 1 commit into
mainfrom
feat/youtube-bridge
Sep 24, 2026
Merged

rowkav09 merged 1 commit into
mainfrom
feat/youtube-bridge

Conversation

@rowkav09

Copy link
Copy Markdown
Member

Part of #136, slice 1a. Adds src/youtube-bridge.js, the app side of the YouTube browser extension. The scope was approved on #136: an MV3 extension, minimal permissions, a pairing token and a TTL. Nothing is wired into the HTTP server yet (that's 1b), so the app runs unchanged.

  • receive({ method, headers, body }) accepts only POSTs from a browser-extension origin (chrome-extension://… / moz-extension://…) carrying the pairing token (Bearer, constant-time compare). Web pages get 403 and wrong tokens 401.
  • Strict event schema: 11-character video ID, title and channel length caps, and thumbnails only from https YouTube image hosts. Unknown keys are refused.
  • Freshness: a tab that stops reporting for 30 s is dropped, so a closed browser goes idle. At most 16 tabs are tracked.
  • With several tabs, the most recently started one wins, and a heartbeat from an older tab doesn't steal it back. If nothing is playing, the most recently paused tab shows as paused.
  • Ads, Shorts and "stopped" clear the tab. Live streams have no position or duration.
  • provider: YouTube Music maps to track (Listening). Other videos are unknown rather than claiming TV or film metadata.

Next: 1b wires /bridge/youtube into the local server, with no session cookie and its own auth. Then the extension skeleton.

Checks

@rowkav09

Copy link
Copy Markdown
Member Author

/mira resume

@github-actions

Copy link
Copy Markdown
Contributor

/mira pause

@github-actions github-actions Bot added mira-paused Pause automatic Mira reviews on this pull request size:L labels Sep 24, 2026
@codecov

codecov Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@rowkav09
rowkav09 force-pushed the feat/youtube-bridge branch 3 times, most recently from 30d431a to 6b741e1 Compare September 24, 2026 12:29
@rowkav09

Copy link
Copy Markdown
Member Author

No Mira review came in after /mira resume (Mira is still paused). Rebased onto main, tests pass and every check is green. I reviewed it myself: extension origin plus token auth, strict schema, TTL, not wired into the server yet. Merging with an explicit squash message (no co-author trailer).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mira-paused Pause automatic Mira reviews on this pull request size:L

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant