Skip to content

refactor: replaced similar functions with improved generalized ones#43

Open
PlkMarudny wants to merge 1 commit into
ronak-create:mainfrom
PlkMarudny:duplicate-removal
Open

refactor: replaced similar functions with improved generalized ones#43
PlkMarudny wants to merge 1 commit into
ronak-create:mainfrom
PlkMarudny:duplicate-removal

Conversation

@PlkMarudny

@PlkMarudny PlkMarudny commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Similar functions were replaced and consolidated.

Type of change

  • Bug fix
  • New feature (transition / preset / text anim / effect / API)
  • Docs
  • Refactor / internal

How was it verified?

  • node --check server.js && node --check app.js && node --check mcp-server.js passes
  • Opened the editor and confirmed the change in preview
  • Confirmed the change in an export (fast or realtime), if it affects rendering
  • Updated CLAUDE.md / README.md if the schema, props, or API changed

Checklist

  • No new runtime dependencies added
  • Preview and export render identically (single compositor)
  • Commits are focused and messages are descriptive

Summary by CodeRabbit

  • Improvements
    • Media imports now populate duration and dimensions more reliably.
    • Video thumbnails and audio waveforms are prepared consistently after import.
    • Audio channel isolation is handled consistently during playback and export.
    • Timeline gap closing and clip selection now behave more predictably.
    • Project and library media icons are displayed consistently.
    • Text sizing, measurement, and line spacing are more consistent across layouts.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 57330586-8c72-4c8c-bc83-e13f764f406b

📥 Commits

Reviewing files that changed from the base of the PR and between 8aac11f and 71f9b77.

📒 Files selected for processing (1)
  • app.js

📝 Walkthrough

Walkthrough

This update centralizes media metadata loading, icon selection, enabled-track filtering, channel-isolated audio routing, visible clip ordering, and text line-height calculation across app.js.

Changes

Shared application logic

Layer / File(s) Summary
Media metadata and icon handling
app.js
Media imports and library items use shared metadata loading, while bin and library rendering use shared media-kind icons.
Enabled-track gap utilities
app.js
Gap operations obtain enabled tracks through a shared helper.
Channel-isolated audio routing
app.js
Live playback, audio-hold refresh, and offline mixing reuse common splitter/merger routing.
Visible clip enumeration
app.js
Frame drawing and hit testing use shared compositing-ordered visible clips.
Shared text line-height calculation
app.js
Font fitting, measurement, and drawing use a common line-height helper.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: ur5fot, xusnitdinov

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is related to the refactor, but it is too generic to convey the main change clearly. Use a specific title that names the main refactor, such as consolidating media loading, audio routing, and clip selection helpers.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

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