Should the Record control show that a recording is running? #64

Open
opened 2026-08-11 14:52:44 -04:00 by agent · 0 comments
Member

The Record control is a ControlWidgetButton, so Control Center flashes it on tap and it has no on state. The flashlight beside it is a ControlWidgetToggle and draws filled while the torch is on. Wes, on the device build of #60: "the button icon doesn't 'fill' in like the flashlight one does when the flashlight is on."

Making Record fill while a recording runs means the control has to answer "is a recording running?" from inside the widget extension, which cannot see the app's process or its container. That is the reason it is a button today, and it is written down in StashWidgets/StartRecordingControl.swift and in the Capture section of AGENTS.md — so this issue is a decision to revisit that, not a bug against it.

What it would take

An App Group on both targets, with the recorder writing its state on start and on stop and the control reading it. ControlWidgetToggle gets a value from a ControlValueProvider, and ControlCenter.shared.reloadControls(ofKind:) from the app is what pushes a change out — the system does not poll.

The part that needs deciding, not building

A stale flag is a control that lights up for a recording that is not running. A process killed between the flag going up and stop() leaves it set, and the next thing somebody sees is a lit Record control with no recording behind it — the failure AGENTS.md already names as the worst version of capture state going wrong, arriving through a second copy of that state that lives outside the app. Whatever is built here has to say how the flag is reconciled at launch and after a crash, and the answer probably leans on what CaptureRecovery already knows.

Tapping a lit toggle would mean stopping, which is a second stop affordance beside the Live Activity's — and the Live Activity carries the elapsed time and the microphone name, which a control cannot. Whether the toggle stops the recording or just reports that one is running is part of this decision.

Not in scope

The Stash mark itself (#60), and the Live Activity's own controls.

The Record control is a `ControlWidgetButton`, so Control Center flashes it on tap and it has no on state. The flashlight beside it is a `ControlWidgetToggle` and draws filled while the torch is on. Wes, on the device build of #60: *"the button icon doesn't 'fill' in like the flashlight one does when the flashlight is on."* Making Record fill while a recording runs means the control has to answer **"is a recording running?"** from inside the widget extension, which cannot see the app's process or its container. That is the reason it is a button today, and it is written down in `StashWidgets/StartRecordingControl.swift` and in the Capture section of `AGENTS.md` — so this issue is a decision to revisit that, not a bug against it. ## What it would take An App Group on both targets, with the recorder writing its state on start and on stop and the control reading it. `ControlWidgetToggle` gets a value from a `ControlValueProvider`, and `ControlCenter.shared.reloadControls(ofKind:)` from the app is what pushes a change out — the system does not poll. ## The part that needs deciding, not building **A stale flag is a control that lights up for a recording that is not running.** A process killed between the flag going up and `stop()` leaves it set, and the next thing somebody sees is a lit Record control with no recording behind it — the failure `AGENTS.md` already names as the worst version of capture state going wrong, arriving through a second copy of that state that lives outside the app. Whatever is built here has to say how the flag is reconciled at launch and after a crash, and the answer probably leans on what `CaptureRecovery` already knows. **Tapping a lit toggle would mean stopping**, which is a second stop affordance beside the Live Activity's — and the Live Activity carries the elapsed time and the microphone name, which a control cannot. Whether the toggle stops the recording or just reports that one is running is part of this decision. ## Not in scope The Stash mark itself (#60), and the Live Activity's own controls.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Stash/stash-ios#64
No description provided.