Files
pipelines/app/lib/features/walkthrough/walkthrough_steps.dart
T
alan 545291e04a 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>
2026-12-02 20:16:22 +00:00

105 lines
3.6 KiB
Dart

import 'package:flutter/material.dart';
/// One page of the first-run walkthrough. Pure content: no widgets, so the
/// copy can be checked without pumping a tree.
class WalkthroughStep {
const WalkthroughStep({
required this.icon,
required this.title,
required this.body,
this.points = const <String>[],
this.showsHarnessCommand = false,
this.showsConnectAction = false,
});
final IconData icon;
final String title;
final String body;
/// Short labelled facts shown under the body, one per line.
final List<String> points;
/// 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.
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(
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, so start by connecting this app '
'to it.',
points: <String>[
'Pipelines: workflows you define once and run again.',
'Chats: conversations with coding agents on the server.',
'Connect: open Settings, then Connection, enter the Server URL and '
'choose Connect.',
],
showsConnectAction: true,
),
WalkthroughStep(
icon: Icons.build_circle_outlined,
title: 'Set up an agent harness',
body:
'A harness lets Pipelines drive a coding agent. Choose the agent you '
'use, then run its setup command in a terminal.',
showsHarnessCommand: true,
),
WalkthroughStep(
icon: Icons.play_circle_outline,
title: 'Start a run',
body:
'Pipelines shows your workflows. Runs shows every run with its '
'progress and results.',
points: <String>[
'Pipelines tab: open a workflow and fill in its inputs.',
'Runs tab: follow a run as it works, then read what it produced.',
'Press Run on a workflow, or New run on the Runs tab, to start one.',
],
),
WalkthroughStep(
icon: Icons.forum_outlined,
title: 'Chat with an agent',
body:
'The Chat tab lists your conversations. Open one to read the thread '
'and reply.',
points: <String>[
'Float: pop a chat into its own window while you work elsewhere.',
'Terminal: open a terminal beside the Chat tab for direct commands.',
'New chat starts a conversation with an agent.',
],
),
];