Skip to content

fix(timeline): fan speed and Full Camera regions out to both halves of an insertion - #1051

Merged
EtienneLescot merged 1 commit into
mainfrom
fix/1037-fan-out-anchors
Oct 7, 2026
Merged

EtienneLescot merged 1 commit into
mainfrom
fix/1037-fan-out-anchors

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Typing a word into a clip cuts it in two. fanOutAnchors copied the anchored rows onto both halves from a hand-picked list that left out speed and Full Camera regions, so those were clamped to the left half and the right half lost them.

  • The modifier collections now go through mapAllRegionCollections (exported from timeline.ts), which walks all of them, including later ones.
  • Audio is still fanned out on its own: that walk also re-anchors takes, so audio behaviour after an insertion does not change.

Related issue

Closes #1037

Type of change

  • Bug fix

Release impact

  • Patch

Desktop impact

  • Not platform-specific

Testing

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Fixed how legacy speed and Full Camera regions are assigned when an insertion splits a clip. Regions after the cut now follow the new clip, and regions spanning the cut are split across both clips.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2603c840-a204-47e4-b941-84558dad8b1e
📥 Commits

Reviewing files that changed from the base of the PR and between c3b2cad and d9d35b7.

📒 Files selected for processing (3)
  • src/lib/ai-edition/document/insertion.test.ts
  • src/lib/ai-edition/document/insertion.ts
  • src/lib/ai-edition/document/timeline.ts

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


📝 Walkthrough

Walkthrough

Clip insertion now maps anchored modifier collections across split clips. A new test checks that speed and Full Camera regions on the right half use its clip ID, and that regions crossing the cut are split between the two clips.

Changes

Clip Insertion

Layer / File(s) Summary
Map anchored regions across split clips
src/lib/ai-edition/document/timeline.ts, src/lib/ai-edition/document/insertion.ts, src/lib/ai-edition/document/insertion.test.ts
mapAllRegionCollections is exported and used by fanOutAnchors to duplicate modifier collection rows. Trim ranges and audio tracks remain handled separately. The test checks speed and Full Camera region reassignment and splitting at the insertion cut.

Priority: ➖ Normal

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

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to d9d35

Speed and Full Camera regions are now preserved on both halves when a clip is split by an insertion. No actionable merge risk remains, though the behavior was not tested in the app.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: fan out speed and Full Camera regions to both halves after an insertion.
Description check ✅ Passed The description covers the change, linked issue, change type, release and desktop impact, and testing. The omitted screenshots section is not needed for this non-visual change.
Linked Issues check ✅ Passed #1037 requires every anchored collection to fan out when insertion splits a clip. fanOutAnchors now uses mapAllRegionCollections for modifier collections, handles trim ranges separately, and keeps…
Out of Scope Changes check ✅ Passed The changes are limited to insertion fan-out, exporting the collection mapper for that use, and a regression test. Each change supports #1037. The separate audio handling preserves existing behavior a…
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@EtienneLescot
EtienneLescot merged commit 3e9ae72 into main Oct 7, 2026
19 checks passed
@EtienneLescot
EtienneLescot deleted the fix/1037-fan-out-anchors branch October 7, 2026 10:08
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.

[Bug]: Inserting a word into a clip drops the speed and Full Camera regions of its right half

1 participant