From a73bcc6d0644965e3ab95541e9dbccf869594c0e Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Sat, 7 Nov 2026 03:16:57 +0000 Subject: [PATCH 1/2] fix(mobile): Plan Mode shows the Build/Plan control again With Settings > Labs > Legacy > Plan Mode on, the composer had no way to switch between Build and Plan: the chip was dropped when the new-task draft moved onto ThreadComposer, leaving only the /plan and /default commands. ThreadComposer now renders the Build/Plan control before the model control, for drafts and threads, when the preference is on, the provider supports interaction modes, and an interaction mode handler is provided. It reflects the composer's effective mode and toggles it like the slash commands do. Co-Authored-By: Claude Opus 5.5 --- .../src/features/threads/ThreadComposer.tsx | 40 ++++++++++++++++--- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/apps/mobile/src/features/threads/ThreadComposer.tsx b/apps/mobile/src/features/threads/ThreadComposer.tsx index 57bda9aa98c9b..eb25c74880b0f 100644 --- a/apps/mobile/src/features/threads/ThreadComposer.tsx +++ b/apps/mobile/src/features/threads/ThreadComposer.tsx @@ -81,7 +81,12 @@ import { VideoPreviewModal, type VideoPreviewSource } from "../../components/Vid import { GlassSurface } from "../../components/ui/GlassSurface"; import { ComposerEditor, type ComposerEditorHandle } from "../../components/ComposerEditor"; import { fileRoutePathSegments } from "../files/filePath"; -import { ComposerActionButton, ComposerToolbarRow } from "../../components/ComposerToolbar"; +import { useLegacyPlanModeState } from "./use-legacy-plan-mode-enabled"; +import { + ComposerActionButton, + ComposerInlineControl, + ComposerToolbarRow, +} from "../../components/ComposerToolbar"; import { ComposerModelControl } from "../../components/ComposerModelControl"; import { composerStripAttachments, @@ -539,6 +544,12 @@ export const ThreadComposer = function ThreadComposer(props: ThreadComposerProps return report !== null; }; + const onUpdateInteractionMode = + selectedProviderStatus?.showInteractionModeToggle === false + ? undefined + : props.onUpdateInteractionMode; + const { enabled: legacyPlanModeEnabled } = useLegacyPlanModeState(); + const mentionableEnvironments = useMentionableEnvironments(); const composerMenu = useComposerCommandMenu({ draftMessage: draftMessage, @@ -558,10 +569,7 @@ export const ThreadComposer = function ThreadComposer(props: ThreadComposerProps hasThread: !props.isDraft, hasCompactableConversation: props.hasCompactableConversation, onChangeDraftMessage: props.onChangeDraftMessage, - onUpdateInteractionMode: - selectedProviderStatus?.showInteractionModeToggle === false - ? undefined - : props.onUpdateInteractionMode, + onUpdateInteractionMode, offersUsageLimits: usageLimitsOffered, onUsageLimits: usageLimitsOffered && draftAttachments.length === 0 ? openUsageLimits : undefined, @@ -813,6 +821,27 @@ export const ThreadComposer = function ThreadComposer(props: ThreadComposerProps ); + const interactionMode = props.selectedThread.interactionMode; + const modeControl = + legacyPlanModeEnabled && onUpdateInteractionMode ? ( + onUpdateInteractionMode(interactionMode === "plan" ? "default" : "plan")} + showChevron={false} + /> + ) : null; + return ( props.onHeightChange?.(event.nativeEvent.layout.height)} @@ -1093,6 +1122,7 @@ export const ThreadComposer = function ThreadComposer(props: ThreadComposerProps compactEditor.isExpanded ? { flex: 1, justifyContent: "flex-end" } : undefined } > + {modeControl} {modelControl} Date: Sat, 7 Nov 2026 03:31:51 +0000 Subject: [PATCH 2/2] fix(mobile): hide the Build/Plan control while editing a queued message A queued edit saves only its content, so the control would change the thread draft's mode instead of the queued run's. Co-Authored-By: Claude Opus 5.5 --- apps/mobile/src/features/threads/ThreadComposer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/mobile/src/features/threads/ThreadComposer.tsx b/apps/mobile/src/features/threads/ThreadComposer.tsx index eb25c74880b0f..2bd2d379efeb7 100644 --- a/apps/mobile/src/features/threads/ThreadComposer.tsx +++ b/apps/mobile/src/features/threads/ThreadComposer.tsx @@ -823,7 +823,7 @@ export const ThreadComposer = function ThreadComposer(props: ThreadComposerProps const interactionMode = props.selectedThread.interactionMode; const modeControl = - legacyPlanModeEnabled && onUpdateInteractionMode ? ( + legacyPlanModeEnabled && onUpdateInteractionMode && queuedEdit === null ? (