Fix add_clips leaving stranded audio when overwriting linked clips#124
Open
PriyeshPandey2000 wants to merge 1 commit into
Open
Fix add_clips leaving stranded audio when overwriting linked clips#124PriyeshPandey2000 wants to merge 1 commit into
PriyeshPandey2000 wants to merge 1 commit into
Conversation
PriyeshPandey2000
force-pushed
the
fix/add-clips-stranded-linked-audio
branch
from
June 25, 2026 08:49
bb6f8ad to
349e77b
Compare
clearRegion calls splitClip (which splits linked partners on both tracks) then removeClips (which only removes the given clip id). When add_clips overwrites a linked V+A pair, the audio fragment in the cleared range is never removed. placeClip then finds the audio track occupied and creates a spurious second audio track, causing the original audio to play under the new clip. Fix collects linked partner track IDs before clearing the video track, then issues a second clearRegion on each partner track. placeClip finds the audio track clear and routes the new audio there correctly.
PriyeshPandey2000
force-pushed
the
fix/add-clips-stranded-linked-audio
branch
from
June 26, 2026 04:07
349e77b to
4b776e1
Compare
TimLai666
added a commit
to TimLai666/fronda
that referenced
this pull request
Jul 10, 2026
First-ever complete inventory (207 PRs / 79 issues). Multicam passthrough already landed; tool-surface v2 (palmier-io#263) flagged as a user decision; two verified-in-Rust bugs (palmier-io#263 ripple fixpoint, palmier-io#124 stranded audio) and three UNVERIFIED checks queued. Also drops the now-unused GenerationInput lib import.
TimLai666
added a commit
to TimLai666/fronda
that referenced
this pull request
Jul 10, 2026
…ruption bugs, palmier-io#264 overflow ceiling, palmier-io#36/palmier-io#268 ports, palmier-io#139/palmier-io#212 verified TDD per item (RED repro first, then fix): palmier-io#124 (BUG-FIXED): place_clips overwriting a linked V+A pair cleared only the target track — the audio partner's range stayed (double playback) and new linked audio was pushed onto a spurious extra track. Now a video-track overwrite clears the same range on linked-partner tracks (mirrors Swift PR 4b776e1's video-gated semantics); audio-track placement stays track-local. palmier-io#263 (BUG-FIXED): compute_ripple_delete partner propagation only scanned the anchor track, so linked partners of clips on cleared sync-locked tracks were left behind on lock-off tracks (desync). Propagation is now a worklist fixpoint across ALL cleared tracks; palmier-io#227 sync-follower and palmier-io#207 ignore-set semantics unchanged. palmier-io#264/palmier-io#265 (BUG-FIXED): near-i64::MAX frame/duration args crashed the process (debug 'attempt to add with overflow' in insert/move/apply_layout/add_texts; set_clip_properties silently stored poisoned values). Shared MAX_TOOL_FRAME (1e9, upstream maxToolFrame) + require_frame_in_bounds in mutation.rs, wired into both the mutation validators and the executor's live arg parsing (resolve_placement, insert_clips frame incl. >=0 guard, move_clips toFrame, split_clips atFrame/frames, set_clip_properties duration/trims, apply_layout, add_texts). ripple_delete_ranges stays clamp-tolerant like upstream. palmier-io#139 (VERIFIED-OK): format_timecode already uses drop-adjusted divisors (1798/17982); frame 1800 @29.97DF = 00;01;00;02 pre-existing test confirmed, 10-minute-boundary assertions added (17982 -> 00;10;00;00). palmier-io#212 (VERIFIED-OK + guard): speed 0.1 legal end-to-end, duration math pinned (150f @1.0 -> 1500f @0.1). Fixed the live executor silently storing speed <= 0 — now rejects 'speed must be > 0' like Swift. palmier-io#36 (PORTED): AnthropicConfig::from_env honours ANTHROPIC_BASE_URL (trimmed, blank falls back to the public API); chat_view uses it; URL construction unit-tested via pure resolve_base_url. palmier-io#268 (PORTED): sonnet5-family requests carry output_config.effort=low (shape from upstream AgentClientTypes.swift), applied in build_agent_request AND the live run_agent_turn body; snapshot + ScriptedTransport tests. Gates (exit code 0): cargo test --workspace; cargo test -p fronda-app-shell-gpui --features desktop-app; cargo check -p fronda-app-shell-gpui --features desktop-app --bin fronda.
TimLai666
added a commit
to TimLai666/fronda
that referenced
this pull request
Jul 10, 2026
All 8 items verdicted: palmier-io#124 stranded audio + palmier-io#263 ripple fixpoint BUG-FIXED (TDD, upstream-diff-matched), palmier-io#139 drop-frame + palmier-io#212 speed VERIFIED-OK (with boundary pins + a speed<=0 guard), palmier-io#264 overflow ceiling + palmier-io#36 base URL + palmier-io#268 sonnet5 effort:low PORTED. 19 new tests. Residuals flagged: mutation.rs is a dormant validation layer (live path never calls it - palmier-io#144's checks included), and cmd_add_texts ignores startFrame (chip task_14403ebd).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
clearRegion calls splitClip (which splits linked partners on both tracks) then removeClips (which only removes the given clip id). When add_clips overwrites a linked V+A pair, the audio fragment in the cleared range is never removed. placeClip then finds the audio track occupied and creates a spurious second audio track, causing the original audio to play under the new clip.
Fix collects linked partner track IDs before clearing the video track, then issues a second clearRegion on each partner track. placeClip finds the audio track clear and routes the new audio there correctly.
Note
Medium Risk
Targeted agent timeline overwrite path for linked V+A; wrong partner detection could over-clear audio, but scope is narrow and covered by a new test.
Overview
Fixes
add_clipswhen it overwrites part of an existing linked video+audio pair on the timeline.Before placing each clip, the handler still
clearRegionon the target video track, but it now pre-collects linked partner tracks for clips overlapping that range and runsclearRegionon those tracks too. That removes audio fragments that used to survive after a video-only clear (split partners, remove only the video piece), which led to double playback andplaceClipspawning an extra audio track.Adds regression test
addClipsClearsLinkedAudioWhenOverwritingLinkedPairasserting two tracks stay, three audio segments, and the middle segment uses the new asset.Reviewed by Cursor Bugbot for commit 4b776e1. Bugbot is set up for automated code reviews on this repo. Configure here.