First run: empty states with a next step, harness setup instead of errors

- One shared EmptyState (icon on a tonal disc, title, one line, primary
  action) that follows the design tokens; used by Runs (Start your first
  run), Pipelines (Browse templates), Schedules and the chat list (Start a
  chat).
- Chat on a server without an agent harness showed "Bad state: No saved
  machine is connected.": the federated list now keeps the server's own
  refusal, treats an omitted empty list as no chats, and the list shows a
  "Set up an agent" state with the harness setup command and Refresh. New
  chat shows the same step instead of a form that can only be refused.
- A run that fails because no harness CLI exists names the setup command
  beside the raw reason; error advice gains a noHarness kind.
- Templates opened before the app connected stayed on "Not connected";
  it now reads again when the connection arrives. The Pipelines empty state
  links to Templates, which had no entry point in the UI.
- The first-launch walkthrough waits briefly for the connection, so a
  connected web app is no longer told to connect; the empty-server check
  treats omitted lists and no chat harness as empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 23:29:23 +00:00
parent 9436067bf2
commit e72bee3faa
30 changed files with 696 additions and 111 deletions
+1
View File
@@ -1215,6 +1215,7 @@ class _PipelinesAppState extends State<PipelinesApp>
onViewPipelineRuns: (id) =>
_delegate.goTo(AppRoute.runsForPipeline(id)),
onOpenSchedules: _delegate.openSchedules,
onOpenTemplates: _delegate.openTemplates,
onOpenSettings: () => _delegate.goTo(AppRoute.settings),
onOpenInChat: (context, detail, run) =>
_openPipelineInChat(context, detail, run),
@@ -24,6 +24,7 @@ class PipelinesDestination extends StatelessWidget {
this.onRunStarted,
this.onViewPipelineRuns,
this.onOpenSchedules,
this.onOpenTemplates,
this.onOpenSettings,
this.onSelectionChanged,
this.initialPipelineId,
@@ -50,6 +51,9 @@ class PipelinesDestination extends StatelessWidget {
final ValueChanged<int>? onViewPipelineRuns;
final VoidCallback? onOpenSchedules;
/// Opens the Templates gallery, offered by an empty pipeline list.
final VoidCallback? onOpenTemplates;
/// Opens Settings as a page from the Pipelines bar's gear.
final VoidCallback? onOpenSettings;
final ValueChanged<int?>? onSelectionChanged;
@@ -96,6 +100,7 @@ class PipelinesDestination extends StatelessWidget {
onRunStarted: onRunStarted,
onViewPipelineRuns: onViewPipelineRuns,
onOpenSchedules: onOpenSchedules,
onOpenTemplates: onOpenTemplates,
onOpenSettings: onOpenSettings,
onSelectionChanged: onSelectionChanged,
onOpenInChat: onOpenInChat,
@@ -119,6 +119,7 @@ class _TemplatesDestinationState extends State<TemplatesDestination> {
embedded: true,
onCreated: widget.onCreated,
initialKey: widget.initialKey,
reloadToken: session.connectionEpoch,
),
);
}