Fix Remotion Studio bundling; add caption translation and RTL support#1
Conversation
- Add remotion.config.ts with webpack extensionAlias so .js imports resolve to TS sources - Register Remotion root via src/remotion-entry.tsx - Export translateCaptionData and captioneer translate CLI (OpenAI, preserves timings) - AnimatedCaptions supports textDirection for RTL; mark roadmap item done - package type module removes Node ESM warning; CLI version reads from package.json - Bump scaffold remotion-captioneer dependency to ^0.9.0 Co-authored-by: Shuvo Anirban Roy <anirbanroy691@gmail.com>
Code Review Roast 🔥Verdict: No Issues Found | Recommendation: Merge Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything. All 5 previously flagged issues have been fixed:
🏆 Best part: You didn't just paper over the issues — you actually extracted 📊 Overall: Like watching someone clean up after a party — the place was a disaster, but now it's spotless. All previous findings addressed with quality fixes. Ship it. Files Reviewed (8 files)
Reviewed by glm-5 · 465,767 tokens |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5c341a6. Configure here.
PR merge refs are blocked by Pages environment rules; skip deploy job for pull_request. Co-authored-by: Shuvo Anirban Roy <anirbanroy691@gmail.com>
- assertValidTargetLanguageTag: strict alphanumeric BCP-47 subset for prompts - assertCaptionDataShape + export for library/CLI consumers - OpenAI fetch via AbortController (default 120s, optional timeoutMs) - Batch segments (25) per request to reduce truncation risk - CLI: JSON parse + shape validation + translate try/catch with clear errors Co-authored-by: Shuvo Anirban Roy <anirbanroy691@gmail.com>
Use ❌ Error: prefix for all failures (JSON, shape, OpenAI, write). Co-authored-by: Shuvo Anirban Roy <anirbanroy691@gmail.com>

Summary
npm start/ Remotion Studio:remotion.config.ts+src/remotion-entry.tsx.translateCaptionData(),captioneer translate, optionaltextDirectiononAnimatedCaptions.assertValidTargetLanguageTag()(strict safe BCP-47 subset for prompts),assertCaptionDataShape()for parsed JSON, 120s default fetch timeout (timeoutMsoption), 25-segment batching per API call, CLI JSON parse + validation + error handling.pushtomain.Testing
npm run buildnpx tsc --noEmitnpx remotion compositionsnpx captioneer --helpNotes
OPENAI_API_KEY(or--api-key).^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$(e.g.es,fr-CA,zh-Hans).