Repository navigation
Applying a native editor preset replaces or clears the current caption text #3310
Description
Description
Applying a native desktop editor preset can replace a recording's caption text with another recording's transcript, or clear its saved caption source when the preset has no captions.
Presets preserve the current timeline and clips, but replace the complete CaptionsData with the preset's copy. The editor then runs caption synchronization using that replaced source. Newly saved presets also contain the original recording's transcript.
Expected: a preset applies caption styling while retaining the current recording's text, word timings and source-timing mode. The built-in Default preset should also retain that source.
Reproduction
- Generate captions for recording A, then save an editor preset.
- Generate captions for a different recording B.
- Apply A's preset to B. The caption track now contains A's words.
- Alternatively, apply a preset saved without captions. B's caption source is removed. Native projects without a legacy captions sidecar cannot restore it simply by re-enabling captions.
The production preset functions followed by the real cap_project::synchronize_captions reproduce both cases:
| Current recording / applied preset | Current main | Fixed behavior |
|---|---|---|
Current recording / preset containing Other recording |
Track reads Other recording |
Track reads Current recording; preset style applies |
| Captioned recording / uncaptioned preset | Caption source becomes absent | Caption source retained; default caption settings apply |
| Captioned recording / built-in Default | Caption source becomes absent | Caption source retained; default caption settings apply |
| Save a preset from a captioned recording | Preset JSON contains transcript text | Preset stores caption settings without transcript text |
Additional Context
- Baseline:
e8db1fe537c8cdfec2671aef78caee8639a3830a, also reproduced at548e04a42261a826192c9e17f2c5264215ca270c. - Native GPUI editor, Ubuntu 24.04 AArch64, Rust 1.99.1 for focused tests.
- Affects
apps/desktop-gpui/src/presets.rsand the built-in Default entry point ineditor_window.rs. - Two independent reproduction tests fail on the baseline and pass with the fix. The 13 production preset module tests and 189 real shared-project tests pass. Caption projection and save/reopen are tested using actual project source, with preset-store IO stubbed.
- An independent GPT-6.1 Sol xhigh review repeated the baseline failures and passed the 15 supplied tests plus three additional tests, including per-caption overrides and edited-timeline timing.
- Legacy
captions.jsonsidecars can restore older text when the caption master becomes absent. This report does not claim every case causes unrecoverable data loss. - All-state issue/PR searches for preset/caption/transcript and
apply_preset/preset_configfound no matching report or active owner. Nearby feat(gpui): lock timeline tracks so clip edits don't move them #2781, feat(desktop-gpui): copy and paste text segment styles from the timeline menu #2822, fix(desktop-gpui): movable manual captions, area aspect ratio lock, playhead clamp after shortening edits #3230 and feat: configurable words per caption segment #3296 address different behavior.
The same saved presets are consumed by CLI upload automations: cap upload existing.cap triggers UploadCompleted and can run ApplyPreset against a captioned project. The original CLI method at 9960049 also reproduces replacing the caption source with foreign text, emptying it when using a newly saved GPUI preset, and discarding current clip offsets. The follow-up shares the preservation merge between the GPUI editor and CLI; actual project IO and caption synchronization verify save/reopen behavior.
Activity
linear commentedon Oct 26, 2026
CAP-929
fix(presets): keep a recording's transcript when applying a preset