Merge branch 'worktree-agent-aa9ed772f90c7c7b3'

This commit is contained in:
2026-12-02 20:20:08 +00:00
68 changed files with 1719 additions and 156 deletions
@@ -7,6 +7,7 @@ import '../ui/artifact_viewer_fetch.dart';
import 'artifact_file.dart';
import 'artifact_file_bridge.dart';
import 'artifact_file_controller.dart';
import '../../../ui/navigation/labelled_icon_button.dart';
/// Download and Share for one selected artifact, backed by its exact bytes.
///
@@ -222,9 +223,13 @@ class ArtifactIconAction extends StatelessWidget {
required this.icon,
required this.onPressed,
this.busy = false,
this.caption,
});
final String label;
/// The short visible word on touch; defaults to [label].
final String? caption;
final IconData icon;
final VoidCallback? onPressed;
@@ -232,6 +237,22 @@ class ArtifactIconAction extends StatelessWidget {
@override
Widget build(BuildContext context) {
if (showsActionCaptions(context)) {
// Touch has no hover tooltip: the action is captioned.
return LabelledIconButton(
icon: icon,
label: label,
caption: caption,
onPressed: onPressed,
child: busy
? const SizedBox(
width: 18,
height: 18,
child: CircularProgressIndicator(strokeWidth: 2),
)
: null,
);
}
return IconButton(
tooltip: label,
constraints: GlassBarMetrics.materialConstraints(),
@@ -2,6 +2,7 @@ import '../../../core/api_gateway.dart';
import 'artifact_capture.dart';
import 'artifact_groups.dart';
import 'artifact_selection.dart';
import '../../../ui/text/plural.dart';
/// The "capture pending" wording shared by a running visit's summary and the
/// run-level empty state, so the two never spell it differently.
@@ -72,10 +73,15 @@ List<String> artifactCaptureNotes(JsonMap step) {
if (presentedArtifacts(artifactsOf(step)).isEmpty) return notes;
final capture = ArtifactCapture.fromStep(step);
if (capture.skipped > 0) {
notes.add('${capture.skipped} files excluded from artifact capture.');
notes.add(
'${countLabel(capture.skipped, 'file')} excluded from artifact capture.',
);
}
if (capture.truncated > 0) {
notes.add('${capture.truncated} files omitted by artifact capture limits.');
notes.add(
'${countLabel(capture.truncated, 'file')} omitted by artifact '
'capture limits.',
);
}
return notes;
}
@@ -130,12 +130,14 @@ class ArtifactViewerBar extends StatelessWidget {
ArtifactIconAction(
key: const Key('artifact-open'),
label: 'Open in browser',
caption: 'Open',
icon: Icons.open_in_new,
onPressed: onOpen,
),
ArtifactIconAction(
key: const Key('artifact-copy-link'),
label: 'Copy link',
caption: 'Link',
icon: Icons.link,
onPressed: onCopy,
),
@@ -144,6 +146,7 @@ class ArtifactViewerBar extends StatelessWidget {
ArtifactIconAction(
key: artifactFullscreenKey,
label: fullscreen ? 'Exit full screen' : 'Full screen',
caption: fullscreen ? 'Exit' : 'Expand',
icon: fullscreen ? Icons.fullscreen_exit : Icons.fullscreen,
onPressed: toggle,
),
@@ -151,6 +154,7 @@ class ArtifactViewerBar extends StatelessWidget {
ArtifactIconAction(
key: const Key('artifact-send-to-chat'),
label: 'Send to chat…',
caption: 'To chat',
icon: Icons.chat_outlined,
onPressed: onSendToChat!,
),