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:
@@ -1,6 +1,5 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.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),
|
||||
);
|
||||
|
||||
const _probeStyle = String.fromEnvironment(
|
||||
'CHAT_COMPOSER_PROBE_STYLE',
|
||||
defaultValue: 'material',
|
||||
);
|
||||
|
||||
/// Browser overrides: `?platform=cupertino|material`, `?theme=dark|light`,
|
||||
/// Browser overrides: `?theme=dark|light`,
|
||||
/// `?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
|
||||
/// the long-transcript performance fixture (see chat_perf_fixture.dart).
|
||||
@@ -222,8 +216,7 @@ int get _probeTasks => int.tryParse(_query['tasks'] ?? '') ?? 0;
|
||||
|
||||
void main() {
|
||||
final gateway = _ProbeGateway();
|
||||
final cupertino = (_query['platform'] ?? _probeStyle) == 'cupertino';
|
||||
final dark = _query['theme'] == null ? cupertino : _query['theme'] == 'dark';
|
||||
final dark = _query['theme'] == 'dark';
|
||||
final thread = ChatThreadView(
|
||||
gateway: gateway,
|
||||
sessionId: 'probe-composer',
|
||||
@@ -262,17 +255,6 @@ void main() {
|
||||
() => _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(
|
||||
MaterialApp(
|
||||
theme: ThemeData(
|
||||
@@ -290,7 +272,6 @@ void _press(String key) {
|
||||
void visit(Element element) {
|
||||
final widget = element.widget;
|
||||
if (widget.key == Key(key)) {
|
||||
if (widget is CupertinoButton) widget.onPressed?.call();
|
||||
if (widget is ButtonStyleButton) widget.onPressed?.call();
|
||||
if (widget is IconButton) widget.onPressed?.call();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user