feat(app): a timeline visit shows its own changes as a Changes section

This commit is contained in:
2026-10-23 17:27:46 +01:00
parent 5e5b48a393
commit 7d9b3da936
3 changed files with 26 additions and 52 deletions
@@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
import '../../../core/api_gateway.dart';
import '../../../ui/adaptive/host.dart';
import 'run_changes_action.dart';
import 'run_detail_content.dart';
import 'run_detail_visit_facts.dart';
import 'run_detail_visit_sections.dart';
@@ -156,14 +155,7 @@ class _RunVisitPaneState extends State<RunVisitPane> {
spacing: 8,
runSpacing: 4,
crossAxisAlignment: WrapCrossAlignment.center,
children: [
close,
RunVisitChangesButton(
stage: widget.visit.stage,
sequence: widget.visit.sequence,
step: widget.step,
),
],
children: [close],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import '../../../core/api_gateway.dart';
import '../../../ui/adaptive/host.dart';
import '../../changes/changes.dart';
import 'run_detail_tab_bodies.dart';
import 'run_detail_tab_strip.dart';
import 'run_detail_visit_artifacts.dart';
@@ -11,12 +12,13 @@ import 'run_detail_visit_facts.dart';
import 'run_detail_visit_session.dart';
/// The visit pane's recorded sections, in the Android audit order the web
/// client follows: the turn's Input and Output, its Artifacts, its Session and
/// the authored Definition.
/// client follows: the turn's Input and Output, its Artifacts, the files this
/// visit changed, its Session and the authored Definition.
enum RunVisitSection {
input('Input'),
output('Output'),
artifacts('Artifacts'),
changes('Changes'),
session('Session'),
definition('Definition');
@@ -118,6 +120,20 @@ Widget runVisitSectionBody({
runSteps: runSteps,
configuredEndpoint: configuredEndpoint,
);
case RunVisitSection.changes:
// Only this visit's own capture; the run's final state is the run's
// Changes tab.
final viewer = ChangesViewer(
key: ValueKey('run-visit-changes-$visitIndex'),
steps: [step],
showSummary: false,
);
return cupertino
? Builder(
builder: (context) =>
Theme(data: hostTextTheme(context), child: viewer),
)
: viewer;
case RunVisitSection.session:
return RunVisitSession(
run: run,