The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 22, 15:45 UTC
fix(mobile): editing a queued message while a question is open no longer throws (#25503)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 26, 2026 at 07:07 UTC
d6fb62ac3f2ab54a100202f5aea1428cfda977cd
2 files changed
+18
-6
apps/mobile/src/native/T3ComposerEditor.ios.tsx
+9
-3
@@ -111,6 +111,12 @@ interface NativeComposerEditorProps extends ViewProps {
111
112
const NativeView = requireNativeView<NativeComposerEditorProps>(NATIVE_MODULE_NAME);
113
114
+// Fabric does not mount a `display: none` subtree, so a command sent while the composer slot is
115
+// hidden (an open question) rejects with "Unable to find the view". There is nothing to act on.
116
+function settleViewCommand(command: Promise<void> | undefined): void {
117
+ command?.catch(() => undefined);
118
+}
119
+
120
function basename(path: string): string {
121
const separator = Math.max(path.lastIndexOf("/"), path.lastIndexOf("\\"));
122
return separator >= 0 ? path.slice(separator + 1) : path;
@@ -159,10 +165,10 @@ export function ComposerEditor({
165
useImperativeHandle(
166
ref,
167
() => ({
162
- focus: () => void nativeRef.current?.focus(),
163
- blur: () => void nativeRef.current?.blur(),
168
+ focus: () => settleViewCommand(nativeRef.current?.focus()),
169
+ blur: () => settleViewCommand(nativeRef.current?.blur()),
170
setSelection: (nextSelection) =>
165
- void nativeRef.current?.setSelection(nextSelection.start, nextSelection.end),
171
+ settleViewCommand(nativeRef.current?.setSelection(nextSelection.start, nextSelection.end)),
172
}),
173
[],
174
);
apps/mobile/src/native/T3ComposerEditor.native.tsx
+9
-3
@@ -110,6 +110,12 @@ interface NativeComposerEditorProps extends ViewProps {
110
111
const NativeView = requireNativeView<NativeComposerEditorProps>(NATIVE_MODULE_NAME);
112
113
+// Fabric does not mount a `display: none` subtree, so a command sent while the composer slot is
114
+// hidden (an open question) rejects with "Unable to find the view". There is nothing to act on.
115
+function settleViewCommand(command: Promise<void> | undefined): void {
116
+ command?.catch(() => undefined);
117
+}
118
+
119
function basename(path: string): string {
120
const separator = Math.max(path.lastIndexOf("/"), path.lastIndexOf("\\"));
121
return separator >= 0 ? path.slice(separator + 1) : path;
@@ -156,10 +162,10 @@ export function ComposerEditor({
162
useImperativeHandle(
163
ref,
164
() => ({
159
- focus: () => void nativeRef.current?.focus(),
160
- blur: () => void nativeRef.current?.blur(),
165
+ focus: () => settleViewCommand(nativeRef.current?.focus()),
166
+ blur: () => settleViewCommand(nativeRef.current?.blur()),
167
setSelection: (nextSelection) =>
162
- void nativeRef.current?.setSelection(nextSelection.start, nextSelection.end),
168
+ settleViewCommand(nativeRef.current?.setSelection(nextSelection.start, nextSelection.end)),
169
}),
170
[],
171
);