Skip to content

feat: add x.com status video subtitles#1725

Open
ringoshiina wants to merge 1 commit into
mengxi-ream:mainfrom
ringoshiina:codex/xcom-status-subtitles
Open

feat: add x.com status video subtitles#1725
ringoshiina wants to merge 1 commit into
mengxi-ream:mainfrom
ringoshiina:codex/xcom-status-subtitles

Conversation

@ringoshiina

@ringoshiina ringoshiina commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add subtitle translation support for x.com/twitter.com status videos with platform captions
  • add x.com status route detection, overlay mounting, video/container selection, HLS/WebVTT caption discovery, and subtitle cleanup on route changes
  • harden the shared video subtitle adapter against stale async work during navigation, disable/re-enable, source track refresh, and route exit
  • add focused regression coverage for x.com caption parsing, route rebinding, stale subtitle work, and panel placement

Verification

  • pnpm exec vitest run src/entrypoints/subtitles.content src/utils/subtitles
  • pnpm exec eslint $(git status --short --untracked-files=all | awk '{print $2}' | grep -E '\\.(ts|tsx)$')
  • pnpm exec tsc --noEmit --pretty false
  • git diff --check
  • WXT_SKIP_ENV_VALIDATION=true pnpm build
  • pre-push hook: lint, type-check, and full extension test suite (169 test files / 1394 tests)

Manual verification

  • Reloaded the unpacked Chrome extension from .output/chrome-mv3
  • Verified x.com status video subtitle flow works as expected
  • Opened a clean YouTube watch tab and confirmed the Read Frog subtitle button still mounts inside YouTube controls without console errors

@changeset-bot

changeset-bot Bot commented Jun 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b44d3c5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@read-frog/extension Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the feat label Jun 21, 2026
@ringoshiina ringoshiina force-pushed the codex/xcom-status-subtitles branch from 6509902 to 88aaff1 Compare June 21, 2026 17:00
@ringoshiina ringoshiina marked this pull request as ready for review June 21, 2026 17:02
@github-actions

github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Contributor trust score

32/100 — Moderate

This score estimates contributor familiarity with mengxi-ream/read-frog using public GitHub signals. It is advisory only and does not block merges automatically.

Outcome

Score breakdown

Dimension Score Signals
Repo familiarity 14/35 commits in repo, merged PRs, reviews
Community standing 6/25 account age, followers, repo role
OSS influence 3/20 stars on owned non-fork repositories
PR track record 9/20 merge rate across resolved PRs in this repo

Signals used

  • Repo commits: 3 (author commits reachable from the repository default branch)
  • Repo PR history: merged 3, open 3, closed-unmerged 2
  • Repo reviews: 0
  • PR changed lines: 2875 (+2801 / -74)
  • Repo permission: read
  • Followers: 1
  • Account age: 95 months
  • Owned non-fork repos considered: max 1, total 1 (ringoshiina/learn-quiz-skill (1), ringoshiina/shadowrocket-backcn-rules (0), ringoshiina/QuickShot_v2 (0))

Policy

  • Low-score review threshold: < 30
  • Auto-close: score < 20 and changed lines > 1000
  • Policy version: v1.1

Updated automatically when the PR changes or when a maintainer reruns the workflow.

@github-actions github-actions Bot added the contrib-trust:moderate PR author trust score is 30-59. label Jun 21, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 88aaff1274

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +531 to +533
if (track.mode === "disabled") {
track.mode = "hidden"
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Hide showing x.com TextTracks while rendering subtitles

When the user has X's captions enabled before clicking Read Frog, the first ordered track is mode === "showing", but this branch only changes disabled tracks to hidden and leaves showing tracks rendering natively while Read Frog renders its translated/bilingual subtitles. The x.com nativeSubtitles selector is a data-read-frog-* attribute that the repo never applies, so hideNativeSubtitles() cannot suppress those browser TextTrack cues; users in that scenario get duplicated/overlapping captions until they manually turn X captions off.

Useful? React with 👍 / 👎.

@ringoshiina ringoshiina force-pushed the codex/xcom-status-subtitles branch from 88aaff1 to b44d3c5 Compare June 22, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contrib-trust:moderate PR author trust score is 30-59. feat on-hold

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants