App: run tabs under the header on wide layouts, stable Artifacts tab, spelled-out pipeline status, shared list selection, code block header and edge fades
- Run detail: on a wide window (>= 840, pane >= 600) the tabs are Material segments under the run header; phones keep the floating bottom bar. Artifacts is always a tab, badged with its count and disabled with 0 (its tooltip says why), so Changes never moves. - Pipelines list: 'Failed · last run 19 Oct' beside the status dot; facts on the next line; compact rows keep 'Failed · 19 Oct'. - Settings: Disconnect is outlined beside a tonal Reconnect. - Lists: one selection style (tonal fill plus one leading accent bar) for runs, pipelines and chats; chat's border, fill and pointer removed. - Transcript: overflowing blocks fade at the edge with a chevron instead of a 'Scroll horizontally' line (semantics hint kept); code blocks get a header strip with language and Copy; lighter light-mode code fill. - Runs list: rows under a day heading show only the time of day. - Artifact search reveal re-centres once the lazy list's extent settles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -116,9 +116,14 @@ class _CopyPosition extends SingleChildLayoutDelegate {
|
||||
anchor != oldDelegate.anchor;
|
||||
}
|
||||
|
||||
/// The copy slot always occupies the same space, so hover never shifts code.
|
||||
/// Keyboard focus also reveals it; a touch on the code still selects normally.
|
||||
class ChatCodeCopyRegion extends StatefulWidget {
|
||||
/// A fenced code block as one framed piece: a header strip with the
|
||||
/// language label and Copy, then the code on its own fill.
|
||||
///
|
||||
/// Copy is always in the header (a touch screen has no hover to reveal it),
|
||||
/// outside the selectable document, so selecting the code never takes the
|
||||
/// button's label with it. Light mode keeps the code fill light, framed by a
|
||||
/// hairline, so code text keeps its full contrast; dark mode lifts it a step.
|
||||
class ChatCodeCopyRegion extends StatelessWidget {
|
||||
const ChatCodeCopyRegion({
|
||||
super.key,
|
||||
required this.code,
|
||||
@@ -127,49 +132,57 @@ class ChatCodeCopyRegion extends StatefulWidget {
|
||||
});
|
||||
final String code;
|
||||
final Widget label, child;
|
||||
@override
|
||||
State<ChatCodeCopyRegion> createState() => _ChatCodeCopyRegionState();
|
||||
}
|
||||
|
||||
class _ChatCodeCopyRegionState extends State<ChatCodeCopyRegion> {
|
||||
bool _hover = false, _focus = false;
|
||||
/// The block's corner radius.
|
||||
static const double radius = 8;
|
||||
|
||||
/// The code body's fill.
|
||||
static Color fill(BuildContext context) {
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
return scheme.brightness == Brightness.light
|
||||
? scheme.surfaceContainerLow
|
||||
: scheme.surfaceContainerHighest;
|
||||
}
|
||||
|
||||
/// The header strip's fill, one step from the body's.
|
||||
static Color headerFill(BuildContext context) =>
|
||||
Theme.of(context).colorScheme.surfaceContainerHigh;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final visible = _hover || _focus;
|
||||
return MouseRegion(
|
||||
onEnter: (_) => setState(() => _hover = true),
|
||||
onExit: (_) => setState(() => _hover = false),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: widget.label),
|
||||
Focus(
|
||||
skipTraversal: true,
|
||||
onFocusChange: (value) => setState(() => _focus = value),
|
||||
child: ExcludeSemantics(
|
||||
excluding: !visible,
|
||||
child: IgnorePointer(
|
||||
ignoring: !visible,
|
||||
child: Opacity(
|
||||
opacity: visible ? 1 : 0,
|
||||
child: SelectionContainer.disabled(
|
||||
child: ChatCopyButton(
|
||||
text: widget.code,
|
||||
showLabel: true,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
final header = ColoredBox(
|
||||
key: const Key('chat-code-header'),
|
||||
color: headerFill(context),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.only(start: 12, end: 4),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(child: label),
|
||||
SelectionContainer.disabled(
|
||||
child: ChatCopyButton(text: code, showLabel: true),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
return DecoratedBox(
|
||||
position: DecorationPosition.foreground,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: scheme.outlineVariant),
|
||||
borderRadius: BorderRadius.circular(radius),
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(radius),
|
||||
child: ColoredBox(
|
||||
key: const Key('chat-code-body'),
|
||||
color: fill(context),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [header, child],
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
widget.child,
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user