Skip to content

feat: glossary term preservation, smart subtitle source & Vite 8#10

Merged
Mapleeeeeeeeeee merged 3 commits into
mainfrom
feat/v2-smart-subtitle-pipeline
Apr 21, 2026
Merged

feat: glossary term preservation, smart subtitle source & Vite 8#10
Mapleeeeeeeeeee merged 3 commits into
mainfrom
feat/v2-smart-subtitle-pipeline

Conversation

@Mapleeeeeeeeeee
Copy link
Copy Markdown
Owner

Summary

  • Glossary / Term Preservation: Add persistent glossary (JSON) for controlling which terms should be preserved or custom-translated. Includes CRUD API, frontend GlossaryPanel, per-entry "Add to Glossary" button, and automatic prompt injection during translation.
  • Smart Subtitle Source: Automatically download YouTube manual subtitles via yt-dlp when available, falling back to Whisper transcription. Includes VTT-to-SRT conversion and subtitle source badge in UI.
  • Vite 8 Upgrade: Upgrade from Vite 7 to Vite 8 (Rolldown engine) with plugin-react 6.
  • UX: Show download speed hint for non-YouTube platforms (X/Twitter, TikTok).

Test plan

  • Backend: ruff, mypy, vulture all pass
  • Backend: 155 unit tests pass (glossary CRUD, VTT conversion, route tests)
  • Frontend: TypeScript build + 12 tests pass
  • E2E: Glossary CRUD API verified (add/edit/delete/list + error paths)
  • E2E: YouTube manual subtitle download verified (TED Talk with translator credit)
  • E2E: SSE subtitle_source badge displayed in UI ("YouTube (manual)")
  • E2E: GlossaryPanel UI verified (add/hover edit-delete/toggle)
  • Code review: 2 rounds, all blockers resolved
  • QA: 18/18 test scenarios pass

🤖 Generated with Claude Code

Mapleeeeeeeeeee and others added 3 commits April 20, 2026 21:16
… 8 upgrade

- Upgrade Vite 7→8 (Rolldown engine) with plugin-react 6
- Add GlossaryManager with JSON persistence, atomic save, thread-safe writes,
  and prompt caching for term preservation during translation
- Add YouTube manual subtitle download via yt-dlp with Whisper fallback
- Add SubtitleSource enum to eliminate cross-layer magic strings
- Add glossary CRUD API (GET/POST/PUT/DELETE /api/glossary)
- Add GlossaryPanel frontend component with optimistic state updates
- Send subtitle_source via SSE for frontend display
- Extract _merge_and_serialize helper to reduce pipeline complexity
- Include VTT-to-SRT conversion utility for downloaded subtitles
- Add 28 new unit tests covering glossary, subtitle fetcher, and API routes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…l error

- Add BookOpen icon button on each subtitle entry's original text (hover to reveal)
- Clicking adds the original text as a glossary term and opens the panel
- Use i18n key glossary.full for capacity error instead of raw backend message

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Display a hint during download phase when the source URL is from
X/Twitter, TikTok, or other non-YouTube platforms to set user
expectations about download speed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Mapleeeeeeeeeee Mapleeeeeeeeeee merged commit 5b12781 into main Apr 21, 2026
7 of 8 checks passed
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.

1 participant