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:
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../ui/adaptive/platform.dart';
|
||||
import 'chat_hover_actions.dart';
|
||||
|
||||
/// The width of the strip left of the reading column that an answer row
|
||||
/// draws its Copy button in (`chatCopyGutter`); 0 when there is no room, and
|
||||
@@ -45,7 +45,7 @@ List<Widget> chatCopyGutterInset(
|
||||
/// pointer is over the answer or the button has focus; it stays in the
|
||||
/// focus order and the semantics tree when hidden. Touch platforms always
|
||||
/// show it.
|
||||
class ChatCopyGutterRow extends StatefulWidget {
|
||||
class ChatCopyGutterRow extends StatelessWidget {
|
||||
const ChatCopyGutterRow({
|
||||
super.key,
|
||||
required this.width,
|
||||
@@ -63,54 +63,31 @@ class ChatCopyGutterRow extends StatefulWidget {
|
||||
/// Keeps the buttons shown without hover (while the reply reads aloud).
|
||||
final bool pinned;
|
||||
|
||||
@override
|
||||
State<ChatCopyGutterRow> createState() => _ChatCopyGutterRowState();
|
||||
}
|
||||
|
||||
class _ChatCopyGutterRowState extends State<ChatCopyGutterRow> {
|
||||
bool _hovered = false;
|
||||
bool _focused = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final hover = prefersCompactHitTargets(context);
|
||||
final copy = widget.copy;
|
||||
final row = Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
SizedBox(
|
||||
key: const Key('chat-copy-gutter'),
|
||||
width: widget.width,
|
||||
child: copy == null
|
||||
? null
|
||||
: Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: Focus(
|
||||
canRequestFocus: false,
|
||||
skipTraversal: true,
|
||||
onFocusChange: (focused) =>
|
||||
setState(() => _focused = focused),
|
||||
child: AnimatedOpacity(
|
||||
key: const Key('chat-copy-gutter-visibility'),
|
||||
opacity: !hover || widget.pinned || _hovered || _focused
|
||||
? 1
|
||||
: 0,
|
||||
duration: const Duration(milliseconds: 120),
|
||||
alwaysIncludeSemantics: true,
|
||||
final copy = this.copy;
|
||||
return ChatHoverRegion(
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
SizedBox(
|
||||
key: const Key('chat-copy-gutter'),
|
||||
width: width,
|
||||
child: copy == null
|
||||
? null
|
||||
: Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: ChatHoverReveal(
|
||||
visibilityKey: const Key('chat-copy-gutter-visibility'),
|
||||
pinned: pinned,
|
||||
child: copy,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Flexible(child: widget.child),
|
||||
],
|
||||
);
|
||||
if (!hover || copy == null) return row;
|
||||
return MouseRegion(
|
||||
onEnter: (_) => setState(() => _hovered = true),
|
||||
onExit: (_) => setState(() => _hovered = false),
|
||||
child: row,
|
||||
),
|
||||
Flexible(child: child),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user