Skip to content

test(export): cover odd MP4 dimension normalization#463

Merged
meiiie merged 1 commit into
mainfrom
fix/issue460-vertical-export-resolution
May 9, 2026
Merged

test(export): cover odd MP4 dimension normalization#463
meiiie merged 1 commit into
mainfrom
fix/issue460-vertical-export-resolution

Conversation

@meiiie
Copy link
Copy Markdown
Collaborator

@meiiie meiiie commented May 9, 2026

Description

Add focused regression coverage for odd MP4 source dimensions in the export dimension helpers.

Motivation

Follow-up to #462 and CodeRabbit's test-coverage note: the helper already normalizes odd dimensions for encoder safety, but the behavior should be locked by a direct test.

Type of Change

  • Bug Fix
  • New Feature
  • Refactor / Code Cleanup
  • Documentation Update
  • Other: test coverage

Related Issue(s)

Changes Made

  • add an odd-dimension regression case for calculateMp4SourceDimensions
  • verify calculateMp4ExportDimensions keeps source and high outputs even

Scope Note

Test-only follow-up. No export logic changes.

Testing Guide

  1. Run the focused export-dimension test suite.
  2. Confirm the odd-dimension case passes for native/source and high-quality outputs.

Checklist

  • I have performed a self-review of my code.
  • I have tested the change locally.
  • I have kept the PR test-only.

Local checks run:

  • npm test -- src/components/video-editor/exportDimensions.test.ts
  • npx biome check src/components/video-editor/exportDimensions.test.ts
  • git diff --check

Summary by CodeRabbit

  • Tests
    • Improved test coverage for video export dimensions, verifying that odd source dimensions are properly normalized to even export dimensions across different export quality modes.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 9, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4578295a-9160-408d-984c-6849a5fe6e04

📥 Commits

Reviewing files that changed from the base of the PR and between f3887b3 and ea747c1.

📒 Files selected for processing (1)
  • src/components/video-editor/exportDimensions.test.ts

📝 Walkthrough

Walkthrough

A new test case was added to verify that calculateMp4ExportDimensions normalizes odd source dimensions to even export dimensions and produces expected output sizes for source and high export modes.

Changes

Export Dimensions Test Coverage

Layer / File(s) Summary
Test: Odd Dimension Normalization
src/components/video-editor/exportDimensions.test.ts
Vitest test case validates calculateMp4ExportDimensions normalizes odd source dimensions (e.g., 1079×1919) to even dimensions (1078×1920) and verifies source and high mode export dimensions are calculated correctly from the normalized baseline.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

Checked

Poem

🐰 A test hops in with grace and care,
Ensuring dimensions, even and fair,
Odd numbers tamed to a perfect pair,
Export modes checked with quality there! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the main change: adding test coverage for odd MP4 dimension normalization in the export dimensions module.
Description check ✅ Passed The description covers all critical template sections with clear details: purpose, motivation, type of change, related issues, and testing guide. While screenshots/videos are not applicable for test-only changes, the essential information is complete.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue460-vertical-export-resolution

Comment @coderabbitai help to get the list of available commands and usage tips.

@meiiie meiiie merged commit 7adfbc8 into main May 9, 2026
3 checks passed
@meiiie meiiie deleted the fix/issue460-vertical-export-resolution branch May 9, 2026 01:39
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