Complete prompt presets, body-priority panes and clearer chat and stage layouts

This commit is contained in:
2026-10-25 23:11:06 +00:00
parent de1b62791f
commit 121ace1cee
31 changed files with 990 additions and 396 deletions
@@ -3,6 +3,7 @@ import 'dart:async';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'run_detail_finders.dart';
import 'package:pipelines_app/features/runs/ui/run_graph_preview.dart';
import 'package:pipelines_app/core/api_gateway.dart';
import 'package:pipelines_app/features/graph/widgets/run_graph_view.dart';
@@ -136,8 +137,8 @@ void main() {
await pumpDeepLink(tester, platform, stage: 'plan', visit: 0);
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
expect(find.text('plan · visit 1'), findsOneWidget);
expect(find.text('plan · visit 5'), findsNothing);
expectVisitHeading(tester, 'plan', 1);
expect(find.text('Visit 5'), findsNothing);
// The visit is its own page over the Timeline tab.
expect(
find.byKey(
@@ -180,7 +181,7 @@ void main() {
await pumpDeepLink(tester, RunDetailTestPlatform.material, stage: 'plan');
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
expect(find.text('plan · visit 5'), findsOneWidget);
expectVisitHeading(tester, 'plan', 5);
});
testWidgets('a Graph click opens the same latest visit as the stage route', (
@@ -194,7 +195,7 @@ void main() {
// The web client's graph click takes the last visit in sequence order, not
// the last row in reply order, so both entry points agree.
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
expect(find.text('plan · visit 5'), findsOneWidget);
expectVisitHeading(tester, 'plan', 5);
});
testWidgets('an out-of-range visit is clamped to the stage last visit', (
@@ -208,7 +209,7 @@ void main() {
);
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
expect(find.text('plan · visit 5'), findsOneWidget);
expectVisitHeading(tester, 'plan', 5);
});
testWidgets('a declared but unvisited stage selects its graph node', (
@@ -258,7 +259,7 @@ void main() {
await tester.pumpAndSettle();
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
expect(find.text('plan · visit 5'), findsOneWidget);
expectVisitHeading(tester, 'plan', 5);
});
testWidgets('a route change applies its visit and a plain route closes it', (
@@ -296,11 +297,11 @@ void main() {
),
);
await tester.pumpAndSettle();
expect(find.text('plan · visit 1'), findsOneWidget);
expectVisitHeading(tester, 'plan', 1);
rebuild(() => visit = 1);
await tester.pumpAndSettle();
expect(find.text('plan · visit 5'), findsOneWidget);
expectVisitHeading(tester, 'plan', 5);
rebuild(() => stage = null);
await tester.pumpAndSettle();
@@ -1,6 +1,22 @@
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/features/runs/ui/run_detail_view.dart';
/// Wide screens deliberately repeat the selected title in the visible list.
Finder runDetailText(String text) =>
find.descendant(of: find.byType(RunDetailView), matching: find.text(text));
/// Stage identity and visit coordinates are separate rendered fields now.
void expectVisitHeading(WidgetTester tester, String stage, num sequence) {
final pane = find.byKey(const Key('run-visit-pane'));
expect(pane, findsOneWidget);
final title = find.descendant(
of: pane,
matching: find.byKey(const Key('run-visit-title')),
);
expect(tester.widget<Text>(title).data, stage);
expect(
find.descendant(of: pane, matching: find.text('Visit $sequence')),
findsOneWidget,
);
}
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'run_detail_finders.dart';
import 'package:pipelines_app/features/graph/widgets/graph_stage_node.dart';
import 'package:pipelines_app/features/graph/widgets/run_graph_canvas.dart';
import 'package:pipelines_app/features/graph/widgets/run_graph_view.dart';
@@ -65,7 +66,7 @@ void main() {
findsNothing,
);
expect(find.byKey(const Key('run-visit-title')), findsOneWidget);
expect(find.text('plan · visit 1'), findsOneWidget);
expectVisitHeading(tester, 'plan', 1);
expect(find.byKey(const Key('run-visit-facts-grid')), findsOneWidget);
expect(find.textContaining('audit · visit'), findsNothing);
});
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'run_detail_finders.dart';
import 'package:pipelines_app/features/artifacts/ui/artifact_gallery_page.dart';
import 'package:pipelines_app/features/graph/widgets/stage_definition_view.dart';
import 'package:pipelines_app/features/runs/ui/run_detail_visit_facts.dart';
@@ -182,7 +183,7 @@ void main() {
});
await openVisit(tester, platform, run: run, sequence: 2);
expect(find.text('plan · visit 2'), findsOneWidget);
expectVisitHeading(tester, 'plan', 2);
await openVisitTab(tester, RunVisitSection.artifacts);
expect(find.text('plan-2.csv'), findsOneWidget);
expect(find.text('public/shared.csv'), findsNothing);
@@ -1,6 +1,7 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'run_detail_finders.dart';
import 'package:pipelines_app/core/api_gateway.dart';
import 'package:pipelines_app/features/runs/data/runs_repository.dart';
import 'package:pipelines_app/features/runs/ui/run_detail_view.dart';
@@ -112,7 +113,7 @@ void main() {
);
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
expect(find.text('build · visit 2'), findsOneWidget);
expectVisitHeading(tester, 'build', 2);
});
}
@@ -66,7 +66,13 @@ void main() {
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
// The body keeps the landed viewer's own identity for that visit.
expect(find.text('plan'), findsOneWidget);
expect(
find.descendant(
of: find.byType(ChangesViewer),
matching: find.text('plan'),
),
findsOneWidget,
);
expect(find.text('Visit 1 · completed'), findsOneWidget);
expect(find.text('lib/plan.dart'), findsOneWidget);
expect(find.text('lib/build.dart'), findsNothing);