Skip to content

feat(desktop): add toggle to enable/disable captions display#1597

Open
tangero wants to merge 1 commit intoCapSoftware:mainfrom
tangero:feat/captions-toggle
Open

feat(desktop): add toggle to enable/disable captions display#1597
tangero wants to merge 1 commit intoCapSoftware:mainfrom
tangero:feat/captions-toggle

Conversation

@tangero
Copy link

@tangero tangero commented Feb 14, 2026

Add toggle control in Captions tab header to show/hide captions without deleting generated segments. When disabled, captions remain saved but are not rendered in the video output.

Changes:

  • Add enabled toggle to Field component in CaptionsTab
  • Toggle is disabled until captions are generated
  • Preserves caption data when toggled off
  • Syncs with existing enabled flag in caption settings
  • Uses existing Toggle component pattern from the same file

Implementation follows existing patterns in CaptionsTab.tsx (lines 676-692) and leverages the Field component's value prop for consistent UI.

Note: Untested locally otherwise than on macOS build. The enabled flag is already checked in the Rust renderer (crates/rendering/src/layers/captions.rs:441), so the logic should work correctly when the toggle updates the setting.

Fixes issue where users couldn't disable captions after generation without manually deleting all segments one by one.

Greptile Overview

Greptile Summary

Added toggle control in Captions tab header to enable/disable caption display without deleting generated segments. The toggle leverages the existing enabled flag in caption settings and integrates seamlessly with the Rust renderer.

Key changes:

  • Toggle added to Field component's value prop, following the existing pattern used for "Active Word Highlight"
  • Toggle disabled until captions are generated (hasCaptions() check)
  • Integrates with existing Rust renderer logic that checks caption_data.settings.enabled flag
  • Preserves caption data when toggled off, solving the UX issue of requiring manual segment deletion

The implementation correctly reuses existing infrastructure and follows established patterns in the codebase.

Confidence Score: 5/5

  • Safe to merge with minimal risk
  • The change is minimal (10 lines), follows existing patterns in the file, reuses infrastructure already tested in production, and integrates with validated Rust renderer logic
  • No files require special attention

Important Files Changed

Filename Overview
apps/desktop/src/routes/editor/CaptionsTab.tsx Added toggle control in Field header to enable/disable captions display without deleting segments

Flowchart

flowchart TD
    A[User Opens Captions Tab] --> B{Captions Generated?}
    B -->|No| C[Toggle Disabled]
    B -->|Yes| D[Toggle Enabled]
    
    D --> E{User Clicks Toggle}
    E -->|Turn On| F[updateCaptionSetting enabled=true]
    E -->|Turn Off| G[updateCaptionSetting enabled=false]
    
    F --> H[Update Project State]
    G --> H
    
    H --> I[Render Video Frame]
    I --> J{Check caption_data.settings.enabled}
    J -->|false| K[Skip Caption Rendering]
    J -->|true| L[Render Captions]
    
    K --> M[Video Output Without Captions]
    L --> N[Video Output With Captions]
    
    style F fill:#90EE90
    style G fill:#FFB6C6
    style L fill:#87CEEB
    style K fill:#D3D3D3
Loading

Last reviewed commit: b590ee4

Add toggle control in Captions tab header to show/hide captions
without deleting generated segments. When disabled, captions remain
saved but are not rendered in the video output.

Changes:
- Add enabled toggle to Field component in CaptionsTab
- Toggle is disabled until captions are generated
- Preserves caption data when toggled off
- Syncs with existing enabled flag in caption settings
- Uses existing Toggle component pattern from the same file

Implementation follows existing patterns in CaptionsTab.tsx
(lines 676-692) and leverages the Field component's value prop
for consistent UI.

Note: Untested locally due to Xcode requirement for macOS build.
The enabled flag is already checked in the Rust renderer
(crates/rendering/src/layers/captions.rs:441), so the logic
should work correctly when the toggle updates the setting.

Fixes issue where users couldn't disable captions after generation
without manually deleting all segments one by one.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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

Comments