Skip to content

Commit 44c040d

Browse files
fix(mobile): preserve active voice capture
Generated-By: PostHog Code Task-Id: c1bbe3cf-742b-4b24-bf96-d11a18b4cf22
1 parent 6daf8ce commit 44c040d

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

apps/mobile/src/features/tasks/composer/TaskChatComposer.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,9 @@ export function TaskChatComposer({
506506
reasoning,
507507
});
508508
onModelChange(next.model);
509-
onReasoningChange(next.reasoning);
509+
if (next.reasoning !== reasoning) {
510+
onReasoningChange(next.reasoning);
511+
}
510512
}}
511513
onClose={() => setModelSheetOpen(false)}
512514
options={mobileModelOptions.map((m) => ({

apps/mobile/src/features/tasks/composer/options.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ describe("mobile composer options", () => {
6767
[{ hasContent: true }, "send"],
6868
[{ canStop: true }, "stop"],
6969
[{ isRecording: true }, "mic-stop"],
70+
[{ isRecording: true, canStop: true }, "mic-stop"],
7071
[{}, "mic"],
7172
])("derives the mobile primary action", (overrides, expected) => {
7273
expect(

apps/mobile/src/features/tasks/composer/options.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function resolveComposerPrimaryAction({
6868
allowSendWhileRunning: boolean;
6969
}): ComposerPrimaryAction {
7070
if (disabled || isTranscribing) return "disabled";
71+
if (isRecording) return "mic-stop";
7172
if (canStop && (!allowSendWhileRunning || !hasContent)) return "stop";
72-
if (hasContent && !isRecording) return "send";
73-
return isRecording ? "mic-stop" : "mic";
73+
return hasContent ? "send" : "mic";
7474
}

0 commit comments

Comments
 (0)