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
@@ -0,0 +1,59 @@
import 'package:flutter/material.dart';
import 'settings_section.dart';
/// The sections a phone shows first, in this order: how to reach the server
/// (Connection, Servers, Sign in) and then how it reaches you (the
/// notification sections). The rest keep their order after them.
const settingsPhoneFirstIds = [
'managed-connection',
'connection',
'servers',
'sign-in',
'notifications',
'device-delivery',
'phone-notifications',
];
/// [sections] reordered for a phone: [settingsPhoneFirstIds] first.
List<SettingsSection> settingsPhoneOrder(List<SettingsSection> sections) {
int rank(SettingsSection section) {
final index = settingsPhoneFirstIds.indexOf(section.id);
return index < 0 ? settingsPhoneFirstIds.length : index;
}
final indexed = sections.indexed.toList()
..sort((a, b) {
final byRank = rank(a.$2).compareTo(rank(b.$2));
return byRank != 0 ? byRank : a.$1.compareTo(b.$1);
});
return [for (final (_, section) in indexed) section];
}
const settingsTopicMenuKey = ValueKey<String>('settings.topics');
/// The phone's "Jump to topic" menu beside the search field: every shown
/// section by title; picking one scrolls to it (the wide layout has an index
/// column instead).
class SettingsTopicMenu extends StatelessWidget {
const SettingsTopicMenu({
super.key,
required this.sections,
required this.onJump,
});
final List<SettingsSection> sections;
final ValueChanged<String> onJump;
@override
Widget build(BuildContext context) => PopupMenuButton<String>(
key: settingsTopicMenuKey,
tooltip: 'Jump to topic',
icon: const Icon(Icons.toc),
onSelected: onJump,
itemBuilder: (_) => [
for (final section in sections)
PopupMenuItem(value: section.id, child: Text(section.title)),
],
);
}
@@ -6,6 +6,7 @@ import 'settings_layout.dart';
import 'settings_page_chrome.dart';
import 'settings_section.dart';
import 'settings_skeleton.dart';
import 'settings_phone_order.dart';
/// The one Settings page: a pinned search field over a scrolling column of
/// grouped sections, with a jump index beside it on wide layouts.
@@ -130,10 +131,11 @@ class _SettingsSearchPageState extends State<SettingsSearchPage> {
@override
Widget build(BuildContext context) {
final insets = MediaQuery.paddingOf(context);
final visible = _visible;
return LayoutBuilder(
builder: (context, constraints) {
final wide = constraints.maxWidth >= settingsIndexMinWidth;
// A phone leads with Connection and Notifications and jumps by menu.
final visible = wide ? _visible : settingsPhoneOrder(_visible);
return Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
@@ -154,9 +156,20 @@ class _SettingsSearchPageState extends State<SettingsSearchPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
SettingsSearchField(
controller: _search,
onChanged: _onQueryChanged,
Row(
children: [
Expanded(
child: SettingsSearchField(
controller: _search,
onChanged: _onQueryChanged,
),
),
if (!wide && visible.length > 1)
SettingsTopicMenu(
sections: visible,
onJump: _jumpTo,
),
],
),
const SizedBox(height: settingsSectionGap),
Expanded(child: _list(visible, insets)),
@@ -3,6 +3,7 @@ import '../settings_group.dart';
import 'storage_controls.dart';
import 'storage_models.dart';
import '../../../core/api_gateway.dart';
import '../../../ui/text/plural.dart';
class StorageUsage extends StatelessWidget {
const StorageUsage({super.key, required this.data});
@@ -46,7 +47,7 @@ class StorageUsage extends StatelessWidget {
),
],
),
Text('${storageInt(category['files'])} files'),
Text(countLabel(storageInt(category['files']), 'file')),
if (category['path'] case final String path when path.isNotEmpty)
Text(path, softWrap: true),
if (category['error'] case final String error