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,16 +7,31 @@ import 'walkthrough_steps.dart';
/// Opens the walkthrough as a Material details sheet on phones and a dialog on
/// wide windows. [onClosed] runs once however it closes (Skip, Done, the close
/// button or a tap outside), so the caller can record it as seen.
///
/// [connected] skips the connect directions; [onOpenConnection] (Settings'
/// Connection) closes the walkthrough and opens it.
Future<void> showFirstRunWalkthrough(
BuildContext context, {
Future<void> Function()? onClosed,
bool connected = false,
VoidCallback? onOpenConnection,
}) async {
var openConnection = false;
await showAppDetails<void>(
context,
maxWidth: 560,
builder: (sheet) =>
FirstRunWalkthrough(onClose: () => Navigator.of(sheet).pop()),
builder: (sheet) => FirstRunWalkthrough(
onClose: () => Navigator.of(sheet).pop(),
steps: walkthroughStepsFor(connected: connected),
onOpenConnection: onOpenConnection == null
? null
: () {
openConnection = true;
Navigator.of(sheet).pop();
},
),
);
if (openConnection) onOpenConnection?.call();
await onClosed?.call();
}
@@ -28,8 +43,12 @@ class FirstRunWalkthrough extends StatefulWidget {
super.key,
required this.onClose,
this.steps = walkthroughSteps,
this.onOpenConnection,
});
/// Opens Settings' Connection from the connect page; null hides it.
final VoidCallback? onOpenConnection;
/// Called by Skip, Done and the close button.
final VoidCallback onClose;
final List<WalkthroughStep> steps;
@@ -90,6 +109,19 @@ class _FirstRunWalkthroughState extends State<FirstRunWalkthrough> {
const SizedBox(height: 8),
_Point(text: point),
],
if (step.showsConnectAction &&
widget.onOpenConnection != null) ...<Widget>[
const SizedBox(height: 16),
Align(
alignment: AlignmentDirectional.centerStart,
child: FilledButton.tonalIcon(
key: const ValueKey<String>('walkthrough.open-connection'),
onPressed: widget.onOpenConnection,
icon: const Icon(Icons.link),
label: const Text('Open Connection'),
),
),
],
if (step.showsHarnessCommand) ...<Widget>[
const SizedBox(height: 16),
const WalkthroughHarnessCommand(),
@@ -54,8 +54,12 @@ class FirstRunWalkthroughGate extends StatefulWidget {
required this.connection,
required this.connected,
this.gateway,
this.onOpenConnection,
});
/// Opens Settings' Connection from the walkthrough's connect page.
final VoidCallback? onOpenConnection;
final Widget child;
final WalkthroughStore store;
@@ -192,7 +196,12 @@ class _FirstRunWalkthroughGateState extends State<FirstRunWalkthroughGate> {
}
Future<void> _show() async {
await showFirstRunWalkthrough(context, onClosed: widget.store.markSeen);
await showFirstRunWalkthrough(
context,
onClosed: widget.store.markSeen,
connected: widget.connected(),
onOpenConnection: widget.onOpenConnection,
);
}
@override
@@ -60,26 +60,25 @@ class _WalkthroughHarnessCommandState extends State<WalkthroughHarnessCommand> {
borderRadius: BorderRadius.circular(12),
),
child: Padding(
padding: const EdgeInsets.only(left: 12, right: 4),
child: Row(
children: <Widget>[
Expanded(
child: SelectableText(
command,
key: const ValueKey<String>('walkthrough.command'),
style: Theme.of(context).textTheme.bodyLarge,
),
),
IconButton(
key: const ValueKey<String>('walkthrough.copy'),
tooltip: _copied ? 'Command copied' : 'Copy command',
onPressed: () => _copy(command),
icon: Icon(_copied ? Icons.check : Icons.copy_outlined),
),
],
padding: const EdgeInsets.all(12),
child: SelectableText(
command,
key: const ValueKey<String>('walkthrough.command'),
style: Theme.of(context).textTheme.bodyLarge,
),
),
),
const SizedBox(height: 8),
// A labelled action, not a bare icon: the step says what to do.
Align(
alignment: AlignmentDirectional.centerStart,
child: FilledButton.tonalIcon(
key: const ValueKey<String>('walkthrough.copy'),
onPressed: () => _copy(command),
icon: Icon(_copied ? Icons.check : Icons.copy_outlined),
label: Text(_copied ? 'Command copied' : 'Copy command'),
),
),
],
);
}
@@ -9,6 +9,7 @@ class WalkthroughStep {
required this.body,
this.points = const <String>[],
this.showsHarnessCommand = false,
this.showsConnectAction = false,
});
final IconData icon;
@@ -20,6 +21,9 @@ class WalkthroughStep {
/// Whether this page shows the harness setup command picker.
final bool showsHarnessCommand;
/// Whether this page offers the Open Connection button.
final bool showsConnectAction;
}
/// The agents `pipelines harness setup` accepts, in the order they are offered.
@@ -28,6 +32,26 @@ const harnessAgents = <String>['claude', 'codex', 'opencode', 'pi'];
/// The command for [agent], exactly as a terminal should run it.
String harnessSetupCommand(String agent) => 'pipelines harness setup $agent';
/// The welcome page for an app already connected to its server: nothing to
/// connect, so no connect directions or Open Connection.
const connectedWelcomeStep = WalkthroughStep(
icon: Icons.hub_outlined,
title: 'Welcome to Pipelines',
body:
'Pipelines runs reusable AI workflows and holds chats with coding '
'agents. Both live on your server, and this app is connected to it.',
points: <String>[
'Pipelines: workflows you define once and run again.',
'Chats: conversations with coding agents on the server.',
],
);
/// The pages for this app: the connect step is skipped when [connected].
List<WalkthroughStep> walkthroughStepsFor({required bool connected}) =>
connected
? [connectedWelcomeStep, ...walkthroughSteps.skip(1)]
: walkthroughSteps;
/// The four walkthrough pages, in order.
const walkthroughSteps = <WalkthroughStep>[
WalkthroughStep(
@@ -43,6 +67,7 @@ const walkthroughSteps = <WalkthroughStep>[
'Connect: open Settings, then Connection, enter the Server URL and '
'choose Connect.',
],
showsConnectAction: true,
),
WalkthroughStep(
icon: Icons.build_circle_outlined,