Skip to content

🔀 chore: sync with CapSoftware/Cap main (2026-11-26) - #4559

Closed
flyingwebie wants to merge 34 commits into
CapSoftware:mainfrom
flyingwebie:chore/sync-upstream-2026-11-26
Closed

flyingwebie wants to merge 34 commits into
CapSoftware:mainfrom
flyingwebie:chore/sync-upstream-2026-11-26

Conversation

@flyingwebie

@flyingwebie flyingwebie commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Merges the latest CapSoftware/Cap main into the fork.

Conflicts

Upstream shipped its own preview playback speed with pitch-preserved audio (#3689). It overlaps the fork's playback_rate + TimeStretcher, so all 6 conflicts were in that area.

  • crates/editor: uses upstream's PreviewSpeed / PreviewSpeedHandle engine. The fork's duplicate playback_rate watch channel, MIN/MAX_PLAYBACK_RATE and TimeStretcher are dropped. The fork's Studio Sound short-cut fallback in export_audio.rs merged cleanly and is kept.
  • apps/desktop-gpui/src/editor_window.rs: starts from upstream's file, which has the speed menu, the </> shortcuts and the persisted speed setting. The fork's Clean Up integration is re-applied on top: state, silence marks, click-to-toggle on the timeline, Esc to leave review, the review pill and silence skipping during playback. The skip window now follows preview_speed.
  • main.rs: keeps both caption_export (upstream) and clean_up (fork).

Checks

  • cargo check --all-targets in apps/desktop-gpui: passes
  • cargo check -p cap-editor --all-targets: passes
  • cargo test --bin cap-gpui -- clean_up silence playhead preview_speed: 54 passed
  • cargo test -p cap-gpui-kernels silence: 4 passed

After merge

Run gh workflow list -R flyingwebie/Cap and disable any newly added upstream workflow that shows active.

🤖 Generated with Claude Code

Confidence Score: 3/5 · Fix transition timing and preserve fullscreen titles before merging; the explicit comments requirement must also be satisfied.RetriggerView in GreptileConfidence Score: 3/5

Fix transition timing and preserve fullscreen titles before merging; the explicit comments requirement must also be satisfied.

Findings

  1. P1 Cuts throw tracks off sync ▶
  2. P1 Silence cuts delete titles ▶
  3. P2 Next gets stuck ▶
  4. P2 Clean Up ignores language ▶
  5. P2 Trigger comments repeat settings ▶
Fix with agent prompt
### Issue 1
apps/desktop-gpui/src/clean_up.rs:468-469
`timeline_silences` leaves only one transition duration beside each cut, but preserving the transition needs twice that much clip length. For example, a 1-second incoming transition followed by silence at source seconds 1–8 leaves a 1-second clip after cutting. The transition then shrinks to 0.5 seconds, while other tracks still move back by the full 7 seconds. They end up 0.5 seconds early.

Reserve twice the transition duration, as `cut_clip_range` does, or calculate the actual timeline change before moving other tracks.

### Issue 2
apps/desktop-gpui/src/editor_edits.rs:1426-1428
`cut_clip_source_range` can delete a fullscreen title when a detected silence crosses its hold. A silence at source seconds 2–8 with a title holding playback at output seconds 4–6 becomes a cut at output seconds 2–10. `ripple_delete_output_tracks` then removes the title completely.

The existing `cut_clip_range` refuses cuts across holds. Apply the same guard here, or split the silence around holds and preserve the title.

### Issue 3
apps/desktop-gpui/src/clean_up.rs:672-674
`focused_position` always finds the first occurrence of a shared `SilenceKey`. Splitting a clip inside one detected silence creates two entries with that key. After Next reaches the second entry, another Next resolves the first entry again and returns the second forever. Later silences become unreachable through Next.

Keep the shared key for keep/cut choices, but track the focused timeline occurrence separately.

### Issue 4
apps/desktop-gpui/src/editor_clean_up.rs:30-43
The new panel hard-codes its controls, messages, and tooltips in English. Only the sidebar tab uses the translated strings added by this PR, so people using another language open an English-only panel.

Move the panel text, preset names, and parameter descriptions into the locale files and use `tr::` calls, including translated counts.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

### Issue 5
.github/workflows/fork-macos-release.yml:10-12
The added trigger description repeats the workflow's `on` settings. The repository guide forbids comments that merely narrate code or describe the change. This requirement must be satisfied before merging.

Remove the routine description, but keep the useful note explaining why a tag pushed with `GITHUB_TOKEN` does not start another run.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Adds Clean Up silence detection, timeline marks, review controls, and one-step cuts. Also adds a fork-only macOS release workflow.

  • The editor finds quiet parts and lets users cut them from the timeline.
  • The fork builds and publishes Apple Silicon macOS releases from its own workflow.

Reviews (1) · Last reviewed commit: "🔀 chore: sync with CapSoftware/Cap main" · Reviewed by Greptile

flyingwebie and others added 30 commits October 15, 2026 17:09
EditorInstance::set_playback_rate (0.25x to 4x) paces playback by wall clock
divided by the rate while frame numbers stay in timeline frames. Audio goes
through a realtime-safe WSOLA time stretcher that is bypassed at 1x.
… menu

- Playback jumps over pending silences while the Clean Up marks are shown;
  kept silences play normally.
- Clicking a silence mark opens it for review with Keep / Cut now buttons;
  double-clicking a focused mark toggles keep.
- Boost quiet audio (on by default) raises quiet recordings towards a voice
  reference before detection. Playback and export are unchanged.
- A speed button next to the time readout sets the preview rate from 0.5x to
  2x.
… the primary

GPUI's macOS visible_bounds is relative to its own display, but the work area
conversion treated its y as AppKit-global. On a display stacked above the
primary one the recording controls were clamped above every screen.
feat(desktop-gpui): Clean Up silence cutting, preview speed, stacked-display controls fix
Falls back to an ad-hoc signature when the APPLE_* secrets are missing.

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Studio Sound re-reads ~0.5s before each cut to warm up the voice
enhancer. The streaming MP4 audio reader only moves forward, so a cut
shorter than that inside one clip failed export with "Invalid
sequential export audio window". Such timelines now use the in-memory
export path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🐛 fix(editor): fix export failing on short Studio Sound cuts
Keeps the fork's preview playback rate in the editor audio output.
Upstream moved the playhead sync into a helper used by the new offline
test sink, so the helper now also flushes the time stretcher and scales
latency by the playback rate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Notarization rejected the fork release because the ONNX Runtime dylib in
the app's Resources had only an ad-hoc signature. cap-setup signs it, but
the workflow ran cap-setup before importing the Developer ID and without
APPLE_SIGNING_IDENTITY. Import the certificate first and pass the
identity and keychain to cap-setup, as the upstream release does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔀 chore: sync with CapSoftware/Cap main and fix the fork release signing
# Conflicts:
#	apps/desktop-gpui/src/editor_window.rs
🔀 chore: sync with CapSoftware/Cap main (2026-10-20)
🔀 chore: sync with CapSoftware/Cap main
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… speed menu

Clean Up detects silences in the recording and cuts them from the timeline
(detection lives in kernels/src/silence.rs). Playback can skip silences, with
silence marks shown on the timeline, and a preview speed menu sets the
pitch-preserving preview rate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e clip offsets

Mic and system audio offsets come straight from project-config.json. A large
negative offset grew the combined silence envelope without limit, allocating
and scanning a huge buffer as soon as the editor opened. Offsets are now
clamped and the envelope never grows past the longest track.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…x while preparing

- TimeStretcher goes back to passthrough when the rate returns to exactly 1.0:
  the source is moved back to the last emitted sample and the stretcher is
  flushed, so 1x playback is bit-identical again after a speed change.
- The playback clock stays at 1x while adopted preparing audio (which has no
  stretcher) owns playback, and picks the rate up at the handoff.
- Trim doc comments that restated the code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ck speed while preparing

- Editor waveforms are set as soon as their peaks are ready; the Clean Up
  loudness envelopes are computed afterwards, so opening the editor no longer
  waits for them.
- The preview speed menu is disabled, and the playhead uses 1x, while the
  editor is still preparing, since that audio path only plays at 1x.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…74-review

# Conflicts:
#	apps/desktop-gpui/src/app_windows.rs
…r-2774-review

# Conflicts:
#	apps/desktop-gpui/src/clean_up.rs
#	apps/desktop-gpui/src/editor_window.rs
#	crates/editor/src/audio.rs
#	crates/editor/src/audio_output.rs
#	crates/editor/src/editor_instance.rs
#	crates/editor/src/playback.rs
🔀 chore: sync upstream main and the PR CapSoftware#2774 review changes
flyingwebie and others added 4 commits November 1, 2026 17:58
Merge 2095 upstream commits into the fork.

- audio_output.rs: keep the fork's `f32: FromSample<T>` bound (preview
  speed) and take upstream's new `PlaybackAudioCache` parameter.
