Merge branch 'main' into flutter/chat-info-facts
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ or scratch servers only, never real operator sessions/runs/workflows.
|
||||
| Chat permissions/questions | Source: native approval/risk and question cards in the conversation view | authenticated smoke with a real pending approval/question; live multi-client resolution; no production decision sent |
|
||||
| Chat model/Info/background tasks | Source request facade | current-model selection, numeric Info modal (unknown !=0), bounded running shell pages |
|
||||
| Chat commands/notices/scroll | Missing | slash palette/actions, unknown-command send-as-message, dismissible local notices, saved scroll/follow intent |
|
||||
| Saved schedule list | Source | pipeline entry and route registration, exact timer provenance vocabulary |
|
||||
| Saved schedule list | Preview: Settings row, /schedules route, read-only list with exact timer provenance and pipeline identity | row opening a pipeline lands on its Summary section; no editing from this list |
|
||||
| Schedule editor | Preview: pipeline Summary section creates/edits/pauses/deletes with the lossless draft and revision guard; conflict keeps the draft and shows the server words | Schedule-this-run seeding, schedules list entry/route |
|
||||
| Search | Preview: exact target model and navigation to pipeline, pinned version, run and recorded stage; unresolvable hits stay read-only | field/artifact hits open the run (their pane selection is a later slice) |
|
||||
| Needs you | Preview: runs-list bell/count from the same list rows, native sheet, open/dismiss/clear persistence, live fold and reconnect reseed | notification permission/transition notices, authenticated preview smoke |
|
||||
|
||||
@@ -553,3 +553,10 @@ Every new lane now gets ONE behaviour:
|
||||
Manager per wave: merge each branch, run the focused suite, one area probe, then
|
||||
the full suite/analyze and one preview publish. Probes and full checks are
|
||||
batched, not repeated per lane.
|
||||
## Preview hosting note (2026-10-22 ~10:05)
|
||||
Port 8096 stopped accepting a wildcard bind: `127.0.0.1:8096` and `::1:8096` bind,
|
||||
`0.0.0.0:8096` fails with EADDRINUSE while `lsof`/`netstat` show no listener. The
|
||||
preview now runs on **8098** (same authenticated proxy, same `app/build/web`), and
|
||||
`tailscale serve --https=8096` proxies the tailnet URL to 8098. LAN URL is
|
||||
`http://10.0.0.249:8098/`. Retry 8096 when the stuck socket clears; the published
|
||||
bundle is shared, so only the listener port differs.
|
||||
|
||||
@@ -4,7 +4,7 @@ part 'app_route_codec.dart';
|
||||
///
|
||||
/// The set mirrors [AppDestination] but stays free of widget imports so the
|
||||
/// parser and serialiser can be exercised without a Flutter host.
|
||||
enum AppRouteKind { pipelines, runs, chat, search, settings, templates }
|
||||
enum AppRouteKind { pipelines, runs, chat, search, settings, templates, schedules }
|
||||
|
||||
/// One page route: a destination plus the detail, pane and query it opens.
|
||||
///
|
||||
@@ -51,6 +51,9 @@ class AppRoute {
|
||||
/// not a fifth tab, so Back returns to Settings.
|
||||
static const templates = AppRoute(AppRouteKind.templates);
|
||||
|
||||
/// The saved-schedule list, a Settings sub-page on `/schedules`.
|
||||
static const schedules = AppRoute(AppRouteKind.schedules);
|
||||
|
||||
static const run = _RunRouteFactory();
|
||||
|
||||
/// One chat session, or the chat list when [id] is not a session id.
|
||||
|
||||
@@ -12,6 +12,7 @@ String _routePath(AppRoute route) => switch (route.kind) {
|
||||
AppRouteKind.search => '/search',
|
||||
AppRouteKind.settings => '/settings',
|
||||
AppRouteKind.templates => _templatesPath(route),
|
||||
AppRouteKind.schedules => '/schedules',
|
||||
};
|
||||
|
||||
String _pipelinePath(AppRoute route) {
|
||||
@@ -91,6 +92,7 @@ AppRoute _parseRoute(String location) {
|
||||
'search' when segments.length == 1 => AppRoute.search,
|
||||
'settings' => _settingsRoute(segments),
|
||||
'templates' => _templatesRoute(segments),
|
||||
'schedules' when segments.length == 1 => AppRoute.schedules,
|
||||
_ => AppRoute.pipelines,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -31,12 +31,14 @@ class AppRouterDelegate extends RouterDelegate<AppRoute> with ChangeNotifier {
|
||||
required this.cupertino,
|
||||
this.searchBuilder,
|
||||
this.templatesBuilder,
|
||||
this.schedulesBuilder,
|
||||
AppRoute initial = AppRoute.pipelines,
|
||||
}) : _route = initial,
|
||||
_searchReturn = initial.kind == AppRouteKind.search
|
||||
? AppRoute.pipelines
|
||||
: initial,
|
||||
_templatesReturn = initial.kind == AppRouteKind.templates
|
||||
|| initial.kind == AppRouteKind.schedules
|
||||
? AppRoute.settings
|
||||
: initial;
|
||||
|
||||
@@ -46,6 +48,7 @@ class AppRouterDelegate extends RouterDelegate<AppRoute> with ChangeNotifier {
|
||||
/// shell keeps the Settings destination mounted underneath and its state is
|
||||
/// restored when this page closes.
|
||||
final Widget Function(BuildContext context)? templatesBuilder;
|
||||
final Widget Function(BuildContext context)? schedulesBuilder;
|
||||
|
||||
/// The Search page above the shell. Search is transient chrome, not a fifth
|
||||
/// tab: the shell stays mounted underneath so closing restores its loaded
|
||||
@@ -64,6 +67,7 @@ class AppRouterDelegate extends RouterDelegate<AppRoute> with ChangeNotifier {
|
||||
static const _pageKey = ValueKey<String>('pipelines-shell');
|
||||
static const _searchPageKey = ValueKey<String>('app-search');
|
||||
static const _templatesPageKey = ValueKey<String>('app-templates');
|
||||
static const _schedulesPageKey = ValueKey<String>('app-schedules');
|
||||
|
||||
AppRoute _route;
|
||||
|
||||
@@ -79,6 +83,9 @@ class AppRouterDelegate extends RouterDelegate<AppRoute> with ChangeNotifier {
|
||||
|
||||
bool get templatesOpen => _route.kind == AppRouteKind.templates;
|
||||
|
||||
/// The saved-schedule list page, opened above Settings.
|
||||
bool get schedulesOpen => _route.kind == AppRouteKind.schedules;
|
||||
|
||||
@override
|
||||
AppRoute get currentConfiguration => _route;
|
||||
|
||||
@@ -96,9 +103,10 @@ class AppRouterDelegate extends RouterDelegate<AppRoute> with ChangeNotifier {
|
||||
Widget build(BuildContext context) {
|
||||
final searching = searchOpen && searchBuilder != null;
|
||||
final templates = templatesOpen && templatesBuilder != null;
|
||||
final schedules = schedulesOpen && schedulesBuilder != null;
|
||||
final shellRoute = searching
|
||||
? _searchReturn
|
||||
: templates
|
||||
: templates || schedules
|
||||
? _templatesReturn
|
||||
: _route;
|
||||
return Navigator(
|
||||
@@ -108,6 +116,7 @@ class AppRouterDelegate extends RouterDelegate<AppRoute> with ChangeNotifier {
|
||||
// Templates is a Settings sub-page: the shell stays mounted underneath,
|
||||
// so closing restores Settings exactly as it was left.
|
||||
if (templates) _page(_templatesPageKey, templatesBuilder!(context)),
|
||||
if (schedules) _page(_schedulesPageKey, schedulesBuilder!(context)),
|
||||
// Search is a transient full-screen mode, so a full-screen dialog gives
|
||||
// the standard Close/Cancel action instead of a Back chevron.
|
||||
if (searching)
|
||||
@@ -116,6 +125,7 @@ class AppRouterDelegate extends RouterDelegate<AppRoute> with ChangeNotifier {
|
||||
onDidRemovePage: (page) {
|
||||
if (page.key == _searchPageKey) closeSearch();
|
||||
if (page.key == _templatesPageKey) closeTemplates();
|
||||
if (page.key == _schedulesPageKey) closeSchedules();
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -133,6 +143,19 @@ class AppRouterDelegate extends RouterDelegate<AppRoute> with ChangeNotifier {
|
||||
goTo(AppRoute.settings);
|
||||
}
|
||||
|
||||
/// Open the saved-schedule list above Settings. Back restores the same
|
||||
/// Settings screen instance, like Templates.
|
||||
void openSchedules() {
|
||||
if (schedulesOpen) return;
|
||||
_templatesReturn = AppRoute.settings;
|
||||
goTo(AppRoute.schedules);
|
||||
}
|
||||
|
||||
void closeSchedules() {
|
||||
if (!schedulesOpen) return;
|
||||
goTo(AppRoute.settings);
|
||||
}
|
||||
|
||||
/// Open Search above the current destination; its route carries the browser
|
||||
/// history entry, and close/back returns to what was open before.
|
||||
void openSearch() {
|
||||
@@ -164,6 +187,10 @@ class AppRouterDelegate extends RouterDelegate<AppRoute> with ChangeNotifier {
|
||||
closeSearch();
|
||||
return true;
|
||||
}
|
||||
if (schedulesOpen) {
|
||||
closeSchedules();
|
||||
return true;
|
||||
}
|
||||
if (templatesOpen) {
|
||||
closeTemplates();
|
||||
return true;
|
||||
|
||||
@@ -19,6 +19,7 @@ import 'app_session.dart';
|
||||
import 'chat_destination.dart';
|
||||
import 'pipelines_destination.dart';
|
||||
import 'runs_destination.dart';
|
||||
import 'schedules_destination.dart';
|
||||
import 'search_destination.dart';
|
||||
import 'server_endpoint.dart';
|
||||
import 'templates_destination.dart';
|
||||
@@ -99,6 +100,7 @@ class _PipelinesAppState extends State<PipelinesApp> {
|
||||
onPopToChat: () => _delegate.goTo(AppRoute.chat),
|
||||
searchBuilder: _buildSearch,
|
||||
templatesBuilder: _buildTemplates,
|
||||
schedulesBuilder: _buildSchedules,
|
||||
builder: _buildShell,
|
||||
);
|
||||
_config = RouterConfig<AppRoute>(
|
||||
@@ -163,6 +165,13 @@ class _PipelinesAppState extends State<PipelinesApp> {
|
||||
|
||||
/// The Templates page above Settings. Closing it restores the same Settings
|
||||
/// screen instance, so an edited field or an open connection state survives.
|
||||
Widget _buildSchedules(BuildContext context) => SchedulesDestination(
|
||||
session: _session,
|
||||
server: widget.server,
|
||||
onBack: _delegate.closeSchedules,
|
||||
onOpenPipeline: (id) => _delegate.goTo(AppRoute.pipeline(id)),
|
||||
);
|
||||
|
||||
Widget _buildTemplates(BuildContext context) => TemplatesDestination(
|
||||
session: _session,
|
||||
server: widget.server,
|
||||
@@ -225,6 +234,7 @@ class _PipelinesAppState extends State<PipelinesApp> {
|
||||
initialEndpoint: _session.endpoint,
|
||||
embedded: true,
|
||||
onOpenTemplates: _delegate.openTemplates,
|
||||
onOpenSchedules: _delegate.openSchedules,
|
||||
notifications: _notifications,
|
||||
),
|
||||
},
|
||||
@@ -237,8 +247,9 @@ class _PipelinesAppState extends State<PipelinesApp> {
|
||||
// Search is a transient page above the shell; it never becomes a tab.
|
||||
AppRouteKind.search => AppDestination.pipelines,
|
||||
AppRouteKind.settings => AppDestination.settings,
|
||||
// Templates is a Settings sub-page, not a fifth tab.
|
||||
// Templates and Schedules are Settings sub-pages, not a fifth tab.
|
||||
AppRouteKind.templates => AppDestination.settings,
|
||||
AppRouteKind.schedules => AppDestination.settings,
|
||||
};
|
||||
|
||||
AppRoute _routeOf(AppDestination destination) => switch (destination) {
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../features/schedules/data/schedules_repository.dart';
|
||||
import '../features/schedules/ui/list/schedule_list_controller.dart';
|
||||
import '../features/schedules/ui/list/schedule_list_view.dart';
|
||||
import '../ui/adaptive/host.dart';
|
||||
import 'app_session.dart';
|
||||
import 'server_endpoint.dart';
|
||||
|
||||
/// The saved-schedule list above Settings.
|
||||
///
|
||||
/// It is read-only: opening a row asks the composition to show the owning
|
||||
/// pipeline's Summary, where the landed section owns create/edit/pause/delete.
|
||||
/// The list never saves, pauses or deletes anything itself.
|
||||
class SchedulesDestination extends StatefulWidget {
|
||||
const SchedulesDestination({
|
||||
super.key,
|
||||
required this.session,
|
||||
required this.server,
|
||||
required this.onBack,
|
||||
required this.onOpenPipeline,
|
||||
});
|
||||
|
||||
final AppSession session;
|
||||
final ServerEndpoint server;
|
||||
final VoidCallback onBack;
|
||||
final ValueChanged<int> onOpenPipeline;
|
||||
|
||||
@override
|
||||
State<SchedulesDestination> createState() => _SchedulesDestinationState();
|
||||
}
|
||||
|
||||
class _SchedulesDestinationState extends State<SchedulesDestination> {
|
||||
late final SchedulesController _controller;
|
||||
final TextEditingController _search = TextEditingController();
|
||||
final ScrollController _scroll = ScrollController();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_controller = SchedulesController(
|
||||
repository: SchedulesRepository(widget.session.gateway),
|
||||
);
|
||||
unawaited(_controller.refresh());
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(SchedulesDestination oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
if (oldWidget.session.gateway != widget.session.gateway) {
|
||||
// A different server lists different schedules; re-read through the same
|
||||
// controller so the screen is never shown with the old server's rows.
|
||||
unawaited(_controller.refresh());
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_controller.dispose();
|
||||
_search.dispose();
|
||||
_scroll.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final cupertino = usesCupertinoHost(context);
|
||||
final page = _page(cupertino);
|
||||
return AnimatedBuilder(
|
||||
animation: widget.session,
|
||||
builder: (context, _) => page,
|
||||
);
|
||||
}
|
||||
|
||||
Widget _page(bool cupertino) {
|
||||
final body = _body(cupertino);
|
||||
if (cupertino) {
|
||||
return CupertinoPageScaffold(
|
||||
navigationBar: CupertinoNavigationBar(
|
||||
leading: CupertinoButton(
|
||||
padding: EdgeInsets.zero,
|
||||
onPressed: widget.onBack,
|
||||
child: const Icon(CupertinoIcons.back, semanticLabel: 'Back'),
|
||||
),
|
||||
middle: const Text('Schedules'),
|
||||
),
|
||||
child: SafeArea(child: body),
|
||||
);
|
||||
}
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: IconButton(
|
||||
onPressed: widget.onBack,
|
||||
icon: const Icon(Icons.arrow_back, semanticLabel: 'Back'),
|
||||
),
|
||||
title: const Text('Schedules'),
|
||||
),
|
||||
body: body,
|
||||
);
|
||||
}
|
||||
|
||||
Widget _body(bool cupertino) {
|
||||
if (!widget.session.everConnected) {
|
||||
return const Center(child: Text('Connect to the server to see schedules.'));
|
||||
}
|
||||
return SchedulesListView(
|
||||
controller: _controller,
|
||||
searchController: _search,
|
||||
scrollController: _scroll,
|
||||
cupertino: cupertino,
|
||||
onOpen: (schedule) {
|
||||
final id = schedule.pipelineId;
|
||||
if (id != null) widget.onOpenPipeline(id);
|
||||
},
|
||||
onRefresh: () => _controller.refresh(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -10,4 +10,5 @@ abstract final class SettingsKeys {
|
||||
static const workspace = ValueKey<String>('settings.workspace');
|
||||
static const saveWorkspace = ValueKey<String>('settings.saveWorkspace');
|
||||
static const templates = ValueKey<String>('settings.templates');
|
||||
static const schedules = ValueKey<String>('settings.schedules');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'settings_keys.dart';
|
||||
import 'settings_theme.dart';
|
||||
|
||||
/// The Settings entry to the saved-schedule list.
|
||||
///
|
||||
/// The row only opens the route; the list's own controller performs the single
|
||||
/// `list_schedules` read, exactly like the Templates entry.
|
||||
const String settingsSchedulesLabel = 'Browse schedules';
|
||||
const String settingsSchedulesSecondary =
|
||||
'Saved run configurations for every pipeline.';
|
||||
|
||||
class SettingsSchedulesSection extends StatelessWidget {
|
||||
const SettingsSchedulesSection({super.key, required this.onOpen});
|
||||
|
||||
final VoidCallback onOpen;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (usesCupertinoControls(context)) {
|
||||
return CupertinoListSection.insetGrouped(
|
||||
margin: EdgeInsets.zero,
|
||||
children: <Widget>[
|
||||
CupertinoListTile(
|
||||
key: SettingsKeys.schedules,
|
||||
title: const Text(settingsSchedulesLabel),
|
||||
subtitle: const Text(settingsSchedulesSecondary),
|
||||
trailing: const CupertinoListTileChevron(),
|
||||
onTap: onOpen,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
return Card(
|
||||
margin: EdgeInsets.zero,
|
||||
child: ListTile(
|
||||
key: SettingsKeys.schedules,
|
||||
title: const Text(settingsSchedulesLabel),
|
||||
subtitle: const Text(settingsSchedulesSecondary),
|
||||
trailing: const Icon(Icons.chevron_right),
|
||||
onTap: onOpen,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import 'settings_controller.dart';
|
||||
import 'settings_controls.dart';
|
||||
import 'settings_layout.dart';
|
||||
import 'settings_notifications_section.dart';
|
||||
import 'settings_schedules_section.dart';
|
||||
import 'settings_sections.dart';
|
||||
import 'settings_store.dart';
|
||||
import 'settings_templates_section.dart';
|
||||
@@ -31,6 +32,7 @@ class SettingsScreen extends StatefulWidget {
|
||||
this.ping,
|
||||
this.embedded = false,
|
||||
this.onOpenTemplates,
|
||||
this.onOpenSchedules,
|
||||
this.notifications,
|
||||
});
|
||||
|
||||
@@ -53,6 +55,9 @@ class SettingsScreen extends StatefulWidget {
|
||||
/// without a dead row that would go nowhere.
|
||||
final VoidCallback? onOpenTemplates;
|
||||
|
||||
/// Opens the saved-schedule list above Settings.
|
||||
final VoidCallback? onOpenSchedules;
|
||||
|
||||
/// The app-level notification capability; absent in connection-only fixtures.
|
||||
final NotificationController? notifications;
|
||||
|
||||
@@ -141,6 +146,12 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
controller: widget.notifications!,
|
||||
),
|
||||
],
|
||||
if (widget.onOpenSchedules != null) ...<Widget>[
|
||||
const SizedBox(height: settingsSectionGap),
|
||||
const _SectionTitle('Schedules'),
|
||||
const SizedBox(height: settingsTitleGap),
|
||||
SettingsSchedulesSection(onOpen: widget.onOpenSchedules!),
|
||||
],
|
||||
if (widget.onOpenTemplates != null) ...<Widget>[
|
||||
const SizedBox(height: settingsSectionGap),
|
||||
const _SectionTitle('Templates'),
|
||||
|
||||
@@ -246,4 +246,11 @@ void main() {
|
||||
expect(AppRoute(AppRouteKind.pipelines, pipelineId: 0).path, '/pipelines');
|
||||
expect(AppRoute(AppRouteKind.runs, runId: 0).path, '/runs');
|
||||
});
|
||||
|
||||
test('the saved-schedule list is a Settings sub-page URL', () {
|
||||
expect(AppRoute.schedules.path, '/schedules');
|
||||
expect(AppRoute.parse('/schedules'), AppRoute.schedules);
|
||||
// Unknown deeper paths still resolve to the default list.
|
||||
expect(AppRoute.parse('/schedules/1'), AppRoute.pipelines);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user