Move recording setting from Developer menu to Transcribe app; add prominent indicator

This commit is contained in:
James Babcock committed 2026-11-11 15:55:52 -08:00
1 parent e158452ba4
commit 30de2c4dd7
24 files changed
+482 -153

No files matched your search

+10 -1
View File
@@ -368,6 +368,7 @@ test('iOS preview voice uses the phone microphone, while connected capture stays
test('iOS continuous capture is shared by windows and restarts after a disconnect, a lock or backgrounding', async () => {
const calls = [], claims = [], providers = [];
let saveRecording = false;
// Models the bridge's continuous state: listening on a source, or draining after a stop.
const bridge = { source: null, draining: false, recording: '', rawSession: undefined,
supportsContinuous: voice => voice.provider !== 'onboard',
@@ -385,7 +386,7 @@ test('iOS continuous capture is shared by windows and restarts after a disconnec
setRawSession: session => { bridge.rawSession = session; } };
const settings = { ...voiceSettings, voiceProviderSetting: { get: () => 'whisper-server' },
whisperServerUrlSetting: { get: () => 'http://whisper.local:8000' }, whisperServerLanguageSetting: { get: () => 'en' },
saveTranscribeAudioSetting: { get: () => true } };
saveRecordingSetting: { get: () => saveRecording } };
const { IosPreviewController } = load('app/g2/ios-preview-controller.ts', {
require: id => id === '../native/ios-voice-input' ? { iosVoiceInput: bridge } : id === '../ui/dashboard-settings' ? settings
: id === '../ui/shell/voice-activity' ? { voiceActivity: { setActive: (active, holder) => claims.push([active, holder]) } }
@@ -404,7 +405,15 @@ test('iOS continuous capture is shared by windows and restarts after a disconnec
host.startContinuousVoiceCapture('transcribe', { recordAs: 'transcribe-1' }); await settle();
host.startContinuousVoiceCapture('calculator'); await settle();
assert.deepEqual(calls, [['glasses', true]], 'the second window shares the capture');
// Save Recording (in the window's menu) starts and stops the recording while it is open.
assert.equal(bridge.recording, '');
saveRecording = true; host.syncContinuousRecording();
assert.equal(bridge.recording, 'transcribe-1');
saveRecording = false; host.syncContinuousRecording();
assert.equal(bridge.recording, '');
saveRecording = true; host.syncContinuousRecording();
assert.equal(bridge.recording, 'transcribe-1');
assert.deepEqual(calls, [['glasses', true]], 'without touching the capture');
assert.deepEqual(claims.at(-1), [true, 'continuous-capture']);
host.stopContinuousVoiceCapture('calculator');
assert.deepEqual(calls, [['glasses', true]], 'closing one window keeps the other listening');