- editor_sidebar.rs: upstream moved tab titles to i18n; add a
  `clean_up` key in every locale for the fork's Clean Up tab.
- fork-macos-release.yml: upstream removed apps/desktop (Tauri), so read
  the version from apps/desktop-gpui/Cargo.toml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔀 chore: sync with CapSoftware/Cap main (2026-11-01)
Upstream shipped its own preview playback speed (CapSoftware#3689), which overlaps the
fork's playback_rate/TimeStretcher. Conflicts resolved by taking upstream's
PreviewSpeed engine in crates/editor and its speed menu in the GPUI editor,
dropping the fork's duplicate rate plumbing. The Clean Up tab, silence marks
and silence skipping are re-applied on top, with the skip window now driven
by upstream's preview speed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@flyingwebie

Copy link
Copy Markdown
Contributor Author

Opened against the wrong repository by mistake, sorry for the noise.

@vercel

vercel Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

@flyingwebie is attempting to deploy a commit to the Cap Software Inc Team on Vercel.

A member of the Team first needs to authorize it.

Comment on lines +468 to +469
let lower = segment.start + incoming * timescale;
let upper = segment.end - outgoing * timescale;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Cuts throw tracks off sync

timeline_silences leaves only one transition duration beside each cut, but preserving the transition needs twice that much clip length. For example, a 1-second incoming transition followed by silence at source seconds 1–8 leaves a 1-second clip after cutting. The transition then shrinks to 0.5 seconds, while other tracks still move back by the full 7 seconds. They end up 0.5 seconds early.

Reserve twice the transition duration, as cut_clip_range does, or calculate the actual timeline change before moving other tracks.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop-gpui/src/clean_up.rs
Line: 468-469

Comment:
**Cuts throw tracks off sync**

`timeline_silences` leaves only one transition duration beside each cut, but preserving the transition needs twice that much clip length. For example, a 1-second incoming transition followed by silence at source seconds 1–8 leaves a 1-second clip after cutting. The transition then shrinks to 0.5 seconds, while other tracks still move back by the full 7 seconds. They end up 0.5 seconds early.

Reserve twice the transition duration, as `cut_clip_range` does, or calculate the actual timeline change before moving other tracks.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment on lines +1426 to +1428
let holds = timeline.hold_windows();
let output_cut_start = effective_to_output_end(&holds, cut_start);
let output_cut_end = effective_to_output_end(&holds, cut_end);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Silence cuts delete titles

cut_clip_source_range can delete a fullscreen title when a detected silence crosses its hold. A silence at source seconds 2–8 with a title holding playback at output seconds 4–6 becomes a cut at output seconds 2–10. ripple_delete_output_tracks then removes the title completely.

The existing cut_clip_range refuses cuts across holds. Apply the same guard here, or split the silence around holds and preserve the title.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop-gpui/src/editor_edits.rs
Line: 1426-1428

Comment:
**Silence cuts delete titles**

`cut_clip_source_range` can delete a fullscreen title when a detected silence crosses its hold. A silence at source seconds 2–8 with a title holding playback at output seconds 4–6 becomes a cut at output seconds 2–10. `ripple_delete_output_tracks` then removes the title completely.

The existing `cut_clip_range` refuses cuts across holds. Apply the same guard here, or split the silence around holds and preserve the title.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment on lines +672 to +674
pub fn focused_position(&self) -> Option<usize> {
let key = self.focused?;
self.silences.iter().position(|silence| silence.key == key)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Next gets stuck

focused_position always finds the first occurrence of a shared SilenceKey. Splitting a clip inside one detected silence creates two entries with that key. After Next reaches the second entry, another Next resolves the first entry again and returns the second forever. Later silences become unreachable through Next.

Keep the shared key for keep/cut choices, but track the focused timeline occurrence separately.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop-gpui/src/clean_up.rs
Line: 672-674

Comment:
**Next gets stuck**

`focused_position` always finds the first occurrence of a shared `SilenceKey`. Splitting a clip inside one detected silence creates two entries with that key. After Next reaches the second entry, another Next resolves the first entry again and returns the second forever. Later silences become unreachable through Next.

Keep the shared key for keep/cut choices, but track the focused timeline occurrence separately.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment on lines +30 to +43
let status = if !state.loaded() {
self.render_clean_up_notice("Analyzing audio…")
} else if !state.has_audio() {
self.render_clean_up_notice("This recording has no audio to analyze.")
} else {
self.render_clean_up_summary(summary)
};

let count_line = match (summary.count, summary.kept) {
(0, 0) => "No silences match these settings".to_string(),
(count, 0) => format!("{count} {} to cut", plural(count, "silence", "silences")),
(count, kept) => format!(
"{count} {} to cut · {kept} kept",
plural(count, "silence", "silences")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Clean Up ignores language

The new panel hard-codes its controls, messages, and tooltips in English. Only the sidebar tab uses the translated strings added by this PR, so people using another language open an English-only panel.

Move the panel text, preset names, and parameter descriptions into the locale files and use tr:: calls, including translated counts.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop-gpui/src/editor_clean_up.rs
Line: 30-43

Comment:
**Clean Up ignores language**

The new panel hard-codes its controls, messages, and tooltips in English. Only the sidebar tab uses the translated strings added by this PR, so people using another language open an English-only panel.

Move the panel text, preset names, and parameter descriptions into the locale files and use `tr::` calls, including translated counts.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +10 to +12
# Every merge to main builds and publishes a release tagged
# fw-v<version>-build.<run>. It also runs from the Actions tab, or when a tag
# named fw-v<anything> is pushed. The tag the release step creates is pushed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Trigger comments repeat settings

The added trigger description repeats the workflow's on settings. The repository guide forbids comments that merely narrate code or describe the change. This requirement must be satisfied before merging.

Remove the routine description, but keep the useful note explaining why a tag pushed with GITHUB_TOKEN does not start another run.

Context Used: CLAUDE.md (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/fork-macos-release.yml
Line: 10-12

Comment:
**Trigger comments repeat settings**

The added trigger description repeats the workflow's `on` settings. The repository guide forbids comments that merely narrate code or describe the change. This requirement must be satisfied before merging.

Remove the routine description, but keep the useful note explaining why a tag pushed with `GITHUB_TOKEN` does not start another run.

**Context Used:** CLAUDE.md ([source](https://github.com/capsoftware/cap/blob/main/CLAUDE.md))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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