Merge branch 'main' into worktree-agent-a35ac03e196ffae50
# Conflicts: # app/lib/features/runs/ui/run_detail_content.dart # app/lib/features/runs/ui/run_list_row.dart # app/tool/search_selection_probe_entry.dart
This commit is contained in:
@@ -23,14 +23,18 @@ import 'package:pipelines_app/core/transport/pipelines_client.dart';
|
||||
import 'package:pipelines_app/features/search/ui/search_bar_controls.dart'
|
||||
show searchFieldKey;
|
||||
import 'package:pipelines_app/ui/input/app_search_field.dart';
|
||||
import 'package:pipelines_app/ui/theme/app_font.dart';
|
||||
import 'package:pipelines_app/ui/theme/app_font_controller.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:web_socket_channel/web_socket_channel.dart';
|
||||
|
||||
import 'fixture_host/fixture_host.dart';
|
||||
import 'perf/chat_search_fixture.dart';
|
||||
import 'perf/chat_question_fixture.dart';
|
||||
import 'perf/chat_scroll_fixture.dart';
|
||||
import 'perf/perf_fixture.dart';
|
||||
import 'probe_folder_fixture.dart';
|
||||
import 'probe_usage_fixture.dart';
|
||||
|
||||
/// The run every run-scoped hit names. Its recorded sequences are deliberately
|
||||
/// not its row indexes (plan 5, build 2, plan 1), exactly like the unit
|
||||
@@ -72,6 +76,13 @@ JsonMap probeRunDetail() => {
|
||||
'size_bytes': 12,
|
||||
'url': '/artifacts/7/2/release-report.txt',
|
||||
},
|
||||
if (_htmlArtifact)
|
||||
{
|
||||
'name': 'release-dashboard.html',
|
||||
'content_type': 'text/html',
|
||||
'size_bytes': 4096,
|
||||
'url': '/artifacts/7/2/release-dashboard.html',
|
||||
},
|
||||
],
|
||||
'file_changes': _probeChanges([
|
||||
'lib/release/train.dart',
|
||||
@@ -127,6 +138,10 @@ int _fillerStepCount = 0;
|
||||
/// capture shows its duration ticking. Absent by default.
|
||||
DateTime? _runningSince;
|
||||
|
||||
/// `?html=1` adds `release-dashboard.html` to run 7's build visit; the capture
|
||||
/// serves its bytes from the build directory (see notes/artifact-fullscreen.md).
|
||||
bool _htmlArtifact = false;
|
||||
|
||||
List<JsonMap> _fillerSteps() => [
|
||||
for (var i = 0; i < _fillerStepCount; i++)
|
||||
{
|
||||
@@ -431,12 +446,28 @@ JsonMap? probeReply(JsonMap request) {
|
||||
'time': '2026-10-20T09:00:00Z',
|
||||
};
|
||||
case 'list_runs':
|
||||
return {'id': id, 'type': 'runs', 'runs': probeRuns(), 'usage': null};
|
||||
return {
|
||||
'id': id,
|
||||
'type': 'runs',
|
||||
'runs': probeRuns().map(withProbeUsage).toList(),
|
||||
'usage': null,
|
||||
};
|
||||
case 'get_run':
|
||||
if (request['run_id'] != 7) {
|
||||
return error('Fixture run ${request['run_id']} is unavailable');
|
||||
}
|
||||
return {'id': id, 'type': 'run', 'run_detail': probeRunDetail()};
|
||||
final detail = withProbeUsage(probeRunDetail());
|
||||
return {
|
||||
'id': id,
|
||||
'type': 'run',
|
||||
'run_detail': {
|
||||
...detail,
|
||||
'steps': [
|
||||
for (final step in detail['steps'] as List)
|
||||
withProbeStepUsage(step as JsonMap),
|
||||
],
|
||||
},
|
||||
};
|
||||
case 'list_pipelines':
|
||||
return {'id': id, 'type': 'pipelines', 'pipelines': probePipelines()};
|
||||
case 'get_pipeline':
|
||||
@@ -544,9 +575,12 @@ class _FixtureChannel implements WebSocketChannel {
|
||||
final followUps = perfChatFollowUps(decoded);
|
||||
final subscribe = decoded['chat_subscribe'];
|
||||
if (subscribe is Map) {
|
||||
chatScrollStream('${subscribe['session_id'] ?? ''}', (frame) {
|
||||
void emit(JsonMap frame) {
|
||||
if (!_incoming.isClosed) _incoming.add(jsonEncode(frame));
|
||||
});
|
||||
}
|
||||
|
||||
chatScrollStream('${subscribe['session_id'] ?? ''}', emit);
|
||||
chatQuestionStream('${subscribe['session_id'] ?? ''}', emit);
|
||||
}
|
||||
if (reply == null && followUps.isEmpty) return;
|
||||
Future<void>.delayed(const Duration(milliseconds: 120), () {
|
||||
@@ -601,6 +635,7 @@ class _FixtureSink implements WebSocketSink {
|
||||
/// `?runs=200` / `?steps=60` append filler runs / run-7 steps for scroll
|
||||
/// performance captures;
|
||||
/// `?running=1` adds an executing run 8 whose duration ticks;
|
||||
/// `?html=1` adds an HTML artifact to run 7 (`release-dashboard.html`);
|
||||
/// `?q=release` types that query into Search once its field is shown;
|
||||
/// `?platform=cupertino` renders the Cupertino host (`material`, the
|
||||
/// default, renders Material as browsers do);
|
||||
@@ -622,6 +657,13 @@ void main() {
|
||||
return;
|
||||
}
|
||||
configurePerfFixture(params);
|
||||
// `?font=inter` chooses a font as Settings would; otherwise the stored one.
|
||||
final font = params['font'];
|
||||
unawaited(
|
||||
font == null
|
||||
? AppFontController.instance.restore()
|
||||
: AppFontController.instance.select(AppFont.fromId(font)),
|
||||
);
|
||||
_fillerRunCount = int.tryParse(params['runs'] ?? '') ?? 0;
|
||||
_fillerStepCount = int.tryParse(params['steps'] ?? '') ?? 0;
|
||||
if (params['running'] == '1') {
|
||||
@@ -629,6 +671,8 @@ void main() {
|
||||
const Duration(minutes: 3, seconds: 50),
|
||||
);
|
||||
}
|
||||
probeUsage = params['usage'] == '1';
|
||||
_htmlArtifact = params['html'] == '1';
|
||||
final cupertino = params['platform'] == 'cupertino';
|
||||
final route = params['route'];
|
||||
final opensRoute = route != null && route.startsWith('/');
|
||||
|
||||
Reference in New Issue
Block a user