Merge branch 'main' into pager-bar-overlap

This commit is contained in:
2026-11-01 02:05:09 +00:00
31 changed files with 1599 additions and 61 deletions
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import '../../../../core/api_gateway.dart';
import '../../../../ui/layout/app_list_avatar.dart';
import '../../../../ui/layout/app_list_row.dart';
import '../../../../ui/text/relative_time_label.dart';
import '../../domain/chat_sessions.dart';
import 'chat_adaptive.dart';
import 'session_actions.dart';
@@ -48,6 +49,7 @@ class ChatSessionRow extends StatelessWidget {
? CupertinoTheme.of(context).primaryColor
: Theme.of(context).colorScheme.primary;
final text = chatSessionSubtitle(session);
final updatedAt = _chatSessionInstant(session['updated_at']);
return AppListRow(
key: Key('chat-row-$id'),
cupertino: cupertino,
@@ -78,7 +80,9 @@ class ChatSessionRow extends StatelessWidget {
],
),
),
time: relativeChatSessionTime(session['updated_at']),
timeWidget: updatedAt == null
? null
: RelativeTimeLabel(instant: updatedAt),
// `Closed` leads the line of a closed chat, then the model and folder.
subtitle: Text.rich(
TextSpan(
@@ -111,6 +115,11 @@ class ChatSessionRow extends StatelessWidget {
}
}
DateTime? _chatSessionInstant(Object? updatedAt) {
final millis = chatSessionMillis(updatedAt);
return millis <= 0 ? null : DateTime.fromMillisecondsSinceEpoch(millis);
}
/// As tall as the title's text, so it follows text scaling.
class _Star extends StatelessWidget {
const _Star({required this.cupertino, required this.color});
@@ -466,7 +466,6 @@ class _RunDetailTabsState extends State<RunDetailTabs> {
steps: runDetailArtifactSteps(widget.run),
executing: runDetailExecuting(widget.run),
configuredEndpoint: widget.configuredEndpoint,
initiallyCollapsed: true,
embedded: true,
);
case RunDetailTab.changes:
@@ -39,7 +39,6 @@ class RunVisitArtifacts extends StatelessWidget {
steps: runSteps.isEmpty ? <JsonMap>[step] : runSteps,
focusIndex: runSteps.isEmpty ? 0 : visitIndex,
configuredEndpoint: configuredEndpoint,
initiallyCollapsed: true,
embedded: true,
),
);
+5 -2
View File
@@ -6,7 +6,7 @@ import '../../../ui/adaptive/host.dart';
import '../../../ui/layout/app_list_avatar.dart';
import '../../../ui/layout/app_list_row.dart';
import '../../../ui/status/run_status_icon.dart';
import '../../../ui/text/relative_time.dart';
import '../../../ui/text/relative_time_label.dart';
import '../domain/run_deletion.dart';
import '../domain/run_models.dart';
import 'run_more_menu.dart';
@@ -77,6 +77,7 @@ class RunListRow extends StatelessWidget {
final scheduled = run['scheduled'] == true;
final bytes = runSizeBytes(run);
final size = bytes == null ? null : formatByteSize(bytes);
final createdAt = DateTime.tryParse('${run['created_at'] ?? ''}');
final subtitle = [
?pipelineLabel,
if (scheduled) 'Scheduled',
@@ -107,7 +108,9 @@ class RunListRow extends StatelessWidget {
child: RunStatusIcon(state: state, label: runStatusLabel(run)),
),
title: Text(title),
time: formatRelativeTimestamp('${run['created_at'] ?? ''}', now: now),
timeWidget: createdAt == null
? null
: RelativeTimeLabel(instant: createdAt, now: now),
subtitle: Text(subtitle),
compactSubtitle: Text(compactSubtitle),
// A narrow list pane beside the open run leaves the row no room for a