App: run failure reasons, Run again, labelled tabs, actionable errors, nav fixes

- Run rows show a failed run's reason (else its diagnostic's first line,
  full text in a tooltip) or a short result preview; the Summary leads
  with "Why it failed".
- Run again for succeeded/canceled/interrupted runs opens the New run form
  pre-filled (prompt, workspace, report format) at the latest version with
  the original offered.
- Run detail and stage tabs show their names; touch shows captions on the
  Runs header and artifact viewer actions (desktop keeps tooltips).
- ErrorNotice maps not connected / server too old / permission / timeout
  to what to do, raw detail behind Details (Schedules, create chat, Runs,
  Pipelines banners).
- Settings has no Back arrow; Schedules keeps the rail on wide windows;
  phone Settings leads with Connection and Notifications and has a
  Jump to topic menu.
- Walkthrough: Open Connection (skipped when connected), labelled Copy.
- Pluralised counts; no duplicate status/rail names for screen readers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-02 20:16:22 +00:00
parent c441400f36
commit 545291e04a
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!,
),