Skip to content

fix(editor): allow muting split segments independently - #2110

Open
akash1520 wants to merge 1 commit into
CapSoftware:mainfrom
akash1520:fix/independent-segment-mute
Open

fix(editor): allow muting split segments independently#2110
akash1520 wants to merge 1 commit into
CapSoftware:mainfrom
akash1520:fix/independent-segment-mute

Conversation

@akash1520

@akash1520 akash1520 commented Aug 11, 2026

Copy link
Copy Markdown

Summary

Fixes #2109.

Adds segment-level audio muting for recording clips. After splitting a clip, each resulting segment can now be muted or unmuted independently from the editor sidebar.

Changes

  • Add a persisted audioMuted property to timeline segments
  • Add Segment Settings → Audio → Mute Audio
  • Apply segment muting during preview and export
  • Support normal-speed, retimed, and transitioning segments
  • Preserve mute state when splitting or importing segments
  • Default existing projects to unmuted for backward compatibility
  • Keep the existing global mute control as the master control
  • Leave imported/background audio controls unchanged

Testing

  • cargo test -p cap-editor audio::tests
  • cargo test -p cap-project timeline_segment_defaults_audio_muted_for_existing_projects
  • cargo check -p cap --all-targets
  • cargo check -p cap-desktop
  • Desktop TypeScript typecheck
  • Scoped Biome checks

UI after this PR

image

Greptile Summary

The PR adds independently persisted segment-level audio muting and applies it consistently during preview, export, splitting, and Cap-project import.

  • Adds the audioMuted timeline-segment field with backward-compatible deserialization.
  • Adds the editor sidebar control and project-state update action.
  • Applies segment and global mute checks in the shared audio-rendering path.
  • Preserves each source timeline segment’s mute value when importing a Cap project.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported import path now preserves each timeline segment’s mute state through the target timeline construction.

Important Files Changed

Filename Overview
apps/desktop/src-tauri/src/import.rs The revised Cap-project import path now copies each source timeline segment’s audio_muted value into the imported timeline, resolving the prior reset.
crates/editor/src/audio.rs Segment muting is enforced before both normal-speed and retimed audio rendering while retaining global mute as the master control.
crates/project/src/configuration.rs Adds persisted segment mute state with a false serde default for backward compatibility.
apps/desktop/src/routes/editor/ConfigSidebar.tsx Adds a segment-level mute toggle wired to the selected timeline segment.
apps/desktop/src/routes/editor/context.ts Adds the editor action that updates the selected segment’s persisted mute state.

Reviews (2): Last reviewed commit: "fix(editor): allow muting split segments..." | Re-trigger Greptile

Context used (3)

Comment thread apps/desktop/src-tauri/src/import.rs Outdated
@akash1520
akash1520 force-pushed the fix/independent-segment-mute branch from bd66fc6 to 7a0de47 Compare August 11, 2026 08:13
@richiemcilroy

Copy link
Copy Markdown
Member

hey! can you please get this to a 5/5?

Persist mute state per timeline segment instead of per clip, so splitting
a segment lets each half be muted independently. Centralizes the mute
check in the audio renderer for normal-speed, retimed, and transition
audio, and threads audioMuted through Cap-project import so it isn't
lost when appending a muted segment into another project.
@akash1520
akash1520 force-pushed the fix/independent-segment-mute branch from 7a0de47 to 71a1a26 Compare August 11, 2026 13:46
@akash1520

Copy link
Copy Markdown
Author

Hey @richiemcilroy, could you re-run Greptile on this? I've fixed the import regression it flagged and added a test covering it, so it should score 5/5 now.

@richiemcilroy

Copy link
Copy Markdown
Member

hey @greptileai please re-review the pr

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.

After splitting a track, users should be able to mute each of the resulting tracks individually

2 participants