feat(desktop): add toggle to enable/disable captions display#1597
Open
tangero wants to merge 1 commit intoCapSoftware:mainfrom
Open
feat(desktop): add toggle to enable/disable captions display#1597tangero wants to merge 1 commit intoCapSoftware:mainfrom
tangero wants to merge 1 commit intoCapSoftware:mainfrom
Conversation
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>
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.
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:
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
enabledflag in caption settings and integrates seamlessly with the Rust renderer.Key changes:
hasCaptions()check)caption_data.settings.enabledflagThe implementation correctly reuses existing infrastructure and follows established patterns in the codebase.
Confidence Score: 5/5
Important Files Changed
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:#D3D3D3Last reviewed commit: b590ee4