Skip to content

test(dub): cover saving MP4 with original audio before dubbing - #4524

Open
Sampsonyu wants to merge 4 commits into
debpalash:mainfrom
Sampsonyu:codex/fix-undubbed-mp4-original-track
Open

Sampsonyu wants to merge 4 commits into
debpalash:mainfrom
Sampsonyu:codex/fix-undubbed-mp4-original-track

Conversation

@Sampsonyu

@Sampsonyu Sampsonyu commented Nov 28, 2026 •

Copy link
Copy Markdown

Summary

Add a renderer regression test for saving a subtitled MP4 before a dub exists. #4522 already fixed the runtime behavior and closed #4520. The test protects the Save interaction that follows the track selection.

Changes

  • Click Save with subtitle burning enabled and leave the edited transcript sync pending. Verify Save As waits for that sync to complete.
  • Verify the native save request targets the MP4 download for the current job, includes Original as the only and default audio track, and passes the burn-subtitles flag.

Type

  • Tests

Testing

  • Seven related Electron test files: 115 passed on this revision (ca775d0).
  • Electron type checks and locale validation passed.
  • Temporarily stopped awaiting the transcript sync. The new test failed because Save As opened with the sync still pending. Restoring the production code returned the suite to green.
  • The renderer test uses mocked API and native-save calls.

Checklist

  • Every non-exempt human commit author has signed the CLA.
  • No local machine paths, logs, or personal environment details are included.
  • Regression checks ran in an isolated cloud environment.

The only file changed against main is the renderer test. A separate release note and runtime fixture check do not apply to this test-only change.

@github-actions

Copy link
Copy Markdown
Contributor

All contributors on this pull request have signed the VoiceStudio CLA. Thank you!

Agreement: VoiceStudio CLA 1.0

@github-actions github-actions Bot added the cla-signed Human contributors cleared by signed CLA v1.0 and the current PR CLA status. label Nov 28, 2026
@Sampsonyu
Sampsonyu marked this pull request as ready for review November 28, 2026 21:16
@greptile-apps

greptile-apps Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

The test-only change appears safe to merge.RetriggerView in Greptile

[Low impact] The test-only change appears safe to merge.

Summary

Adds an MP4 Save regression test for videos without dubbed audio.

  • Undubbed MP4 exports now have a test for original audio and burned subtitles.

No merge-blocking issues found. Tests were not run during this review.

Reviews (2) · Last reviewed commit: "test(dub): retain MP4 Save regression af..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The export-panel tests now cover undubbed MP4 export with burned subtitles. They verify transcript sync completes before Save As opens, then check the download request options.

Changes: Undubbed MP4 export regression

Layer / File(s) Summary
Export sync and download test
electron/src/renderer/src/features/dub/dub-export-panel.test.tsx
The test mock stubs saved-file recording. A new test checks transcript sync ordering and verifies the download request uses original audio, the original default track, and burned subtitles.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related PRs

Suggested reviewers: debpalash, davidsiguenza

Merge Risk: Minimal · up to ca775

This change adds regression test coverage for exporting an MP4 with burned subtitles before a dub exists. It does not alter production behavior, and no merge-blocking risk was found.

Pre-merge checks: Passed 8

