The best way to control Claude Code, Codex and more from any computer or phone
fix(mobile): keep the composer's draft and typing after answering a question (#19281)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Claudesaul committed
Oct 20, 2026 at 00:12 UTC
30b9b6487e639a71993f1a755e23d3d4d7fe0cea
3 files changed
+7
-4
apps/mobile/src/components/ComposerEditor.tsx
+4
@@ -34,6 +34,7 @@ import {
34
35
export type ComposerEditorProps = NativeComposerEditorProps & {
36
readonly draftKey?: string | null;
37
+ readonly hidden?: boolean;
38
readonly environmentId?: EnvironmentId;
39
readonly onOpenMention?: (path: string) => void;
40
readonly onOpenAttachment?: (attachment: ComposerDocumentAttachment) => void;
@@ -43,6 +44,7 @@ export type ComposerEditorProps = NativeComposerEditorProps & {
44
45
export function ComposerEditor({
46
draftKey,
47
+ hidden,
48
environmentId,
49
onOpenMention,
50
onOpenAttachment,
@@ -155,7 +157,9 @@ export function ComposerEditor({
157
);
158
return (
159
<>
160
+ {/* Reset revision history with the recreated iOS view without aborting context imports. */}
161
<NativeComposerEditor
162
+ key={hidden ? "hidden" : "visible"}
163
{...props}
164
enterBehavior={props.enterBehavior ?? preferredEnterBehavior}
165
onChangeText={changeText}
apps/mobile/src/features/threads/ThreadComposer.tsx
+2
@@ -170,6 +170,7 @@ export interface ThreadComposerProps {
170
} | null;
171
readonly followUpBehavior: FollowUpBehavior;
172
readonly canSteerActiveTurn: boolean;
173
+ readonly hidden: boolean;
174
readonly editorRef?: RefObject<ComposerEditorHandle | null>;
175
readonly onChangeDraftMessage: (value: string) => void;
176
readonly onPickDraftMedia: () => Promise<void>;
@@ -819,6 +820,7 @@ export const ThreadComposer = function ThreadComposer(props: ThreadComposerProps
820
layout={COMPOSER_LAYOUT_TRANSITION}
821
>
822
<ComposerEditor
823
+ hidden={props.hidden}
824
draftKey={composerDraftKey}
825
environmentId={props.environmentId}
826
onOpenMention={(path) => {
apps/mobile/src/features/threads/ThreadDetailScreen.tsx
+1
-4
@@ -1354,10 +1354,6 @@ export const ThreadDetailScreen = function ThreadDetailScreen(props: ThreadDetai
1354
) : null}
1355
</View>
1356
1357
- {/*
1358
- * Hidden (not unmounted) while a user-input request owns the composer slot, so
1359
- * composer drafts and editor state survive.
1360
- */}
1357
<View style={composerSlotHidden ? { display: "none" } : undefined}>
1358
{isProviderSubagent ? (
1359
<View
@@ -1423,6 +1419,7 @@ export const ThreadDetailScreen = function ThreadDetailScreen(props: ThreadDetai
1419
draftKey={props.composerDraftKey ?? undefined}
1420
followUpBehavior={props.followUpBehavior}
1421
canSteerActiveTurn={props.canSteerActiveTurn}
1422
+ hidden={composerSlotHidden}
1423
queuedEdit={
1424
props.queuedRunEdit === null
1425
? null