Skip to content

Conversation

@jsattler
Copy link
Owner

@jsattler jsattler commented Feb 6, 2026

No description provided.

@jsattler jsattler requested a review from Copilot February 6, 2026 18:21
@jsattler jsattler linked an issue Feb 6, 2026 that may be closed by this pull request
@jsattler jsattler merged commit dcca8c6 into main Feb 6, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the UI and settings logic so the “Capture Alpha Channel” control is only interactive when the selected video codec actually supports toggling alpha.

Changes:

  • Add codec capability flags (alwaysHasAlpha, canToggleAlpha) and update videoCodec setter to enforce alpha behavior.
  • Make alpha toggle always visible in both Settings and menu bar UI, but disabled when toggling isn’t supported.
  • Improve contextual help text and disabled styling for the toggle.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
BetterCapture/View/SettingsView.swift Adds codec-specific help text and disables alpha toggle when it can’t be changed.
BetterCapture/View/MenuBarSettingsView.swift Makes menu bar alpha toggle always visible, adds disabled styling/behavior.
BetterCapture/Model/SettingsStore.swift Introduces capability helpers and enforces alpha defaults on codec changes.
Comments suppressed due to low confidence (1)

BetterCapture/Model/SettingsStore.swift:1

  • This enforces the alpha invariant only when videoCodec is set. If persisted settings (or any other code path) can produce videoCodec == .proRes4444 while captureAlphaChannel == false, the UI is disabled (cannot fix it) and state may remain inconsistent. Consider enforcing the invariant in initialization/loading as well (e.g., normalize after reading persisted values), or make the effective alpha behavior derived from videoCodec for alwaysHasAlpha codecs so it can’t drift.
//

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

struct MenuBarToggle: View {
let name: String
@Binding var isOn: Bool
var isDisabled: Bool = false
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

isDisabled is view input state and doesn’t appear to be mutated; prefer let isDisabled: Bool = false to better communicate immutability and avoid accidental mutation in a value-type View.

Suggested change
var isDisabled: Bool = false
let isDisabled: Bool = false

Copilot uses AI. Check for mistakes.
Comment on lines 59 to +67
Text(name)
.font(.system(size: 13, weight: .medium))
.foregroundStyle(.primary)
.foregroundStyle(isDisabled ? .secondary : .primary)
Spacer()
Toggle("", isOn: $isOn)
.toggleStyle(.switch)
.tint(.blue)
.scaleEffect(0.8)
.disabled(isDisabled)
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The Toggle has an empty label (\"\"), which can lead to an unlabeled control for VoiceOver. Consider giving the toggle an accessibility label (e.g., .accessibilityLabel(Text(name))) or restructuring to use Toggle(isOn:) { Text(name) } and then style/layout accordingly.

Copilot uses AI. Check for mistakes.
Comment on lines +40 to +44
return "ProRes 4444 always includes alpha channel support"
case .hevc:
return "Enable transparency support for HEVC"
case .h264, .proRes422:
return "Alpha channel not supported by this codec"
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

Minor grammar tweaks would make these help strings read more naturally (e.g., add an article and/or verb): "ProRes 4444 always includes an alpha channel" and "Alpha channel is not supported by this codec."

Suggested change
return "ProRes 4444 always includes alpha channel support"
case .hevc:
return "Enable transparency support for HEVC"
case .h264, .proRes422:
return "Alpha channel not supported by this codec"
return "ProRes 4444 always includes an alpha channel."
case .hevc:
return "Enable transparency support for HEVC."
case .h264, .proRes422:
return "The alpha channel is not supported by this codec."

Copilot uses AI. Check for mistakes.
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.

Hide alpha channel toggle for unsupported codecs

1 participant