Merge branch 'main' into flutter/chat-model-picker

This commit is contained in:
2026-10-22 12:28:15 +01:00
9 changed files with 262 additions and 55 deletions
+4 -4
View File
@@ -22,7 +22,7 @@ or scratch servers only, never real operator sessions/runs/workflows.
| Area | Current state | Remaining acceptance |
| --- | --- | --- |
| Shared transport/settings connection | Preview | foreground recovery, persisted endpoint boot, protocol warning, complete refresh semantics |
| Native shell/run URLs | Preview: full route vocabulary including pipeline/version/stage, template detail, run visit/stage and decide, runs pipeline filter; pipeline and template links open their detail | run visit/stage and decide destinations still open the run only; no native OS deep-link registration |
| Native shell/run URLs | Preview: full route vocabulary; pipeline/version/stage, template detail and run visit/stage links open their detail/pane | `?action=decide` opening the prompt, runs pipeline filter, native OS deep-link registration |
| Pipeline list/filter/sort/detail/source/versions | Preview: recorded row metadata and miniature, pinned detail URLs, filter/sort | none outstanding on the list/detail read path |
| Definition graph | Preview: measured native canvas, pipeline Graph tab, pan/zoom, expanded view, stage definition pane, pipeline stage deep link | live activity pulse on the run graph (tracked below) |
| Start a pipeline | Preview: native Run action, prompt/workspace/notify dialog, pinned run request, response-loss check/retry | Report format, recent-directory suggestions, pending intent across a reload |
@@ -45,12 +45,12 @@ or scratch servers only, never real operator sessions/runs/workflows.
| Chat message surfaces | Preview: formatted assistant markdown (safe links/headings/lists/tables/fences), user text exact, disclosures plain | exact attachments, unknown-part rendering beyond retained placeholders |
| Chat activity/reasoning/tools | Preview: one activity line, expanded native overlay with lifecycle/input/output/error/duration/edit diff | compaction wording variants |
| Chat composer | Preview: field, Send/Stop, persisted draft, queued/refusal lines; one verified send in the real app flow | attachments, paste and slash palette remain |
| Chat attachments | Preview: host picker, bounded 1 MiB draft, composer chips with removal, base64 wire payload | paste, send wiring in the composer, history reconciliation |
| Chat attachments | Preview: host picker, bounded 1 MiB draft, composer chips, base64 wire payload | send wiring in the composer, paste, history reconciliation |
| 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: numeric Info sheet (unknown != 0) landed | current-model selection, bounded background-task pages |
| Chat commands/notices/scroll | Source: dismissible local notices landed | slash palette/actions, unknown-command send-as-message, saved scroll/follow intent |
| Chat commands/notices/scroll | Preview: dismissible local notices with reconnect clearing | slash palette/actions, unknown-command send-as-message, saved scroll/follow intent |
| Saved schedule list | Preview: Settings row, /schedules route, read-only list; a row opens the owning pipeline detail (Summary by default) | authenticated smoke |
| 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 |
| Schedule editor | Preview: pipeline Summary creates/edits/pauses/deletes with the lossless draft and revision guard; conflict keeps the draft and shows the server words | Schedule-this-run seeding |
| 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, native sheet, dismiss/clear persistence, live fold, transition notifications, Settings permission tile | authenticated preview smoke |
| Notifications | Preview: Settings permission tile over live platform state, transition-only dedupe, tap opens the run | background question notices; permission/browser smoke only in fixtures |
+5
View File
@@ -71,6 +71,11 @@ All work under app/. Existing applications remain running and unchanged.
| Chat sessions | Create/rename/star/close/hide | run98 retained + canceled | oversized run cancelled after 3h; manager verified 155 chat tests, rebased, merged; 1259 suite | merged main | directory groups/search |
| Turn documents | Gallery document slots | run102 retained + canceled | oversized run cancelled; 148 artifact tests, rebased; manager fixed visit drill-down to keep session.html out of stage files | merged main | 1284 suite |
| Attach picker | Host file input seam | run112 micro | single behaviour; 193 chat tests | merged main | chips/send next |
| Chat notices | Dismissible local notices | run121 / merged | micro; 1387 suite; reconnect clears | merged main | preview published 8098 |
| Stage deep link | Pipeline stage from the route | run122 / merged | 1h27m for one behaviour (3 Code visits); tree green | merged main | - |
| Attach send | Composer send with attachments | run123 running | - | - | - |
| Decide route | Decision prompt from the URL | run124 running | - | - | - |
| Model picker | Recorded model chooser | run125 running | - | - | - |
| Routes | Full URL vocabulary | run113 micro | parse/serialise every web route form; 1327 suite | merged main | stage panes next |
| Session export | Recorded state surface | run110 micro | state wording + reasons read-only | merged main | repair request next |
| Activity overlay | Expanded recorded activity | run111 micro | expand/collapse with recorded fields | merged main | - |
@@ -1,4 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The client reaches the Pipelines server over the shared socket. -->
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:label="Pipelines Next"
android:name="${applicationName}"
@@ -36,22 +36,118 @@ class ChatMessageView extends StatelessWidget {
...content,
],
);
// The web draws the operator's turn right-aligned in an accent-tinted bubble
// and the agent's left-aligned on the neutral surface, both capped to a
// readable measure. The role label stays outside the bubble.
final contentBody = cupertino
? DefaultTextStyle.merge(
style: CupertinoTheme.of(context).textTheme.textStyle,
child: body,
)
: body;
// A Material surface (not a bare DecoratedBox) so the disclosure ListTiles
// inside the bubble keep their ink and background.
final bubble = cupertino
? Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
decoration: _bubbleDecoration(context, cupertino, user: user),
child: contentBody,
)
: Material(
color: _bubbleColor(context, cupertino, user: user),
clipBehavior: Clip.antiAlias,
shape: _bubbleShape(context, cupertino, user: user),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
child: contentBody,
),
);
return Semantics(
container: true,
explicitChildNodes: true,
label: '$role message',
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 8),
child: cupertino
? DefaultTextStyle.merge(
style: CupertinoTheme.of(context).textTheme.textStyle,
child: body,
)
: body,
padding: const EdgeInsets.symmetric(vertical: 6),
child: Align(
alignment: user
? AlignmentDirectional.centerEnd
: AlignmentDirectional.centerStart,
child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 560),
child: bubble,
),
),
),
);
}
Color _bubbleColor(BuildContext context, bool cupertino, {required bool user}) {
final accent = cupertino
? CupertinoTheme.of(context).primaryColor
: Theme.of(context).colorScheme.primary;
final surface = cupertino
? CupertinoColors.secondarySystemGroupedBackground.resolveFrom(context)
: Theme.of(context).colorScheme.surfaceContainerLow;
return user ? accent.withValues(alpha: 0.16) : surface;
}
ShapeBorder _bubbleShape(
BuildContext context,
bool cupertino, {
required bool user,
}) {
final accent = cupertino
? CupertinoTheme.of(context).primaryColor
: Theme.of(context).colorScheme.primary;
final border = cupertino
? CupertinoColors.separator.resolveFrom(context)
: Theme.of(context).colorScheme.outlineVariant;
return RoundedRectangleBorder(
side: BorderSide(
color: user ? accent.withValues(alpha: 0.4) : border,
),
borderRadius: BorderRadius.only(
topLeft: const Radius.circular(12),
topRight: const Radius.circular(12),
bottomLeft: Radius.circular(user ? 12 : 4),
bottomRight: Radius.circular(user ? 4 : 12),
),
);
}
BoxDecoration _bubbleDecoration(
BuildContext context,
bool cupertino, {
required bool user,
}) {
final Color accent;
final Color surface;
final Color border;
if (cupertino) {
accent = CupertinoTheme.of(context).primaryColor;
surface = CupertinoColors.secondarySystemGroupedBackground.resolveFrom(
context,
);
border = CupertinoColors.separator.resolveFrom(context);
} else {
final scheme = Theme.of(context).colorScheme;
accent = scheme.primary;
surface = scheme.surfaceContainerLow;
border = scheme.outlineVariant;
}
final radius = BorderRadius.only(
topLeft: const Radius.circular(12),
topRight: const Radius.circular(12),
bottomLeft: Radius.circular(user ? 12 : 4),
bottomRight: Radius.circular(user ? 4 : 12),
);
return BoxDecoration(
color: user ? accent.withValues(alpha: 0.16) : surface,
border: Border.all(color: user ? accent.withValues(alpha: 0.4) : border),
borderRadius: radius,
);
}
TextStyle? _roleStyle(BuildContext context, bool cupertino) =>
(cupertino
? CupertinoTheme.of(context).textTheme.textStyle
@@ -125,7 +125,10 @@ class ScrollWhenOverflowing extends StatelessWidget {
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: ConstrainedBox(
constraints: BoxConstraints(minWidth: constraints.maxWidth),
// Content width, not the pane width: the web's tabs are compact
// and left-aligned, not a full-width segmented bar. The scroll
// view still reveals every segment on a narrow pane.
constraints: const BoxConstraints(),
child: child,
),
),
+28 -22
View File
@@ -52,29 +52,10 @@ class RunsList extends StatelessWidget {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(16, 8, 16, 0),
child: Align(
alignment: AlignmentDirectional.centerEnd,
child: NeedsYouRunsHeading(
rows: controller.runs,
frames: controller.repository.gateway.frames,
onOpen: (entry) => onSelected(entry.runId),
syncToken: syncToken,
store: attentionStore,
now: attentionNow,
notifications: notifications,
),
),
),
if (controller.usage != null)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: Text('Usage: ${controller.usage}'),
),
_heading(context),
if (controller.error != null) _inlineError(context),
Padding(
padding: const EdgeInsets.all(16),
padding: const EdgeInsetsDirectional.fromSTEB(16, 12, 16, 4),
child: usesCupertinoHost(context)
? CupertinoSearchTextField(
placeholder: 'Filter runs',
@@ -92,8 +73,10 @@ class RunsList extends StatelessWidget {
Expanded(
child: controller.visibleRuns.isEmpty
? const Center(child: Text('No runs found.'))
: ListView.builder(
: ListView.separated(
itemCount: controller.visibleRuns.length,
separatorBuilder: (context, index) =>
const Divider(height: 1),
itemBuilder: (context, index) =>
_runTile(context, controller.visibleRuns[index]),
),
@@ -102,6 +85,29 @@ class RunsList extends StatelessWidget {
);
}
Widget _heading(BuildContext context) => Padding(
padding: const EdgeInsetsDirectional.fromSTEB(16, 8, 16, 0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: controller.usage == null
? const SizedBox.shrink()
: Text('Usage: ${controller.usage}'),
),
NeedsYouRunsHeading(
rows: controller.runs,
frames: controller.repository.gateway.frames,
onOpen: (entry) => onSelected(entry.runId),
syncToken: syncToken,
store: attentionStore,
now: attentionNow,
notifications: notifications,
),
],
),
);
Widget _emptyError(BuildContext context) => Center(
child: Column(
mainAxisSize: MainAxisSize.min,
+74 -16
View File
@@ -99,22 +99,35 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
),
),
child: SafeArea(
child: Column(
children: [
Expanded(child: _destinationStack(contents, index)),
CupertinoTabBar(
currentIndex: index,
onTap: (value) => _select(AppDestination.values[value]),
items: _items((destination) {
final item = destinationDetails(destination);
return BottomNavigationBarItem(
icon: Icon(item.cupertinoIcon),
label: item.label,
);
}),
),
],
),
child: wide
// The web keeps a destination rail on a wide window. A native
// Cupertino sidebar list is the same idea with the host's own
// controls; the tab bar stays the narrow-window navigation.
? Row(
children: [
_CupertinoSidebar(
selected: _selected,
onSelected: _select,
),
Expanded(child: _destinationStack(contents, index)),
],
)
: Column(
children: [
Expanded(child: _destinationStack(contents, index)),
CupertinoTabBar(
currentIndex: index,
onTap: (value) => _select(AppDestination.values[value]),
items: _items((destination) {
final item = destinationDetails(destination);
return BottomNavigationBarItem(
icon: Icon(item.cupertinoIcon),
label: item.label,
);
}),
),
],
),
),
);
}
@@ -172,3 +185,48 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
Widget _destinationStack(List<Widget> contents, int index) =>
IndexedStack(index: index, children: contents);
}
/// The wide-window Cupertino destination list: the web's 200px rail with the
/// host's own grouped list controls.
class _CupertinoSidebar extends StatelessWidget {
const _CupertinoSidebar({required this.selected, required this.onSelected});
final AppDestination selected;
final ValueChanged<AppDestination> onSelected;
@override
Widget build(BuildContext context) {
final theme = CupertinoTheme.of(context);
return Container(
width: 200,
decoration: BoxDecoration(
color: CupertinoColors.secondarySystemGroupedBackground.resolveFrom(
context,
),
border: Border(
right: BorderSide(
color: CupertinoColors.separator.resolveFrom(context),
),
),
),
child: ListView(
padding: const EdgeInsets.symmetric(vertical: 8),
children: [
for (final destination in AppDestination.values)
CupertinoListTile(
key: ValueKey('shell.destination.${destination.name}'),
leading: Icon(destinationDetails(destination).cupertinoIcon),
title: Text(destinationDetails(destination).label),
trailing: destination == selected
? Icon(
CupertinoIcons.checkmark_alt,
color: theme.primaryColor,
)
: null,
onTap: () => onSelected(destination),
),
],
),
);
}
}
+27 -1
View File
@@ -38,16 +38,42 @@ void main() {
);
}
testWidgets('Cupertino shell uses native navigation controls', (
testWidgets('Cupertino shell uses a tab bar on a narrow window', (
tester,
) async {
tester.view.physicalSize = const Size(390, 844);
tester.view.devicePixelRatio = 1;
addTearDown(tester.view.resetPhysicalSize);
addTearDown(tester.view.resetDevicePixelRatio);
await tester.pumpWidget(const MyApp(cupertino: true));
expect(find.byType(CupertinoNavigationBar), findsOneWidget);
expect(find.byType(CupertinoTabBar), findsOneWidget);
expect(find.text('Pipelines — Not implemented'), findsOneWidget);
});
testWidgets('Cupertino shell uses a sidebar on a wide window', (
tester,
) async {
tester.view.physicalSize = const Size(1280, 900);
tester.view.devicePixelRatio = 1;
addTearDown(tester.view.resetPhysicalSize);
addTearDown(tester.view.resetDevicePixelRatio);
await tester.pumpWidget(const MyApp(cupertino: true));
expect(find.byType(CupertinoTabBar), findsNothing);
expect(
find.byKey(const ValueKey('shell.destination.pipelines')),
findsOneWidget,
);
await tester.tap(find.byKey(const ValueKey('shell.destination.runs')));
await tester.pumpAndSettle();
expect(find.text('Runs — Not implemented'), findsOneWidget);
});
testWidgets('Cupertino content stays inside safe area', (tester) async {
tester.view.physicalSize = const Size(390, 844);
tester.view.devicePixelRatio = 1;
addTearDown(tester.view.resetPhysicalSize);
addTearDown(tester.view.resetDevicePixelRatio);
tester.view.padding = const FakeViewPadding(top: 36, bottom: 28);
addTearDown(tester.view.resetPadding);
await tester.pumpWidget(const MyApp(cupertino: true));
+15 -4
View File
@@ -532,12 +532,23 @@ try {
await clickText('Chat');
await clickText('Probe conversation', { contains: true });
await assertBody('User message');
// The empty composer exposes a hint, not an accessible label, so focus it by
// clicking its visible strip above the navigation bar; JS focus alone is not
// Flutter's editing connection and would swallow the text.
// The empty composer exposes a hint, not an accessible label. Locate the
// semantics text field and click its centre: a fixed point misses once an
// attachment strip grows the composer, and JS focus alone is not Flutter's
// editing connection.
const composerPoint = await evaluate(`(() => {
const fields = [...document.querySelectorAll('flt-semantics[role="textbox"], input, textarea')];
const rects = fields
.map((el) => el.getBoundingClientRect())
.filter((r) => r.width > 40 && r.height > 10);
if (!rects.length) return null;
const lowest = rects.sort((a, b) => b.bottom - a.bottom)[0];
return { x: lowest.left + lowest.width / 2, y: lowest.top + lowest.height / 2 };
})()`);
if (!composerPoint) throw new Error('The composer text field is not exposed');
for (const type of ['mousePressed', 'mouseReleased']) {
await send('Input.dispatchMouseEvent', {
type, x: 150, y: 700, button: 'left', clickCount: 1,
type, x: composerPoint.x, y: composerPoint.y, button: 'left', clickCount: 1,
}, session);
}
await delay(400);