feat(subtitles): add a settings toggle menu for video subtitles#1283
feat(subtitles): add a settings toggle menu for video subtitles#1283
Conversation
🦋 Changeset detectedLatest commit: 4124bc5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Contributor trust score70/100 — Trusted This score estimates contributor familiarity with Outcome
Score breakdown
Signals used
Policy
Updated automatically when the PR changes or when a maintainer reruns the workflow. |
There was a problem hiding this comment.
2 issues found across 15 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/entrypoints/subtitles.content/platforms/youtube/index.ts">
<violation number="1" location="src/entrypoints/subtitles.content/platforms/youtube/index.ts:8">
P1: Initialize the adapter before returning it; otherwise the UI can call `toggleSubtitlesManually` before the scheduler exists, so the first toggle may hide native captions without ever showing translated subtitles.</violation>
</file>
<file name="src/entrypoints/subtitles.content/init-youtube-subtitles.ts">
<violation number="1" location="src/entrypoints/subtitles.content/init-youtube-subtitles.ts:23">
P2: Only initialize the adapter when subtitle UI mount succeeds; currently initialization proceeds even if mount exits early.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f2c083548e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
感觉之后可以给这个菜单加一点透明度 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1876bf8f77
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Type of Changes
Description
Related Issue
Closes #
How Has This Been Tested?
Screenshots
Checklist
Additional Information
Summary by cubic
Adds a subtitles settings panel and makes the toolbar button open it. Subtitles toggling (manual and auto-start) now runs through the adapter for consistent state and analytics.
New Features
Refactors
SubtitlesUIContext; UI callstoggleSubtitlesfrom context and readscontrolsConfig.UniversalVideoAdapter.initialize()is async; renders the button, initializes the scheduler, then auto-starts viatryAutoStartSubtitles; exposestoggleSubtitlesManually.{ onToggleSubtitles: adapter.toggleSubtitlesManually }, then callsinitialize().renderSubtitlesTranslateButton()); newSubtitlesTranslateButtontoggles the panel; panel state tracked insubtitlesSettingsPanelOpenAtomand reset on navigation.Written for commit 4124bc5. Summary will update on new commits.