Always show the terminal shortcut on the phone Chat page

The shortcut no longer waits for a running shell: on the Chat page it opens
the terminal, starting one at its login prompt when none is open, and shows
a count when more than one shell runs.
This commit is contained in:
2026-11-10 02:25:36 +00:00
parent d52eb4ba82
commit 87519985bf
3 changed files with 16 additions and 13 deletions
@@ -297,15 +297,17 @@ void main() {
) async {
await pumpApp(tester, size: const Size(390, 800), onChat: false);
final bubble = find.byKey(const Key('terminal-shortcut-bubble'));
await tester.tap(find.byTooltip(TerminalToggleButton.label));
await tester.pumpAndSettle();
await tester.pageBack();
await tester.pumpAndSettle();
expect(hub.tabs, isNotEmpty);
expect(bubble, findsNothing, reason: 'not on Pipelines, Runs or Search');
await pumpApp(tester, size: const Size(390, 800));
await tester.pumpAndSettle();
// Shown on Chat even before any shell runs; tapping opens the terminal.
expect(hub.tabs, isEmpty);
expect(bubble, findsOneWidget, reason: 'shown on Chat');
expect(find.bySemanticsLabel('Open terminal'), findsOneWidget);
await tester.tap(bubble);
await tester.pumpAndSettle();
expect(find.widgetWithText(AppBar, 'Terminal'), findsOneWidget);
expect(bubble, findsNothing, reason: 'hidden while the page is open');
});
}