Check name Status Explanation
Linked Issues check Passed Directly linked issue #4520 is closed and completed. Its coding objectives still apply as the linked-issue requirements for this PR, which the previous review also used. The objectives are: (1) a new …
Out of Scope Changes check Passed The changes since the previous review are reported as one test file, dub-export-panel.test.tsx. The added test exercises the MP4 Save path for an undubbed session with original audio and burned subtit…
Title check Passed The title uses the conventional-commit form with the scope (test(dub)) and describes the change: a test covering MP4 save with original audio before dubbing. However, the title does not include an iss…
Description check Passed The description fills the Summary, Changes, Type (Tests), Testing, and Checklist sections with specific content. It references the linked issue #4520 and the related fix #4522. Required template items…
Cross-Platform Default Parity Passed The check applies only when a PR changes default-mode (out-of-the-box) behavior. This PR does not change runtime behavior. Evidence: - The diff against the review base touches one file: `electron/src/…
I18n Completeness (21 Locales) Passed The check does not apply to this PR. The only changed file is electron/src/renderer/src/features/dub/dub-export-panel.test.tsx, a test file. The diff adds no new or changed t('...') calls in Elect…
Local-First Guarantee Passed The PR changes one file: electron/src/renderer/src/features/dub/dub-export-panel.test.tsx (+31/-1, test code only). I checked the full patch and the added lines for network, key, account, analytics,…
Backward Compatibility Passed The check is inapplicable to this change. The reviewed range (refs/coderabbit/pre-merge-check/base to head) changes exactly one file: electron/src/renderer/src/features/dub/dub-export-panel.test.tsx…
Full details: Linked Issues check

Explanation

Directly linked issue #4520 is closed and completed. Its coding objectives still apply as the linked-issue requirements for this PR, which the previous review also used. The objectives are: (1) a new task with subtitle segments and no dub audio initially selects Original for MP4 export, so Save works with the current subtitles and the burn-subtitles option; (2) explicitly saved track preferences are honored; (3) tasks with generated dub audio keep the dubbed-first default. The previous review found the runtime changes in dub-session.ts, dub-export-panel.tsx, and project-format.ts that implement these objectives. The changes since the previous reviewed head (9b335ea to ca775d0) are reported as one test file, dub-export-panel.test.tsx (+31/-1). I read that file at head. It adds a test that saves an undubbed MP4 with burn enabled. The test checks that the edited transcript is POSTed to /dub/sync-transcript/job before Save As opens, and that the download request has include_tracks=original, default_track=original, and burn_subs=true. The table test also covers the saved-exclusion and dubbed-track cases. This test covers objective (1) directly. The incremental diff could not be read because changed blobs are missing from the checkout, so the file list comes from the supplied summary. The test results were reported by the author and were not re-run here. Non-coding cross-platform testing does not apply.

Full details: Out of Scope Changes check

Explanation

The changes since the previous review are reported as one test file, dub-export-panel.test.tsx. The added test exercises the MP4 Save path for an undubbed session with original audio and burned subtitles. This directly supports the #4520 objective, so it is in scope. The rest of the PR was assessed as in scope in the previous review: the runtime changes in dub-session.ts and dub-export-panel.tsx, the save/reopen round trip in project-format.ts and its test, docs/dubbing/export.md, and changelog.d/4524.fixed.md. The diff for the incremental range could not be read, so the claim that only this test file changed rests on the supplied summary and is not independently verified.

Full details: Title check

Explanation

The title uses the conventional-commit form with the scope (test(dub)) and describes the change: a test covering MP4 save with original audio before dubbing. However, the title does not include an issue reference, and the title requirements call for an issue reference in the title or body. The body references #4522 and #4520 as related context, and #4520 is the linked issue, so the reference requirement is met in the body. The title is related to the main change and passes.

Full details: Description check

Explanation

The description fills the Summary, Changes, Type (Tests), Testing, and Checklist sections with specific content. It references the linked issue #4520 and the related fix #4522. Required template items are mostly complete. Gaps: the template's Changes and Testing bullets are filled, but the checklist's changelog fragment item is not addressed. The author states the change is test-only and that the release note does not apply, which explains the omission. The Release cadence and CLA guidance is template boilerplate and does not need content. The description is mostly complete.

Full details: Cross-Platform Default Parity

Explanation

The check applies only when a PR changes default-mode (out-of-the-box) behavior. This PR does not change runtime behavior. Evidence: - The diff against the review base touches one file: electron/src/renderer/src/features/dub/dub-export-panel.test.tsx (+31/-1). - The change is test code only. It adds a recordDubSavedFile mock to the ./dub-session module mock and one new it(...) block. That block checks that Save waits for the transcript sync and that the download request uses include_tracks=original, default_track=original, and burn_subs=true. - No production source file changes. No default configuration, settings value, or platform-specific code path changes. The PR description and objectives say the runtime fix shipped separately in #4522. This PR does not contain that fix. The check does not assess that separate change. Because no default-mode behavior changes, the cross-platform parity requirement does not apply. Platform divergence is not possible from this diff.

Full details: I18n Completeness (21 Locales)

Explanation

The check does not apply to this PR. The only changed file is electron/src/renderer/src/features/dub/dub-export-panel.test.tsx, a test file. The diff adds no new or changed t('...') calls in Electron UI code. The new test only references the existing key dub.flow_save as a button name. I confirmed that key exists in every locale JSON under electron/src/renderer/src/i18n/locales/. The test strings are test fixtures, not user-facing UI text, so no hardcoded UI string was introduced. Catalog count discrepancy: the locales directory holds 22 JSON files (ar, de, en, es, fr, gl, hi, id, it, ja, ko, nl, pl, pt, ru, sv, th, tr, uk, vi, zh-CN, zh-TW), not the 21 the check states. This does not change the result, because no key is added. The check's file count should be corrected if it is used for future PRs that add keys.

Full details: Local-First Guarantee

Explanation

The PR changes one file: electron/src/renderer/src/features/dub/dub-export-panel.test.tsx (+31/-1, test code only). I checked the full patch and the added lines for network, key, account, analytics, telemetry and consent references. The only URL-like match is new URL(..., 'http://localhost') in a test assertion. It is a local base URL for parsing a mocked save request, not an outbound call. Against each part of the check: - No required cloud calls, accounts or API keys are added. The new test mocks the API and native-save calls. - No outbound call is added, so there is nothing to compare against the sanctioned list in CLAUDE.md or .github/CONTRIBUTING.md. - No product analytics code is touched, so the first-run consent requirement is not affected. - No production code changes, so offline behavior is unchanged. The PR also does not alter the runtime fixes from #4522. The linked issue #4520 is historical context only. It does not add any cloud or network requirement.

Full details: Backward Compatibility

Explanation

The check is inapplicable to this change. The reviewed range (refs/coderabbit/pre-merge-check/base to head) changes exactly one file: electron/src/renderer/src/features/dub/dub-export-panel.test.tsx (status M). The diff adds a renderer regression test and a mock for recordDubSavedFile. It does not touch the database schema, alembic migrations, omnivoice_data/ contents (voices, projects, settings), engine code, or model weights. A filename scan of the changed-file list found no migration, schema, SQL, DB, model, weights, or settings paths. No existing data or installed engine state can be affected by this PR, so no migration or reinstall or re-download is forced.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 9b335ea and ca775d0.

Files selected for processing: 1

  • electron/src/renderer/src/features/dub/dub-export-panel.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@Sampsonyu Sampsonyu changed the title fix(dub): include original audio in MP4 exports before dubbing test(dub): cover saving MP4 with original audio before dubbing Nov 29, 2026
@Sampsonyu

Copy link
Copy Markdown
Author

Updated after #4522 merged: this PR now changes only the renderer regression test. It holds transcript sync pending and checks that Save As waits before requesting Original audio with burned subtitles. Removing the await temporarily makes the test fail; restoring it gives 115 passing related tests, with type and locale checks also passing on ca775d0.

Could you review this follow-up, approve the pending CI workflows, and merge once the required checks pass?

This branch has not been deployed

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

Labels

cla-signed Human contributors cleared by signed CLA v1.0 and the current PR CLA status.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] MP4 Save is disabled by default before any dub is generated

2 participants