From 70611c0d3ffb0cb9ff6709c851e38803650a7956 Mon Sep 17 00:00:00 2001
From: willsather <56037657+willsather@users.noreply.github.com>
Date: Sat, 11 Apr 2026 21:22:48 +0000
Subject: [PATCH 1/3] feat: integrate inline question UI into prompt box for
mobile
---
.../chats/[chatId]/session-chat-content.tsx | 68 ++-
apps/web/components/question-panel.tsx | 464 ------------------
bun.lock | 1 +
3 files changed, 57 insertions(+), 476 deletions(-)
delete mode 100644 apps/web/components/question-panel.tsx
diff --git a/apps/web/app/sessions/[sessionId]/chats/[chatId]/session-chat-content.tsx b/apps/web/app/sessions/[sessionId]/chats/[chatId]/session-chat-content.tsx
index 576a799d7..334af7b08 100644
--- a/apps/web/app/sessions/[sessionId]/chats/[chatId]/session-chat-content.tsx
+++ b/apps/web/app/sessions/[sessionId]/chats/[chatId]/session-chat-content.tsx
@@ -63,7 +63,7 @@ import { FileSuggestionsDropdown } from "@/components/file-suggestions-dropdown"
import { ImageAttachmentsPreview } from "@/components/image-attachments-preview";
import { TextAttachmentsPreview } from "@/components/text-attachments-preview";
import { ModelSelectorCompact } from "@/components/model-selector-compact";
-import { QuestionPanel } from "@/components/question-panel";
+import { useInlineQuestion } from "@/components/inline-question-input";
import { SlashCommandDropdown } from "@/components/slash-command-dropdown";
import { SnippetChip } from "@/components/snippet-chip";
import { AssistantMessageGroups } from "@/components/assistant-message-groups";
@@ -2638,6 +2638,26 @@ export function SessionChatContent({
}
}, [questionToolCallId, addToolOutput]);
+ // Stable empty array so the hook doesn't reset on every render when there's no question
+ const emptyQuestions = useMemo(
+ () => [] as AskUserQuestionInput["questions"],
+ [],
+ );
+
+ const inlineQuestion = useInlineQuestion({
+ questions:
+ hasPendingQuestion && pendingQuestionPart
+ ? pendingQuestionPart.input.questions
+ : emptyQuestions,
+ onSubmit: handleQuestionSubmit,
+ onCancel: handleQuestionCancel,
+ textareaValue: input,
+ onTextareaChange: setInput,
+ });
+
+ // Inline question UI is integrated into the prompt box on all viewports
+ const showInlineQuestion = inlineQuestion.isActive;
+
const isReconnectingSandbox =
reconnectionStatus === "checking" &&
!sandboxInfo &&
@@ -3656,15 +3676,6 @@ export function SessionChatContent({
)}
- {/* Question Panel */}
- {hasPendingQuestion && pendingQuestionPart && (
-