Skip to content

Commit 6e7681e

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

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
@@ -505,7 +505,9 @@ export function TaskChatComposer({
505505
reasoning,
506506
});
507507
onModelChange(next.model);
508-
onReasoningChange(next.reasoning);
508+
if (next.reasoning !== reasoning) {
509+
onReasoningChange(next.reasoning);
510+
}
509511
}}
510512
onClose={() => setModelSheetOpen(false)}
511513
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
@@ -48,6 +48,7 @@ describe("mobile composer options", () => {
4848
[{ hasContent: true }, "send"],
4949
[{ canStop: true }, "stop"],
5050
[{ isRecording: true }, "mic-stop"],
51+
[{ isRecording: true, canStop: true }, "mic-stop"],
5152
[{}, "mic"],
5253
])("derives the mobile primary action", (overrides, expected) => {
5354
expect(

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function resolveComposerPrimaryAction({
5959
allowSendWhileRunning: boolean;
6060
}): ComposerPrimaryAction {
6161
if (disabled || isTranscribing) return "disabled";
62+
if (isRecording) return "mic-stop";
6263
if (canStop && (!allowSendWhileRunning || !hasContent)) return "stop";
63-
if (hasContent && !isRecording) return "send";
64-
return isRecording ? "mic-stop" : "mic";
64+
return hasContent ? "send" : "mic";
6565
}

0 commit comments

Comments
 (0)