feat(app): page the run Changes surface one recorded visit at a time

The run-wide header, note, filter and matched-path counter still describe
every visit; below them Previous/Next move through the recorded visits in
run order without wrapping, and the shown visit keeps its own stage and
Visit N heading. A single recorded visit renders no pager.
This commit is contained in:
2026-10-22 15:56:30 +01:00
parent 6b021f1483
commit 9532ecddcf
7 changed files with 442 additions and 38 deletions
@@ -112,8 +112,19 @@ void main() {
find.text('1 file changed · +2 -2 · capture incomplete'),
findsOneWidget,
);
// Visit numbers are per stage, so both stages' first visits say Visit 1.
expect(find.text('Visit 1 · completed'), findsNWidgets(2));
// The page opens on the run's first recorded visit; its stage/visit
// heading identifies the evidence, and Next reaches the second visit.
expect(find.text('Visit 1 · completed'), findsOneWidget);
expect(find.text('implementer'), findsOneWidget);
expect(find.text('Next visit'), findsOneWidget);
await tester.tap(find.text('Next visit'));
await tester.pump();
expect(find.text('reviewer'), findsOneWidget);
expect(find.text('Visit 1 · completed'), findsOneWidget);
expect(find.text('lib/feature.dart'), findsNothing);
await tester.tap(find.text('Previous visit'));
await tester.pump();
expect(find.text('lib/feature.dart'), findsOneWidget);
await tester.tap(
find.byKey(const ValueKey('change-1-lib/feature.dart')),
@@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/core/api_gateway.dart';
import 'package:pipelines_app/features/changes/changes.dart';
import 'package:pipelines_app/features/runs/data/runs_repository.dart';
import 'package:pipelines_app/features/runs/ui/run_changes_action.dart';
import 'package:pipelines_app/features/runs/ui/run_detail_view.dart';
@@ -138,9 +139,15 @@ void main() {
find.textContaining('The summary counts each path once'),
findsNothing,
);
// The visit's own recorded capture stays reachable.
// The visit's own recorded capture stays reachable, one visit page at
// a time; the second visit's gap is reachable with Next.
expect(find.text('lib/feature.dart'), findsOneWidget);
expect(find.text('Visit 1 · completed'), findsNWidgets(2));
expect(find.text('implementer'), findsOneWidget);
expect(find.text('Visit 1 · completed'), findsOneWidget);
await tester.tap(find.text('Next visit'));
await tester.pump();
expect(find.text('reviewer'), findsOneWidget);
expect(find.text(missingCaptureDetail), findsOneWidget);
expect(tester.takeException(), isNull);
},
);