Remove Cupertino branches from probe fixtures
Keep the chat and graph fixtures aligned with the app's Material-only UI by removing alternate Cupertino hosts, imports, and query-controlled rendering paths. Preserve the existing Material scenarios and document the focused probe coverage.
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
# Material chat and graph probes
|
||||||
|
|
||||||
|
- Removed Cupertino imports, host branches, and local style flags from the assigned chat and graph/stage-definition Dart probes.
|
||||||
|
- Preserved Material scaffolds, dark/light themes, text scaling, fixture data, callbacks, and browser interaction states.
|
||||||
|
- Focused watchdog tests: 39 passed across graph widgets and chat thread/composer coverage.
|
||||||
|
- `tool/analyze.sh`: clean, 0 errors, 0 warnings.
|
||||||
|
- Node syntax checks passed for the corresponding probe drivers. No browser capture was run; this cleanup does not alter intended Material rendering.
|
||||||
@@ -1,10 +1,7 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:pipelines_app/features/chat/ui/transcript/chat_turn_activity_view.dart';
|
import 'package:pipelines_app/features/chat/ui/transcript/chat_turn_activity_view.dart';
|
||||||
|
|
||||||
const _style = String.fromEnvironment('PROBE_STYLE', defaultValue: 'material');
|
|
||||||
|
|
||||||
/// Visual check for the streaming activity line: the pending dots beside
|
/// Visual check for the streaming activity line: the pending dots beside
|
||||||
/// "Responding Ns" at a few text sizes, in light and dark.
|
/// "Responding Ns" at a few text sizes, in light and dark.
|
||||||
void main() {
|
void main() {
|
||||||
@@ -23,14 +20,9 @@ void main() {
|
|||||||
);
|
);
|
||||||
final body = ListView(children: [line(1), line(1.5), line(2)]);
|
final body = ListView(children: [line(1), line(1.5), line(2)]);
|
||||||
runApp(
|
runApp(
|
||||||
_style == 'cupertino'
|
MaterialApp(
|
||||||
? CupertinoApp(
|
theme: ThemeData(brightness: Brightness.dark),
|
||||||
theme: const CupertinoThemeData(brightness: Brightness.dark),
|
home: Scaffold(body: SafeArea(child: body)),
|
||||||
home: CupertinoPageScaffold(child: SafeArea(child: body)),
|
),
|
||||||
)
|
|
||||||
: MaterialApp(
|
|
||||||
theme: ThemeData(brightness: Brightness.dark),
|
|
||||||
home: Scaffold(body: SafeArea(child: body)),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:pipelines_app/core/api_gateway.dart';
|
import 'package:pipelines_app/core/api_gateway.dart';
|
||||||
@@ -130,11 +129,6 @@ class _ApprovalsGateway implements ApiGateway {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const _style = String.fromEnvironment(
|
|
||||||
'CHAT_APPROVALS_PROBE_STYLE',
|
|
||||||
defaultValue: 'material',
|
|
||||||
);
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
final gateway = _ApprovalsGateway();
|
final gateway = _ApprovalsGateway();
|
||||||
final thread = ChatThreadView(
|
final thread = ChatThreadView(
|
||||||
@@ -143,15 +137,6 @@ void main() {
|
|||||||
title: 'Probe conversation',
|
title: 'Probe conversation',
|
||||||
onBack: () {},
|
onBack: () {},
|
||||||
);
|
);
|
||||||
if (_style == 'cupertino') {
|
|
||||||
runApp(
|
|
||||||
CupertinoApp(
|
|
||||||
theme: const CupertinoThemeData(brightness: Brightness.dark),
|
|
||||||
home: CupertinoPageScaffold(child: SafeArea(child: thread)),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
runApp(
|
runApp(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:pipelines_app/core/api_gateway.dart';
|
import 'package:pipelines_app/core/api_gateway.dart';
|
||||||
@@ -203,12 +202,7 @@ Widget _framed(Widget child) => _probeWidth == 0
|
|||||||
child: SizedBox(width: _probeWidth.toDouble(), child: child),
|
child: SizedBox(width: _probeWidth.toDouble(), child: child),
|
||||||
);
|
);
|
||||||
|
|
||||||
const _probeStyle = String.fromEnvironment(
|
/// Browser overrides: `?theme=dark|light`,
|
||||||
'CHAT_COMPOSER_PROBE_STYLE',
|
|
||||||
defaultValue: 'material',
|
|
||||||
);
|
|
||||||
|
|
||||||
/// Browser overrides: `?platform=cupertino|material`, `?theme=dark|light`,
|
|
||||||
/// `?long=1`, `?paras=1` (a chunked multi-paragraph reply), `?tasks=<n>`, `?mode=0` (no permission mode recorded) and
|
/// `?long=1`, `?paras=1` (a chunked multi-paragraph reply), `?tasks=<n>`, `?mode=0` (no permission mode recorded) and
|
||||||
/// `?model=0` (a backend without models). `?perf=<n>` and `?stream=<n>` are
|
/// `?model=0` (a backend without models). `?perf=<n>` and `?stream=<n>` are
|
||||||
/// the long-transcript performance fixture (see chat_perf_fixture.dart).
|
/// the long-transcript performance fixture (see chat_perf_fixture.dart).
|
||||||
@@ -222,8 +216,7 @@ int get _probeTasks => int.tryParse(_query['tasks'] ?? '') ?? 0;
|
|||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
final gateway = _ProbeGateway();
|
final gateway = _ProbeGateway();
|
||||||
final cupertino = (_query['platform'] ?? _probeStyle) == 'cupertino';
|
final dark = _query['theme'] == 'dark';
|
||||||
final dark = _query['theme'] == null ? cupertino : _query['theme'] == 'dark';
|
|
||||||
final thread = ChatThreadView(
|
final thread = ChatThreadView(
|
||||||
gateway: gateway,
|
gateway: gateway,
|
||||||
sessionId: 'probe-composer',
|
sessionId: 'probe-composer',
|
||||||
@@ -262,17 +255,6 @@ void main() {
|
|||||||
() => _press('chat-composer-primary'),
|
() => _press('chat-composer-primary'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (cupertino) {
|
|
||||||
runApp(
|
|
||||||
CupertinoApp(
|
|
||||||
theme: CupertinoThemeData(
|
|
||||||
brightness: dark ? Brightness.dark : Brightness.light,
|
|
||||||
),
|
|
||||||
home: CupertinoPageScaffold(child: _framed(SafeArea(child: thread))),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
runApp(
|
runApp(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
@@ -290,7 +272,6 @@ void _press(String key) {
|
|||||||
void visit(Element element) {
|
void visit(Element element) {
|
||||||
final widget = element.widget;
|
final widget = element.widget;
|
||||||
if (widget.key == Key(key)) {
|
if (widget.key == Key(key)) {
|
||||||
if (widget is CupertinoButton) widget.onPressed?.call();
|
|
||||||
if (widget is ButtonStyleButton) widget.onPressed?.call();
|
if (widget is ButtonStyleButton) widget.onPressed?.call();
|
||||||
if (widget is IconButton) widget.onPressed?.call();
|
if (widget is IconButton) widget.onPressed?.call();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:pipelines_app/features/chat/ui/transcript/chat_markdown_view.dart';
|
import 'package:pipelines_app/features/chat/ui/transcript/chat_markdown_view.dart';
|
||||||
|
|
||||||
const _style = String.fromEnvironment(
|
|
||||||
'CHAT_MARKDOWN_PROBE_STYLE',
|
|
||||||
defaultValue: 'material',
|
|
||||||
);
|
|
||||||
|
|
||||||
const _sample = '''
|
const _sample = '''
|
||||||
# Heading one
|
# Heading one
|
||||||
## Heading two
|
## Heading two
|
||||||
@@ -36,21 +30,12 @@ Bare https://example.com/auto link.
|
|||||||
<b>literal html</b> and ~~strikethrough~~ stay text.
|
<b>literal html</b> and ~~strikethrough~~ stay text.
|
||||||
''';
|
''';
|
||||||
|
|
||||||
/// One assistant markdown sample for the Material and Cupertino dark captures.
|
/// One assistant markdown sample for a Material dark capture.
|
||||||
void main() {
|
void main() {
|
||||||
final content = ListView(
|
final content = ListView(
|
||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.all(16),
|
||||||
children: const [ChatMarkdownView(text: _sample)],
|
children: const [ChatMarkdownView(text: _sample)],
|
||||||
);
|
);
|
||||||
if (_style == 'cupertino') {
|
|
||||||
runApp(
|
|
||||||
CupertinoApp(
|
|
||||||
theme: const CupertinoThemeData(brightness: Brightness.dark),
|
|
||||||
home: CupertinoPageScaffold(child: SafeArea(child: content)),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
runApp(
|
runApp(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:pipelines_app/core/api_gateway.dart';
|
import 'package:pipelines_app/core/api_gateway.dart';
|
||||||
@@ -10,7 +9,7 @@ import 'package:pipelines_app/features/chat/screen.dart';
|
|||||||
/// the real thread render one server-shaped conversation whose assistant text
|
/// the real thread render one server-shaped conversation whose assistant text
|
||||||
/// is formatted markdown and whose user text must stay byte-exact.
|
/// is formatted markdown and whose user text must stay byte-exact.
|
||||||
///
|
///
|
||||||
/// Material and Cupertino hosts are the same fixture built with
|
/// The Material host is the same fixture built with
|
||||||
/// `CHAT_MARKDOWN_WIRE_PROBE_STYLE`.
|
/// `CHAT_MARKDOWN_WIRE_PROBE_STYLE`.
|
||||||
class _FixtureGateway implements ApiGateway {
|
class _FixtureGateway implements ApiGateway {
|
||||||
final _frames = StreamController<JsonMap>.broadcast();
|
final _frames = StreamController<JsonMap>.broadcast();
|
||||||
@@ -86,28 +85,11 @@ const String _answer =
|
|||||||
'\n'
|
'\n'
|
||||||
'Literal <b>markup</b> and [unsafe](javascript:alert) stay visible.';
|
'Literal <b>markup</b> and [unsafe](javascript:alert) stay visible.';
|
||||||
|
|
||||||
const _style = String.fromEnvironment(
|
|
||||||
'CHAT_MARKDOWN_WIRE_PROBE_STYLE',
|
|
||||||
defaultValue: 'material',
|
|
||||||
);
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
final screen = ChatScreen(
|
final screen = ChatScreen(
|
||||||
gateway: _FixtureGateway(),
|
gateway: _FixtureGateway(),
|
||||||
onSessionSelected: null,
|
onSessionSelected: null,
|
||||||
);
|
);
|
||||||
if (_style == 'cupertino') {
|
|
||||||
runApp(
|
|
||||||
CupertinoApp(
|
|
||||||
theme: const CupertinoThemeData(brightness: Brightness.dark),
|
|
||||||
home: CupertinoPageScaffold(
|
|
||||||
navigationBar: const CupertinoNavigationBar(middle: Text('Chat')),
|
|
||||||
child: SafeArea(child: screen),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
runApp(
|
runApp(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
|
|||||||
@@ -1,16 +1,10 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:pipelines_app/features/chat/domain/chat_transcript.dart';
|
import 'package:pipelines_app/features/chat/domain/chat_transcript.dart';
|
||||||
import 'package:pipelines_app/features/chat/ui/transcript/chat_message_view.dart';
|
import 'package:pipelines_app/features/chat/ui/transcript/chat_message_view.dart';
|
||||||
|
|
||||||
const _style = String.fromEnvironment(
|
|
||||||
'CHAT_MESSAGE_PROBE_STYLE',
|
|
||||||
defaultValue: 'material',
|
|
||||||
);
|
|
||||||
|
|
||||||
/// Visible fixture for one user row, one folded assistant turn and one live
|
/// Visible fixture for one user row, one folded assistant turn and one live
|
||||||
/// turn whose newest reasoning step grows every half second. The unknown part
|
/// turn whose newest reasoning step grows every half second. The unknown part
|
||||||
/// and the tool body start collapsed so the browser probe has to open them.
|
/// and the tool body start collapsed so the browser probe has to open them.
|
||||||
@@ -61,15 +55,6 @@ void main() {
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
final content = _LiveTranscript(rows: rows);
|
final content = _LiveTranscript(rows: rows);
|
||||||
if (_style == 'cupertino') {
|
|
||||||
runApp(
|
|
||||||
CupertinoApp(
|
|
||||||
theme: const CupertinoThemeData(brightness: Brightness.dark),
|
|
||||||
home: CupertinoPageScaffold(child: SafeArea(child: content)),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
runApp(
|
runApp(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:pipelines_app/core/api_gateway.dart';
|
import 'package:pipelines_app/core/api_gateway.dart';
|
||||||
@@ -124,11 +123,6 @@ class _FixtureGateway implements ApiGateway {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const _probeStyle = String.fromEnvironment(
|
|
||||||
'CHAT_PROBE_STYLE',
|
|
||||||
defaultValue: 'material',
|
|
||||||
);
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
final dark = Uri.base.queryParameters['dark'] == '1';
|
final dark = Uri.base.queryParameters['dark'] == '1';
|
||||||
final unseen = Uri.base.queryParameters['unseen'] == '1';
|
final unseen = Uri.base.queryParameters['unseen'] == '1';
|
||||||
@@ -145,19 +139,6 @@ void main() {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
final home = ChatSessionsScreen(gateway: gateway, onOpen: (_) {});
|
final home = ChatSessionsScreen(gateway: gateway, onOpen: (_) {});
|
||||||
// `?platform=cupertino` overrides the compile-time style.
|
|
||||||
final style = Uri.base.queryParameters['platform'] ?? _probeStyle;
|
|
||||||
if (style == 'cupertino') {
|
|
||||||
runApp(
|
|
||||||
CupertinoApp(
|
|
||||||
theme: CupertinoThemeData(
|
|
||||||
brightness: dark ? Brightness.dark : Brightness.light,
|
|
||||||
),
|
|
||||||
home: home,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
runApp(
|
runApp(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:pipelines_app/core/api_gateway.dart';
|
import 'package:pipelines_app/core/api_gateway.dart';
|
||||||
@@ -218,28 +217,11 @@ class _FixtureGateway implements ApiGateway {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const _style = String.fromEnvironment(
|
|
||||||
'CHAT_WIRE_PROBE_STYLE',
|
|
||||||
defaultValue: 'material',
|
|
||||||
);
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
final screen = ChatScreen(
|
final screen = ChatScreen(
|
||||||
gateway: _FixtureGateway(),
|
gateway: _FixtureGateway(),
|
||||||
onSessionSelected: null,
|
onSessionSelected: null,
|
||||||
);
|
);
|
||||||
if (_style == 'cupertino') {
|
|
||||||
runApp(
|
|
||||||
CupertinoApp(
|
|
||||||
theme: const CupertinoThemeData(brightness: Brightness.dark),
|
|
||||||
home: CupertinoPageScaffold(
|
|
||||||
navigationBar: const CupertinoNavigationBar(middle: Text('Chat')),
|
|
||||||
child: SafeArea(child: screen),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
runApp(
|
runApp(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:pipelines_app/core/api_gateway.dart';
|
import 'package:pipelines_app/core/api_gateway.dart';
|
||||||
@@ -36,35 +35,22 @@ JsonMap _definition() => <String, dynamic>{
|
|||||||
|
|
||||||
/// Isolated browser fixture for `DefinitionGraphView` only.
|
/// Isolated browser fixture for `DefinitionGraphView` only.
|
||||||
///
|
///
|
||||||
/// Not wired into the app or shell. `style=cupertino` selects the native
|
/// Not wired into the app or shell. `scale=2` applies a real 2x text scale to the graph viewport,
|
||||||
/// Cupertino host, `scale=2` applies a real 2x text scale to the graph viewport,
|
|
||||||
/// and a click reports the exact stage key in the status line.
|
/// and a click reports the exact stage key in the status line.
|
||||||
void main() {
|
void main() {
|
||||||
final parameters = Uri.base.queryParameters;
|
final parameters = Uri.base.queryParameters;
|
||||||
final cupertino = parameters['style'] == 'cupertino';
|
|
||||||
final scale = double.tryParse(parameters['scale'] ?? '') ?? 1;
|
final scale = double.tryParse(parameters['scale'] ?? '') ?? 1;
|
||||||
runApp(_ProbeApp(cupertino: cupertino, scale: scale));
|
runApp(_ProbeApp(scale: scale));
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ProbeApp extends StatelessWidget {
|
class _ProbeApp extends StatelessWidget {
|
||||||
const _ProbeApp({required this.cupertino, required this.scale});
|
const _ProbeApp({required this.scale});
|
||||||
|
|
||||||
final bool cupertino;
|
|
||||||
final double scale;
|
final double scale;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final page = _ProbePage(scale: scale);
|
final page = _ProbePage(scale: scale);
|
||||||
if (cupertino) {
|
|
||||||
return CupertinoApp(
|
|
||||||
home: CupertinoPageScaffold(
|
|
||||||
navigationBar: const CupertinoNavigationBar(
|
|
||||||
middle: Text('Definition graph'),
|
|
||||||
),
|
|
||||||
child: SafeArea(child: page),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
theme: ThemeData(platform: TargetPlatform.android),
|
theme: ThemeData(platform: TargetPlatform.android),
|
||||||
darkTheme: ThemeData(
|
darkTheme: ThemeData(
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:pipelines_app/features/graph/domain/graph_definition.dart';
|
import 'package:pipelines_app/features/graph/domain/graph_definition.dart';
|
||||||
@@ -22,9 +21,7 @@ const _nodes = [
|
|||||||
/// A fixture-only page: one measured node per definition identity, with the
|
/// A fixture-only page: one measured node per definition identity, with the
|
||||||
/// selected key reported so a browser click can prove the exact callback.
|
/// selected key reported so a browser click can prove the exact callback.
|
||||||
class _Probe extends StatefulWidget {
|
class _Probe extends StatefulWidget {
|
||||||
const _Probe({required this.cupertino});
|
const _Probe();
|
||||||
|
|
||||||
final bool cupertino;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<_Probe> createState() => _ProbeState();
|
State<_Probe> createState() => _ProbeState();
|
||||||
@@ -64,27 +61,22 @@ class _ProbeState extends State<_Probe> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
return widget.cupertino
|
return Scaffold(body: SafeArea(child: page));
|
||||||
? CupertinoPageScaffold(child: SafeArea(child: page))
|
|
||||||
: Scaffold(body: SafeArea(child: page));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
final cupertino = Uri.base.queryParameters['style'] == 'cupertino';
|
|
||||||
runApp(
|
runApp(
|
||||||
cupertino
|
MaterialApp(
|
||||||
? CupertinoApp(home: const _Probe(cupertino: true))
|
theme: ThemeData(platform: TargetPlatform.android),
|
||||||
: MaterialApp(
|
// Stock dark theme so the forced `prefers-color-scheme` capture is
|
||||||
theme: ThemeData(platform: TargetPlatform.android),
|
// a real dark render rather than a duplicate light one.
|
||||||
// Stock dark theme so the forced `prefers-color-scheme` capture is
|
darkTheme: ThemeData(
|
||||||
// a real dark render rather than a duplicate light one.
|
platform: TargetPlatform.android,
|
||||||
darkTheme: ThemeData(
|
brightness: Brightness.dark,
|
||||||
platform: TargetPlatform.android,
|
),
|
||||||
brightness: Brightness.dark,
|
themeMode: ThemeMode.system,
|
||||||
),
|
home: const _Probe(),
|
||||||
themeMode: ThemeMode.system,
|
),
|
||||||
home: const _Probe(cupertino: false),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
// PROBE_VARIANT=material OPENCODE_ARTIFACT_DIR=DIR node tool/graph_zoom_probe.mjs
|
// PROBE_VARIANT=material OPENCODE_ARTIFACT_DIR=DIR node tool/graph_zoom_probe.mjs
|
||||||
//
|
//
|
||||||
// Server-shaped fixtures only; no server, run or operator session is touched.
|
// Server-shaped fixtures only; no server, run or operator session is touched.
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:pipelines_app/core/api_gateway.dart';
|
import 'package:pipelines_app/core/api_gateway.dart';
|
||||||
@@ -72,37 +71,20 @@ void main() {
|
|||||||
runApp(
|
runApp(
|
||||||
_ProbeApp(
|
_ProbeApp(
|
||||||
runMode: parameters['view'] == 'run',
|
runMode: parameters['view'] == 'run',
|
||||||
cupertino: parameters['style'] == 'cupertino',
|
|
||||||
scale: double.tryParse(parameters['scale'] ?? '') ?? 1,
|
scale: double.tryParse(parameters['scale'] ?? '') ?? 1,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ProbeApp extends StatelessWidget {
|
class _ProbeApp extends StatelessWidget {
|
||||||
const _ProbeApp({
|
const _ProbeApp({required this.runMode, required this.scale});
|
||||||
required this.runMode,
|
|
||||||
required this.cupertino,
|
|
||||||
required this.scale,
|
|
||||||
});
|
|
||||||
|
|
||||||
final bool runMode;
|
final bool runMode;
|
||||||
final bool cupertino;
|
|
||||||
final double scale;
|
final double scale;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final page = _ProbePage(runMode: runMode, scale: scale);
|
final page = _ProbePage(runMode: runMode, scale: scale);
|
||||||
if (cupertino) {
|
|
||||||
return CupertinoApp(
|
|
||||||
theme: const CupertinoThemeData(brightness: Brightness.dark),
|
|
||||||
home: CupertinoPageScaffold(
|
|
||||||
navigationBar: const CupertinoNavigationBar(
|
|
||||||
middle: Text('Graph viewport'),
|
|
||||||
),
|
|
||||||
child: SafeArea(child: page),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
theme: ThemeData(platform: TargetPlatform.android),
|
theme: ThemeData(platform: TargetPlatform.android),
|
||||||
darkTheme: ThemeData(
|
darkTheme: ThemeData(
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:pipelines_app/features/pipelines/screen.dart';
|
import 'package:pipelines_app/features/pipelines/screen.dart';
|
||||||
@@ -7,15 +6,13 @@ import 'pipelines_probe_fixture.dart';
|
|||||||
|
|
||||||
/// Browser fixture for the pipeline detail's real Graph tab.
|
/// Browser fixture for the pipeline detail's real Graph tab.
|
||||||
///
|
///
|
||||||
/// `style=cupertino` selects the Cupertino host, `dark=1` its dark theme and
|
/// `dark=1` selects the dark theme and `scale=2` a real 2x text scale. The screen, its list, detail, Graph tab and
|
||||||
/// `scale=2` a real 2x text scale. The screen, its list, detail, Graph tab and
|
|
||||||
/// definition pane are the same widgets the app registers; only the replies
|
/// definition pane are the same widgets the app registers; only the replies
|
||||||
/// come from the in-memory fixture.
|
/// come from the in-memory fixture.
|
||||||
void main() {
|
void main() {
|
||||||
final parameters = Uri.base.queryParameters;
|
final parameters = Uri.base.queryParameters;
|
||||||
runApp(
|
runApp(
|
||||||
_PipelineGraphTabProbe(
|
_PipelineGraphTabProbe(
|
||||||
cupertino: parameters['style'] == 'cupertino',
|
|
||||||
dark: parameters['dark'] == '1',
|
dark: parameters['dark'] == '1',
|
||||||
scale: double.tryParse(parameters['scale'] ?? '') ?? 1,
|
scale: double.tryParse(parameters['scale'] ?? '') ?? 1,
|
||||||
),
|
),
|
||||||
@@ -23,13 +20,8 @@ void main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _PipelineGraphTabProbe extends StatelessWidget {
|
class _PipelineGraphTabProbe extends StatelessWidget {
|
||||||
const _PipelineGraphTabProbe({
|
const _PipelineGraphTabProbe({required this.dark, required this.scale});
|
||||||
required this.cupertino,
|
|
||||||
required this.dark,
|
|
||||||
required this.scale,
|
|
||||||
});
|
|
||||||
|
|
||||||
final bool cupertino;
|
|
||||||
final bool dark;
|
final bool dark;
|
||||||
final double scale;
|
final double scale;
|
||||||
|
|
||||||
@@ -45,20 +37,6 @@ class _PipelineGraphTabProbe extends StatelessWidget {
|
|||||||
gateway: PipelinesProbeGateway(),
|
gateway: PipelinesProbeGateway(),
|
||||||
embedded: true,
|
embedded: true,
|
||||||
);
|
);
|
||||||
if (cupertino) {
|
|
||||||
return CupertinoApp(
|
|
||||||
title: 'Pipeline graph fixture',
|
|
||||||
debugShowCheckedModeBanner: false,
|
|
||||||
theme: CupertinoThemeData(
|
|
||||||
brightness: dark ? Brightness.dark : Brightness.light,
|
|
||||||
),
|
|
||||||
builder: scaled,
|
|
||||||
// The application shell owns the navigation bar; the probe keeps the
|
|
||||||
// same embedded screen inside a host-native page instead of adding a
|
|
||||||
// second bar that would overlay the detail header.
|
|
||||||
home: CupertinoPageScaffold(child: SafeArea(child: screen)),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
title: 'Pipeline graph fixture',
|
title: 'Pipeline graph fixture',
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
// Server-shaped fixtures only: a fake gateway answers the same get_run envelope
|
// Server-shaped fixtures only: a fake gateway answers the same get_run envelope
|
||||||
// the app consumes. The run's own pinned graph and recorded steps drive the
|
// the app consumes. The run's own pinned graph and recorded steps drive the
|
||||||
// Graph tab; no server or operator run is touched.
|
// Graph tab; no server or operator run is touched.
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:pipelines_app/core/api_gateway.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/data/runs_repository.dart';
|
||||||
@@ -83,22 +82,18 @@ JsonMap _run({required bool graph}) => <String, dynamic>{
|
|||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
final params = Uri.base.queryParameters;
|
final params = Uri.base.queryParameters;
|
||||||
final cupertino = params['platform'] == 'cupertino';
|
|
||||||
final dark = params['theme'] == 'dark';
|
final dark = params['theme'] == 'dark';
|
||||||
final scale = double.tryParse(params['scale'] ?? '') ?? 1;
|
final scale = double.tryParse(params['scale'] ?? '') ?? 1;
|
||||||
final run = _run(graph: params['case'] != 'missing');
|
final run = _run(graph: params['case'] != 'missing');
|
||||||
runApp(_ProbeBody(cupertino: cupertino, dark: dark, scale: scale, run: run));
|
runApp(_ProbeBody(dark: dark, scale: scale, run: run));
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ProbeBody extends StatefulWidget {
|
class _ProbeBody extends StatefulWidget {
|
||||||
const _ProbeBody({
|
const _ProbeBody({
|
||||||
required this.cupertino,
|
|
||||||
required this.dark,
|
required this.dark,
|
||||||
required this.scale,
|
required this.scale,
|
||||||
required this.run,
|
required this.run,
|
||||||
});
|
});
|
||||||
|
|
||||||
final bool cupertino;
|
|
||||||
final bool dark;
|
final bool dark;
|
||||||
final double scale;
|
final double scale;
|
||||||
final JsonMap run;
|
final JsonMap run;
|
||||||
@@ -139,14 +134,6 @@ class _ProbeBodyState extends State<_ProbeBody> {
|
|||||||
).copyWith(textScaler: TextScaler.linear(widget.scale)),
|
).copyWith(textScaler: TextScaler.linear(widget.scale)),
|
||||||
child: app!,
|
child: app!,
|
||||||
);
|
);
|
||||||
if (widget.cupertino) {
|
|
||||||
return CupertinoApp(
|
|
||||||
title: 'Run graph fixture',
|
|
||||||
theme: CupertinoThemeData(brightness: theme),
|
|
||||||
builder: scaled,
|
|
||||||
home: CupertinoPageScaffold(child: SafeArea(child: detail)),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
title: 'Run graph fixture',
|
title: 'Run graph fixture',
|
||||||
theme: ThemeData(brightness: theme, platform: TargetPlatform.android),
|
theme: ThemeData(brightness: theme, platform: TargetPlatform.android),
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:pipelines_app/core/api_gateway.dart';
|
import 'package:pipelines_app/core/api_gateway.dart';
|
||||||
@@ -86,15 +85,14 @@ JsonMap _finishedRun() => <String, dynamic>{
|
|||||||
|
|
||||||
/// Isolated browser fixture for `RunGraphView` only.
|
/// Isolated browser fixture for `RunGraphView` only.
|
||||||
///
|
///
|
||||||
/// `style=cupertino` selects the Cupertino host, `dark=1` its dark theme and
|
/// `dark=1` selects the dark theme and `scale=2` a real 2x text scale.
|
||||||
/// `scale=2` a real 2x text scale. `case=finished` records a resolved success
|
/// `case=finished` records a resolved success
|
||||||
/// terminal instead of the running path; `case=missing` omits the graph. A
|
/// terminal instead of the running path; `case=missing` omits the graph. A
|
||||||
/// click reports the exact visited stage key; unvisited nodes report nothing.
|
/// click reports the exact visited stage key; unvisited nodes report nothing.
|
||||||
void main() {
|
void main() {
|
||||||
final parameters = Uri.base.queryParameters;
|
final parameters = Uri.base.queryParameters;
|
||||||
runApp(
|
runApp(
|
||||||
_ProbeApp(
|
_ProbeApp(
|
||||||
cupertino: parameters['style'] == 'cupertino',
|
|
||||||
dark: parameters['dark'] == '1',
|
dark: parameters['dark'] == '1',
|
||||||
scale: double.tryParse(parameters['scale'] ?? '') ?? 1,
|
scale: double.tryParse(parameters['scale'] ?? '') ?? 1,
|
||||||
fixture: parameters['case'] ?? 'running',
|
fixture: parameters['case'] ?? 'running',
|
||||||
@@ -104,13 +102,10 @@ void main() {
|
|||||||
|
|
||||||
class _ProbeApp extends StatelessWidget {
|
class _ProbeApp extends StatelessWidget {
|
||||||
const _ProbeApp({
|
const _ProbeApp({
|
||||||
required this.cupertino,
|
|
||||||
required this.dark,
|
required this.dark,
|
||||||
required this.scale,
|
required this.scale,
|
||||||
required this.fixture,
|
required this.fixture,
|
||||||
});
|
});
|
||||||
|
|
||||||
final bool cupertino;
|
|
||||||
final bool dark;
|
final bool dark;
|
||||||
final double scale;
|
final double scale;
|
||||||
final String fixture;
|
final String fixture;
|
||||||
@@ -122,19 +117,6 @@ class _ProbeApp extends StatelessWidget {
|
|||||||
graph: fixture == 'missing' ? null : _graph(),
|
graph: fixture == 'missing' ? null : _graph(),
|
||||||
run: fixture == 'finished' ? _finishedRun() : _runningRun(),
|
run: fixture == 'finished' ? _finishedRun() : _runningRun(),
|
||||||
);
|
);
|
||||||
if (cupertino) {
|
|
||||||
return CupertinoApp(
|
|
||||||
theme: CupertinoThemeData(
|
|
||||||
brightness: dark ? Brightness.dark : Brightness.light,
|
|
||||||
),
|
|
||||||
home: CupertinoPageScaffold(
|
|
||||||
navigationBar: const CupertinoNavigationBar(
|
|
||||||
middle: Text('Run graph'),
|
|
||||||
),
|
|
||||||
child: SafeArea(child: page),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
platform: TargetPlatform.android,
|
platform: TargetPlatform.android,
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:pipelines_app/core/api_gateway.dart';
|
import 'package:pipelines_app/core/api_gateway.dart';
|
||||||
import 'package:pipelines_app/features/graph/widgets/stage_definition_view.dart';
|
import 'package:pipelines_app/features/graph/widgets/stage_definition_view.dart';
|
||||||
import 'package:pipelines_app/ui/adaptive/host.dart';
|
|
||||||
|
|
||||||
/// A definition with an authored stage (including an unknown future field), a
|
/// A definition with an authored stage (including an unknown future field), a
|
||||||
/// declared route to a terminal, and no declaration for `ghost`.
|
/// declared route to a terminal, and no declaration for `ghost`.
|
||||||
@@ -44,14 +42,13 @@ JsonMap _graph() => <String, dynamic>{
|
|||||||
|
|
||||||
/// Isolated browser fixture for the read-only stage definition pane.
|
/// Isolated browser fixture for the read-only stage definition pane.
|
||||||
///
|
///
|
||||||
/// `style=cupertino` selects the Cupertino host, `dark=1` its dark theme,
|
/// `dark=1` selects the dark theme and `scale=2` a real 2x text scale.
|
||||||
/// `scale=2` a real 2x text scale. Every button opens the exact helper the
|
/// Every button opens the exact helper the
|
||||||
/// pipeline graph hook will call; nothing contacts a server or reads a run.
|
/// pipeline graph hook will call; nothing contacts a server or reads a run.
|
||||||
void main() {
|
void main() {
|
||||||
final parameters = Uri.base.queryParameters;
|
final parameters = Uri.base.queryParameters;
|
||||||
runApp(
|
runApp(
|
||||||
_ProbeApp(
|
_ProbeApp(
|
||||||
cupertino: parameters['style'] == 'cupertino',
|
|
||||||
dark: parameters['dark'] == '1',
|
dark: parameters['dark'] == '1',
|
||||||
scale: double.tryParse(parameters['scale'] ?? '') ?? 1,
|
scale: double.tryParse(parameters['scale'] ?? '') ?? 1,
|
||||||
),
|
),
|
||||||
@@ -59,13 +56,8 @@ void main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _ProbeApp extends StatelessWidget {
|
class _ProbeApp extends StatelessWidget {
|
||||||
const _ProbeApp({
|
const _ProbeApp({required this.dark, required this.scale});
|
||||||
required this.cupertino,
|
|
||||||
required this.dark,
|
|
||||||
required this.scale,
|
|
||||||
});
|
|
||||||
|
|
||||||
final bool cupertino;
|
|
||||||
final bool dark;
|
final bool dark;
|
||||||
final double scale;
|
final double scale;
|
||||||
|
|
||||||
@@ -77,20 +69,6 @@ class _ProbeApp extends StatelessWidget {
|
|||||||
).copyWith(textScaler: TextScaler.linear(scale)),
|
).copyWith(textScaler: TextScaler.linear(scale)),
|
||||||
child: child ?? const SizedBox.shrink(),
|
child: child ?? const SizedBox.shrink(),
|
||||||
);
|
);
|
||||||
if (cupertino) {
|
|
||||||
return CupertinoApp(
|
|
||||||
theme: CupertinoThemeData(
|
|
||||||
brightness: dark ? Brightness.dark : Brightness.light,
|
|
||||||
),
|
|
||||||
builder: scaled,
|
|
||||||
home: const CupertinoPageScaffold(
|
|
||||||
navigationBar: CupertinoNavigationBar(
|
|
||||||
middle: Text('Stage definition fixture'),
|
|
||||||
),
|
|
||||||
child: SafeArea(child: _Launcher()),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
platform: TargetPlatform.android,
|
platform: TargetPlatform.android,
|
||||||
@@ -124,7 +102,6 @@ class _Launcher extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final cupertino = usesCupertinoHost(context);
|
|
||||||
return ListView(
|
return ListView(
|
||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.all(16),
|
||||||
children: [
|
children: [
|
||||||
@@ -132,15 +109,10 @@ class _Launcher extends StatelessWidget {
|
|||||||
for (final key in <String>['plan', '#failure', 'ghost'])
|
for (final key in <String>['plan', '#failure', 'ghost'])
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(top: 8),
|
padding: const EdgeInsets.only(top: 8),
|
||||||
child: cupertino
|
child: FilledButton(
|
||||||
? CupertinoButton.filled(
|
onPressed: () => _open(context, key),
|
||||||
onPressed: () => _open(context, key),
|
child: Text('$key definition'),
|
||||||
child: Text('$key definition'),
|
),
|
||||||
)
|
|
||||||
: FilledButton(
|
|
||||||
onPressed: () => _open(context, key),
|
|
||||||
child: Text('$key definition'),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user