feat(app): icon-only tab bars, Settings from the Pipelines bar, main bar bottom right with detail bars above it
Settings leaves the tab bar (Pipelines, Runs, Chat, Search) and opens as a page from a gear in the Pipelines bar, keeping /settings, its keys and a Back to Pipelines (also the system Back). Every floating tab bar shows icons only, named for assistive technology. On wide windows the shell's tab bar stays at the bottom right; a split detail learns its height plus a 12px gap, so its tabs or the chat composer float above it, and pages the detail opens (the stage page) stay in its pane through its own navigator.
This commit is contained in:
@@ -64,7 +64,9 @@ void main() {
|
||||
|
||||
await tester.tap(find.text('First chat'));
|
||||
await tester.pumpAndSettle();
|
||||
final navigator = tester.state<NavigatorState>(find.byType(Navigator));
|
||||
final navigator = tester.state<NavigatorState>(
|
||||
find.byType(Navigator).first,
|
||||
);
|
||||
expect(navigator.canPop(), isFalse, reason: 'No page covers the shell');
|
||||
expect(find.byType(NavigationRail), findsNothing);
|
||||
expect(find.byType(FloatingDestinationBar), findsOneWidget);
|
||||
@@ -106,7 +108,7 @@ void main() {
|
||||
expect(navigator.canPop(), isFalse);
|
||||
|
||||
// The rail still switches destinations with a chat open.
|
||||
await tester.tap(find.text('Runs'));
|
||||
await tester.tap(find.byKey(const ValueKey('shell.destination.runs')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byKey(const ValueKey('chat-thread-b')), findsNothing);
|
||||
|
||||
@@ -120,7 +122,9 @@ void main() {
|
||||
|
||||
await tester.tap(find.text('First chat'));
|
||||
await tester.pumpAndSettle();
|
||||
final navigator = tester.state<NavigatorState>(find.byType(Navigator));
|
||||
final navigator = tester.state<NavigatorState>(
|
||||
find.byType(Navigator).first,
|
||||
);
|
||||
expect(navigator.canPop(), isTrue);
|
||||
expect(findNativeBack(), findsOneWidget);
|
||||
expect(find.byType(NavigationBar), findsNothing);
|
||||
|
||||
@@ -46,9 +46,11 @@ Future<void> _pumpScreen(WidgetTester tester) async {
|
||||
Future<void> _openGraphTab(WidgetTester tester, int pipelineId) async {
|
||||
await tester.tap(find.byKey(Key('pipeline-row-$pipelineId')));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.ensureVisible(find.text('Graph'));
|
||||
await tester.ensureVisible(
|
||||
find.byKey(const Key('pipeline-detail-tab-graph')),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Graph'));
|
||||
await tester.tap(find.byKey(const Key('pipeline-detail-tab-graph')));
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
}
|
||||
|
||||
@@ -61,9 +61,11 @@ Future<void> _openGraphTab(WidgetTester tester, int pipelineId) async {
|
||||
// The detail header scrolls when content-driven title/tab height needs it
|
||||
// (the header gained the native Run action), so reach the tab like an
|
||||
// operator would instead of requiring it to fit without scrolling.
|
||||
await tester.ensureVisible(find.text('Graph'));
|
||||
await tester.ensureVisible(
|
||||
find.byKey(const Key('pipeline-detail-tab-graph')),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Graph'));
|
||||
await tester.tap(find.byKey(const Key('pipeline-detail-tab-graph')));
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
}
|
||||
@@ -203,9 +205,9 @@ void main() {
|
||||
|
||||
// The selection belongs to the panel, so an in-place tab round trip keeps
|
||||
// the same node marked (the web keeps its graph selection across tabs).
|
||||
await tester.tap(find.text('Summary'));
|
||||
await tester.tap(find.byKey(const Key('pipeline-detail-tab-summary')));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Graph'));
|
||||
await tester.tap(find.byKey(const Key('pipeline-detail-tab-graph')));
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
expect(tester.widget<GraphStageNode>(_node('review')).selected, isTrue);
|
||||
@@ -227,14 +229,14 @@ void main() {
|
||||
|
||||
// The selection belongs to the pinned definition: changing version must not
|
||||
// carry a same-named node's mark into the other version.
|
||||
await tester.tap(find.text('Summary'));
|
||||
await tester.tap(find.byKey(const Key('pipeline-detail-tab-summary')));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.ensureVisible(find.byKey(const Key('pipeline-version-1')));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.byKey(const Key('pipeline-version-1')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Viewing v1 (latest v2).'), findsOneWidget);
|
||||
await tester.tap(find.text('Graph'));
|
||||
await tester.tap(find.byKey(const Key('pipeline-detail-tab-graph')));
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
expect(tester.widget<GraphStageNode>(_node('review')).selected, isFalse);
|
||||
|
||||
@@ -75,14 +75,14 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
expect(gateway.callsOf('list_schedules').single.fields, {'pipeline_id': 1});
|
||||
|
||||
await tester.tap(find.text('Source'));
|
||||
await tester.tap(find.byKey(const Key('pipeline-detail-tab-source')));
|
||||
await tester.pump();
|
||||
expect(find.text('name: alpha'), findsOneWidget);
|
||||
await tester.tap(find.text('Graph'));
|
||||
await tester.tap(find.byKey(const Key('pipeline-detail-tab-graph')));
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
expect(find.byKey(scheduleAddKey), findsNothing);
|
||||
await tester.tap(find.text('Summary'));
|
||||
await tester.tap(find.byKey(const Key('pipeline-detail-tab-summary')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Research batteries'), findsOneWidget);
|
||||
});
|
||||
|
||||
@@ -81,7 +81,7 @@ void main() {
|
||||
expect(rect.left, greaterThanOrEqualTo(pill.left), reason: tab.name);
|
||||
expect(rect.right, lessThanOrEqualTo(pill.right), reason: tab.name);
|
||||
}
|
||||
await tester.tap(find.text('Source'));
|
||||
await tester.tap(find.byKey(const Key('pipeline-detail-tab-source')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(selected, PipelineDetailTab.source);
|
||||
expect(tester.takeException(), isNull);
|
||||
|
||||
@@ -68,9 +68,11 @@ void main() {
|
||||
await tester.tap(find.byKey(const Key('pipeline-row-1')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(tester.takeException(), isNull);
|
||||
await tester.ensureVisible(find.text('Source'));
|
||||
await tester.ensureVisible(
|
||||
find.byKey(const Key('pipeline-detail-tab-source')),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Source'));
|
||||
await tester.tap(find.byKey(const Key('pipeline-detail-tab-source')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(tester.takeException(), isNull);
|
||||
expect(
|
||||
@@ -153,7 +155,7 @@ void main() {
|
||||
await tester.tap(find.byKey(const Key('pipeline-version-1')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Viewing v1 (latest v2).'), findsOneWidget);
|
||||
await tester.tap(find.text('Source'));
|
||||
await tester.tap(find.byKey(const Key('pipeline-detail-tab-source')));
|
||||
await tester.pump();
|
||||
expect(
|
||||
selectableText(
|
||||
@@ -199,9 +201,11 @@ void main() {
|
||||
// The header scrolls instead of squeezing the tab out; the tabs stay
|
||||
// reachable inside it and the tab keeps a bounded slot.
|
||||
expect(tester.takeException(), isNull);
|
||||
await tester.ensureVisible(find.text('Graph'));
|
||||
await tester.ensureVisible(
|
||||
find.byKey(const Key('pipeline-detail-tab-graph')),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Graph'));
|
||||
await tester.tap(find.byKey(const Key('pipeline-detail-tab-graph')));
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
expect(tester.takeException(), isNull);
|
||||
|
||||
@@ -45,7 +45,7 @@ void main() {
|
||||
'version': 2,
|
||||
});
|
||||
|
||||
await tester.tap(find.text('Source'));
|
||||
await tester.tap(find.byKey(const Key('pipeline-detail-tab-source')));
|
||||
await tester.pump();
|
||||
expect(
|
||||
selectableText('name: Alpha review\nstages:\n review:\n type: model'),
|
||||
@@ -73,7 +73,7 @@ void main() {
|
||||
});
|
||||
expect(find.text('Viewing v1 (latest v2).'), findsOneWidget);
|
||||
|
||||
await tester.tap(find.text('Source'));
|
||||
await tester.tap(find.byKey(const Key('pipeline-detail-tab-source')));
|
||||
await tester.pump();
|
||||
expect(
|
||||
selectableText(
|
||||
@@ -83,7 +83,7 @@ void main() {
|
||||
findsOneWidget,
|
||||
);
|
||||
|
||||
await tester.tap(find.text('Summary'));
|
||||
await tester.tap(find.byKey(const Key('pipeline-detail-tab-summary')));
|
||||
await tester.pump();
|
||||
await tester.tap(find.byKey(const Key('pipeline-latest-version')));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
@@ -112,7 +112,10 @@ void main() {
|
||||
await tester.tap(find.byKey(const ValueKey('run-detail-tab-changes')));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Changes'), findsOneWidget);
|
||||
expect(
|
||||
find.byKey(const ValueKey('run-detail-tab-changes')),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(find.text('lib/feature.dart'), findsOneWidget);
|
||||
expect(
|
||||
find.text('1 file changed · +2 -2 · capture incomplete'),
|
||||
|
||||
@@ -25,21 +25,31 @@ void main() {
|
||||
RunDetailTab.changes,
|
||||
]);
|
||||
final strip = find.byKey(const Key('run-detail-tabs'));
|
||||
for (final label in ['Summary', 'Timeline', 'Artifacts', 'Changes']) {
|
||||
// Icon-only tabs, each keyed by its name.
|
||||
for (final name in ['summary', 'timeline', 'artifacts', 'changes']) {
|
||||
expect(
|
||||
find.descendant(of: strip, matching: find.text(label)),
|
||||
find.descendant(
|
||||
of: strip,
|
||||
matching: find.byKey(ValueKey('run-detail-tab-$name')),
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
}
|
||||
expect(
|
||||
find.descendant(of: strip, matching: find.text('Graph')),
|
||||
find.descendant(
|
||||
of: strip,
|
||||
matching: find.byKey(const ValueKey('run-detail-tab-graph')),
|
||||
),
|
||||
findsNothing,
|
||||
);
|
||||
expect(find.byKey(runGraphPreviewKey), findsOneWidget);
|
||||
// Input and Output are Summary sections now, never separate tabs.
|
||||
for (final label in ['Input', 'Output']) {
|
||||
for (final name in ['input', 'output']) {
|
||||
expect(
|
||||
find.descendant(of: strip, matching: find.text(label)),
|
||||
find.descendant(
|
||||
of: strip,
|
||||
matching: find.byKey(ValueKey('run-detail-tab-$name')),
|
||||
),
|
||||
findsNothing,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -165,9 +165,12 @@ void main() {
|
||||
}
|
||||
|
||||
Future<void> tapTab(String label) async {
|
||||
await tester.ensureVisible(find.text(label));
|
||||
final tab = find.byKey(
|
||||
ValueKey('run-detail-tab-${label.toLowerCase()}'),
|
||||
);
|
||||
await tester.ensureVisible(tab);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text(label));
|
||||
await tester.tap(tab);
|
||||
await tester.pumpAndSettle();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user