Files
pipelines/app/lib/features/chat/conversation/chat_no_reveal.dart
T
alan 33874005c4 Question answers: no shaking while typing; Enter sends, Shift+Enter breaks
Typing in a question card's answer box asked the transcript to reveal
the caret on every keystroke; the split, bottom-following transcript
jumped and followed back, so the conversation shook. The request now
stops at the card, which is on screen while the operator types.

A free-text answer now behaves like the chat composer: it grows to six
lines, Enter sends it (desktop and web keyboards) and Shift+Enter
breaks the line; an open IME candidate keeps its Enter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:30:30 +00:00

28 lines
992 B
Dart

import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
/// Keeps a text field inside the transcript from scrolling the transcript to
/// "reveal" its caret on every keystroke.
///
/// An editable field asks every scrollable above it to show its caret after
/// each edit. The transcript's split, bottom-following viewport answers that
/// with a jump and then follows its newest row back, so a question card's
/// answer box made the whole conversation shake while typing. The card is on
/// screen while the operator types in it, so the request stops here.
class ChatNoReveal extends SingleChildRenderObjectWidget {
const ChatNoReveal({super.key, super.child});
@override
RenderObject createRenderObject(BuildContext context) => _RenderNoReveal();
}
class _RenderNoReveal extends RenderProxyBox {
@override
void showOnScreen({
RenderObject? descendant,
Rect? rect,
Duration duration = Duration.zero,
Curve curve = Curves.ease,
}) {}
}