Please prepare the project. You can keep working while I choose the details.
+I have started the work. Your outstanding questions are available above the message box, even after a long conversation.
+{lastAction}
+From 89eb8868dd40dc2ec728d6490cd7b4eeafe66f45 Mon Sep 17 00:00:00 2001 From: peter-yy <52459246+peter-yy@users.noreply.github.com> Date: Sun, 8 Nov 2026 23:04:20 -0500 Subject: [PATCH] fix(web): collect and dismiss optional async questions above composer (#2322) --- web/README.md | 1 + web/e2e-fixtures/async-questions-fixture.html | 2 + web/e2e-fixtures/async-questions-fixture.tsx | 40 +++++++ .../AsyncQuestionsPanel.test.tsx | 104 ++++++++++++++++++ .../AssistantChat/AsyncQuestionsPanel.tsx | 78 +++++++++++++ web/src/components/SessionChat.tsx | 9 ++ .../ToolCard/RequestUserInputFooter.test.tsx | 38 ++++++- .../ToolCard/RequestUserInputFooter.tsx | 21 ++++ .../components/ToolCard/requestUserInput.ts | 4 + web/src/lib/locales/en.ts | 3 + web/src/lib/locales/ru.ts | 3 + web/src/lib/locales/zh-CN.ts | 3 + 12 files changed, 304 insertions(+), 2 deletions(-) create mode 100644 web/e2e-fixtures/async-questions-fixture.html create mode 100644 web/e2e-fixtures/async-questions-fixture.tsx create mode 100644 web/src/components/AssistantChat/AsyncQuestionsPanel.test.tsx create mode 100644 web/src/components/AssistantChat/AsyncQuestionsPanel.tsx diff --git a/web/README.md b/web/README.md index 233948ec..fbe442a8 100644 --- a/web/README.md +++ b/web/README.md @@ -78,6 +78,7 @@ The Hub persists and enforces the lock across clients, restarts, and resume. - Message thread with infinite scroll. - Concise view (header toggle or `/settings/chat`, per device): shows only user input and each round's final reply (`src/chat/conciseView.ts`). Permission requests, questions, plan proposals, user shell commands, and errors stay visible; the full thread returns while a search target is active. - Composer for sending messages. +- A collapsible **Awaiting your reply** section above the composer collects all live non-blocking `request_user_input` questions, including those outside the loaded transcript. Answer there or dismiss individual questions without sending an answer or stopping the agent. Collapsing preserves drafts; blocking permissions retain their existing controls. - Permission mode and model selection for supported agents. Cursor Auto uses CLI Auto for new/resumed sessions configured with Auto. Switching a live session to Auto when ACP does not advertise a literal Auto option relaunches the Cursor ACP process in place under `--model auto` while preserving the hub session id. - Session abort and handoff controls. diff --git a/web/e2e-fixtures/async-questions-fixture.html b/web/e2e-fixtures/async-questions-fixture.html new file mode 100644 index 00000000..392c4b6e --- /dev/null +++ b/web/e2e-fixtures/async-questions-fixture.html @@ -0,0 +1,2 @@ + +
Please prepare the project. You can keep working while I choose the details.
+I have started the work. Your outstanding questions are available above the message box, even after a long conversation.
+{lastAction}
+{t('chat.asyncQuestions.hint')}
+ {requests.map(([id, request]) => { + const tool: ChatToolCall = { + id, + name: request.tool, + input: request.arguments, + state: 'pending', + createdAt: request.createdAt ?? 0, + startedAt: null, + completedAt: null, + execStartedAt: null, + execCompletedAt: null, + description: null, + // Replies must use the request key, not the correlated toolCallId. + permission: { id, status: 'pending' } + } + return ( +