Complete Material-only APIs and fixtures
Remove obsolete control-family flags and icon metadata across all callers, dead alternate themes and host helpers, obsolete test setup, and the unused icon-font dependency. Preserve native Material Back transitions. Make navigation fixtures independent of update plugins and answer auxiliary shell snapshots so the complete application suite can run deterministically.
This commit is contained in:
@@ -36,7 +36,7 @@ class ChatShellHistoryChip extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _open(BuildContext context, bool _) {
|
||||
Future<void> _open(BuildContext context) {
|
||||
// A dialog in the tiled app on a wide layout. A phone keeps the
|
||||
// full-screen page, and a floating window opens it as a page of that
|
||||
// window, so what it opens next (a diff, a command's output) stays in
|
||||
|
||||
@@ -98,7 +98,7 @@ class _ChatShellHistoryOutputPageState
|
||||
if (snapshot.hasError) {
|
||||
return Text(
|
||||
"Couldn't read the output: ${snapshot.error}",
|
||||
style: chatCardSecondaryStyle(context, false),
|
||||
style: chatCardSecondaryStyle(context),
|
||||
);
|
||||
}
|
||||
final full = snapshot.data;
|
||||
@@ -134,10 +134,7 @@ class _ChatShellHistoryOutputPageState
|
||||
children: [
|
||||
ChatShellStatus(run: full),
|
||||
if (full.directory.isNotEmpty)
|
||||
Text(
|
||||
full.directory,
|
||||
style: chatCardSecondaryStyle(context, false),
|
||||
),
|
||||
Text(full.directory, style: chatCardSecondaryStyle(context)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -146,7 +143,7 @@ class _ChatShellHistoryOutputPageState
|
||||
? Text(
|
||||
'No output.',
|
||||
key: const Key('chat-shell-output-empty'),
|
||||
style: chatCardSecondaryStyle(context, false),
|
||||
style: chatCardSecondaryStyle(context),
|
||||
)
|
||||
: ChatShellTerminalView(session: session, fill: true),
|
||||
),
|
||||
@@ -207,8 +204,7 @@ class _ChatShellHistoryOutputPageState
|
||||
error,
|
||||
style: chatCardSecondaryStyle(
|
||||
context,
|
||||
false,
|
||||
)?.copyWith(color: chatCardErrorColor(context, false)),
|
||||
)?.copyWith(color: chatCardErrorColor(context)),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -76,7 +76,7 @@ class _ChatShellHistoryViewState extends State<ChatShellHistoryView> {
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Text(
|
||||
'Every command here was restored to the transcript.',
|
||||
style: chatCardSecondaryStyle(context, false),
|
||||
style: chatCardSecondaryStyle(context),
|
||||
),
|
||||
),
|
||||
for (final run in runs) _entry(context, run),
|
||||
@@ -100,7 +100,7 @@ class _ChatShellHistoryViewState extends State<ChatShellHistoryView> {
|
||||
}
|
||||
|
||||
Widget _entry(BuildContext context, ChatShellRun run) {
|
||||
final secondary = chatCardSecondaryStyle(context, false);
|
||||
final secondary = chatCardSecondaryStyle(context);
|
||||
final refusal = _refusals[run.id];
|
||||
final command = run.purged || run.command.isEmpty
|
||||
? Text(chatShellCommandNotKept, style: secondary)
|
||||
@@ -125,9 +125,7 @@ class _ChatShellHistoryViewState extends State<ChatShellHistoryView> {
|
||||
Text(
|
||||
refusal,
|
||||
key: const Key('chat-shell-history-refusal'),
|
||||
style: secondary?.copyWith(
|
||||
color: chatCardErrorColor(context, false),
|
||||
),
|
||||
style: secondary?.copyWith(color: chatCardErrorColor(context)),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
@@ -11,8 +11,10 @@ class ChatShellModeIndicator extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final accent = Theme.of(context).colorScheme.primary;
|
||||
final label = (chatCardBodyStyle(context, false) ?? const TextStyle())
|
||||
.copyWith(color: accent, fontWeight: FontWeight.w600);
|
||||
final label = (chatCardBodyStyle(context) ?? const TextStyle()).copyWith(
|
||||
color: accent,
|
||||
fontWeight: FontWeight.w600,
|
||||
);
|
||||
return Semantics(
|
||||
key: const Key('chat-composer-shell-mode'),
|
||||
container: true,
|
||||
@@ -40,10 +42,7 @@ class ChatShellModeIndicator extends StatelessWidget {
|
||||
Text(chatShellModeLabel, style: label),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
chatShellModeHint,
|
||||
style: chatCardSecondaryStyle(context, false),
|
||||
),
|
||||
Text(chatShellModeHint, style: chatCardSecondaryStyle(context)),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -34,7 +34,7 @@ class ChatShellOutputView extends StatelessWidget {
|
||||
return Text(
|
||||
'No output.',
|
||||
key: const Key('chat-shell-output-empty'),
|
||||
style: chatCardSecondaryStyle(context, false),
|
||||
style: chatCardSecondaryStyle(context),
|
||||
);
|
||||
}
|
||||
final session = controller.terminals.session(run);
|
||||
|
||||
@@ -77,8 +77,10 @@ class _ChatShellRunCardState extends State<ChatShellRunCard> {
|
||||
Widget _body(BuildContext context, ChatShellRun run) {
|
||||
final controller = widget.controller;
|
||||
final error = controller.errorFor(run.id);
|
||||
final command = (chatCardBodyStyle(context, false) ?? const TextStyle())
|
||||
.copyWith(fontFamily: appMonospaceFamily, fontWeight: FontWeight.w600);
|
||||
final command = (chatCardBodyStyle(context) ?? const TextStyle()).copyWith(
|
||||
fontFamily: appMonospaceFamily,
|
||||
fontWeight: FontWeight.w600,
|
||||
);
|
||||
return Column(
|
||||
key: ValueKey<String>('chat-shell-run-${run.id}'),
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -91,7 +93,7 @@ class _ChatShellRunCardState extends State<ChatShellRunCard> {
|
||||
padding: const EdgeInsetsDirectional.only(end: 12),
|
||||
child: Icon(
|
||||
Icons.terminal,
|
||||
color: chatCardSecondaryColor(context, false),
|
||||
color: chatCardSecondaryColor(context),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
@@ -104,10 +106,7 @@ class _ChatShellRunCardState extends State<ChatShellRunCard> {
|
||||
style: command,
|
||||
),
|
||||
if (run.directory.isNotEmpty)
|
||||
Text(
|
||||
run.directory,
|
||||
style: chatCardSecondaryStyle(context, false),
|
||||
),
|
||||
Text(run.directory, style: chatCardSecondaryStyle(context)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -132,10 +131,7 @@ class _ChatShellRunCardState extends State<ChatShellRunCard> {
|
||||
if (run.error.isNotEmpty && !run.running)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
child: Text(
|
||||
run.error,
|
||||
style: chatCardSecondaryStyle(context, false),
|
||||
),
|
||||
child: Text(run.error, style: chatCardSecondaryStyle(context)),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
ChatShellCardActions(
|
||||
@@ -149,8 +145,9 @@ class _ChatShellRunCardState extends State<ChatShellRunCard> {
|
||||
child: Text(
|
||||
error,
|
||||
key: const Key('chat-shell-run-error'),
|
||||
style: (chatCardBodyStyle(context, false) ?? const TextStyle())
|
||||
.copyWith(color: chatCardErrorColor(context, false)),
|
||||
style: (chatCardBodyStyle(context) ?? const TextStyle()).copyWith(
|
||||
color: chatCardErrorColor(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -30,8 +30,8 @@ class ChatShellStatus extends StatelessWidget {
|
||||
: chatShellStatusLabel(run);
|
||||
final color = switch (run.state) {
|
||||
ChatShellRunState.succeeded => Theme.of(context).colorScheme.primary,
|
||||
ChatShellRunState.failed => chatCardErrorColor(context, false),
|
||||
_ => chatCardSecondaryColor(context, false),
|
||||
ChatShellRunState.failed => chatCardErrorColor(context),
|
||||
_ => chatCardSecondaryColor(context),
|
||||
};
|
||||
final icon = switch (run.state) {
|
||||
ChatShellRunState.succeeded => Icons.check_circle_outline,
|
||||
|
||||
@@ -12,7 +12,7 @@ import '../conversation/chat_card_styles.dart';
|
||||
/// darkened on a light surface so coloured output stays readable.
|
||||
TerminalTheme chatShellTerminalTheme(BuildContext context) {
|
||||
final dark = Theme.of(context).brightness == Brightness.dark;
|
||||
final background = chatCardFillColor(context, false);
|
||||
final background = chatCardFillColor(context);
|
||||
final foreground = Theme.of(context).colorScheme.onSurface;
|
||||
final accent = Theme.of(context).colorScheme.primary;
|
||||
final base = TerminalThemes.defaultTheme;
|
||||
@@ -55,7 +55,7 @@ TerminalTheme chatShellTerminalTheme(BuildContext context) {
|
||||
|
||||
/// The terminal's text: the host's monospace family at the card body size.
|
||||
TerminalStyle chatShellTerminalStyle(BuildContext context) {
|
||||
final body = chatCardBodyStyle(context, false) ?? const TextStyle();
|
||||
final body = chatCardBodyStyle(context) ?? const TextStyle();
|
||||
return TerminalStyle(
|
||||
fontFamily: appMonospaceFamily,
|
||||
fontSize: (body.fontSize ?? 14) * 0.95,
|
||||
|
||||
Reference in New Issue
Block a user