Answer Claude questions in your own words, or dismiss them

Claude's question forms now accept a free-text answer beside the
offered options and can be dismissed. A dismissal tells Claude the
operator will reply in the chat instead, the card's button reads
Dismiss, and the composer takes the keyboard so the reply can be typed
at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 00:02:59 +00:00
parent 4c82a9637e
commit bfccf39671
5 changed files with 52 additions and 6 deletions
@@ -9,6 +9,7 @@ import 'package:pipelines_app/features/chat/conversation/chat_question_validatio
import 'package:pipelines_app/features/chat/conversation/chat_thread_view.dart';
import 'chat_thread_fixtures.dart';
import 'package:pipelines_app/features/chat/conversation/composer_focus_request.dart';
Widget materialHost(Widget child) => MaterialApp(
theme: ThemeData(platform: TargetPlatform.android),
@@ -286,7 +287,8 @@ void main() {
),
),
);
await tester.tap(find.text('Decline'));
// A question's decline dismisses it so the reply goes in the chat.
await tester.tap(find.text('Dismiss'));
await tester.pumpAndSettle();
await tester.tap(find.text('Cancel question'));
await tester.pumpAndSettle();
@@ -295,6 +297,27 @@ void main() {
},
);
testWidgets('dismissing a question sends the reply to the composer', (
tester,
) async {
final requests = ChatComposerFocusRequests();
await tester.pumpWidget(
scrollHost(
ChatComposerFocusScope(
sessionId: 's',
requests: requests,
child: ChatQuestionCard(
form: question(),
onSubmit: (sent, action) async {},
),
),
),
);
await tester.tap(find.text('Dismiss'));
await tester.pumpAndSettle();
expect(requests.take('s'), isTrue);
});
testWidgets(
'an all-external form confirms completion without field answers',
(tester) async {