Quieter transcript metadata: day dividers, time-only rows, muted meta rows
- Date once per calendar day: a muted centred divider above each day's
first timed row (chatDayDividers); rows show only their time ("10:16"),
with the full date and time kept in the tooltip and semantics. The user's
time shares the delivery line; a harness notice's time trails its line.
- Activity line and turn chips are secondary: bodyMedium, regular weight,
onSurfaceVariant (error colour kept for failures), a small chevron_right
that turns down while its details are open (replaces expand_less).
- Copy / Read aloud: 18 px muted icons; on pointer devices shown only while
the reply is hovered or an action is focused (also without the gutter);
touch keeps them visible with a full tap target. The time leads the
footer so hidden actions leave no gap.
- Settled questions: the question on one line, the operator's answer in
full on its own line beneath it.
- Meta rows (activity, chips, notices, compaction line) start at the reply
text's leading edge; turn chips sit in their own column under the answer.
- Scroll fixture: ?timestamps=1 spreads messages over two days.
Row keys are unchanged; the divider joins a row without replacing it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,13 @@ JsonMap _form({String id = 'form-1'}) => {
|
||||
|
||||
const _chip = 'Which database? · Postgres';
|
||||
|
||||
/// One line of the settled question's chip: the question, or the recorded
|
||||
/// outcome on its own line beneath it.
|
||||
Finder _settledLine(String text) => find.descendant(
|
||||
of: find.byKey(const ValueKey('chat-question-chip-form-1')),
|
||||
matching: find.text(text),
|
||||
);
|
||||
|
||||
/// A chat whose agent turn `a1` is the one the question arrives during.
|
||||
Future<FakeChatGateway> _open(WidgetTester tester, Size size) async {
|
||||
await tester.binding.setSurfaceSize(size);
|
||||
@@ -97,12 +104,13 @@ void _expectCollapsed() {
|
||||
expect(find.text(chatQuestionWaiting), findsNothing);
|
||||
expect(find.text(chatQuestionSubmit), findsNothing);
|
||||
expect(find.text(chatQuestionAnswered), findsNothing);
|
||||
expect(find.text(_chip), findsOneWidget);
|
||||
// The chip sits in its turn's footer, under the turn that asked.
|
||||
expect(_settledLine('Which database?'), findsOneWidget);
|
||||
expect(_settledLine('Postgres'), findsOneWidget);
|
||||
// The chip sits among its turn's chips, under the turn that asked.
|
||||
expect(
|
||||
find.descendant(
|
||||
of: find.byKey(const Key('chat-message-footer')),
|
||||
matching: find.text(_chip),
|
||||
of: find.byKey(const Key('chat-turn-chips')),
|
||||
matching: find.byKey(const ValueKey('chat-question-chip-form-1')),
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
@@ -194,12 +202,15 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
_expectCollapsed();
|
||||
|
||||
await tester.tap(find.text(_chip));
|
||||
await tester.tap(find.byKey(const ValueKey('chat-question-chip-form-1')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byKey(const Key('chat-question-sheet')), findsOneWidget);
|
||||
expect(find.text('Which database?'), findsOneWidget);
|
||||
expect(find.text('Postgres'), findsOneWidget);
|
||||
expect(find.text(chatQuestionAnswered), findsOneWidget);
|
||||
final sheet = find.byKey(const Key('chat-question-sheet'));
|
||||
expect(sheet, findsOneWidget);
|
||||
Finder inSheet(String text) =>
|
||||
find.descendant(of: sheet, matching: find.text(text));
|
||||
expect(inSheet('Which database?'), findsOneWidget);
|
||||
expect(inSheet('Postgres'), findsOneWidget);
|
||||
expect(inSheet(chatQuestionAnswered), findsOneWidget);
|
||||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
|
||||
@@ -213,7 +224,10 @@ void main() {
|
||||
expect(find.textContaining('no longer awaiting'), findsOneWidget);
|
||||
expect(find.text(chatQuestionWaiting), findsOneWidget);
|
||||
expect(find.text(chatQuestionSubmit), findsOneWidget);
|
||||
expect(find.text(_chip), findsNothing);
|
||||
expect(
|
||||
find.byKey(const ValueKey('chat-question-chip-form-1')),
|
||||
findsNothing,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -227,7 +241,8 @@ void main() {
|
||||
});
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text(chatQuestionWaiting), findsNothing);
|
||||
expect(find.text('Which database? · Closed'), findsOneWidget);
|
||||
expect(_settledLine('Which database?'), findsOneWidget);
|
||||
expect(_settledLine('Closed'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('a cancelled question collapses as expired', (tester) async {
|
||||
@@ -239,7 +254,8 @@ void main() {
|
||||
});
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text(chatQuestionWaiting), findsNothing);
|
||||
expect(find.text('Which database? · Expired'), findsOneWidget);
|
||||
expect(_settledLine('Which database?'), findsOneWidget);
|
||||
expect(_settledLine('Expired'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('OpenCode: ack then form.replied leaves one collapsed row', (
|
||||
|
||||
Reference in New Issue
Block a user