Skip to content

fix: 'zoom to timeline' now scales the timeline to 95% of the viewport - #47

Open
PlkMarudny wants to merge 1 commit into
ronak-create:mainfrom
PlkMarudny:zoom-to-timeline-fix
Open

fix: 'zoom to timeline' now scales the timeline to 95% of the viewport#47
PlkMarudny wants to merge 1 commit into
ronak-create:mainfrom
PlkMarudny:zoom-to-timeline-fix

Conversation

@PlkMarudny

@PlkMarudny PlkMarudny commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

'Zoom to timeline' ( shortcut Z) feature now scales the timeline so that it it fits within 95% of the available space.

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

  • Bug Fixes
    • Timeline zoom-to-fit now fills approximately 95% of the visible timeline width for a more consistent view.
    • Removed unnecessary trailing space from zoom-to-fit calculations.
    • Timeline duration no longer expands incorrectly when clips reference unavailable tracks.

@coderabbitai

coderabbitai Bot commented Jul 28, 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: c27fe263-a3d3-4998-b11a-92bde01b128a

📥 Commits

Reviewing files that changed from the base of the PR and between 6ec153e and 4664b70.

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

📝 Walkthrough

Walkthrough

Changes

Timeline fit behavior

Layer / File(s) Summary
Valid clip duration calculation
app.js
projDur() ignores clips referencing unknown tracks and excludes non-finite clip end times when calculating the timeline duration.
Viewport-based zoom fitting
app.js
zoomToFit() uses the project duration without trailing padding, scales content to 95% of the viewport, and scrolls to the timeline start.

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

Suggested reviewers: xusnitdinov

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary change to Zoom to timeline behavior and the 95% viewport fit.
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