From 4ae2de444ea34bf69b73724a51f63d9ef1d37f15 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Tue, 10 Nov 2026 09:32:35 +0000 Subject: [PATCH] Show the terminal bar button on the Chat tab only Pipelines and Runs no longer carry it; the keyboard shortcut still toggles the terminal everywhere. --- app/lib/application/pipelines_app.dart | 7 ++++++- app/test/application/pipelines_app_test.dart | 11 +++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/app/lib/application/pipelines_app.dart b/app/lib/application/pipelines_app.dart index a61050a3..dc3c9ed8 100644 --- a/app/lib/application/pipelines_app.dart +++ b/app/lib/application/pipelines_app.dart @@ -747,7 +747,12 @@ class _PipelinesAppState extends State final runsRoute = tab(AppDestination.runs); final chatRoute = tab(AppDestination.chat); return AdaptiveShell( - barActions: [_terminals.toggle(cupertino: _cupertino)], + // The terminal button sits on the Chat tab only; the keyboard + // shortcut still toggles the terminal everywhere. + barActions: [ + if (_destinationOf(route.kind) == AppDestination.chat) + _terminals.toggle(cupertino: _cupertino), + ], attentionCount: attentionCount, cupertino: _cupertino, destination: _destinationOf(route.kind), diff --git a/app/test/application/pipelines_app_test.dart b/app/test/application/pipelines_app_test.dart index 2a50d42e..2a6f601d 100644 --- a/app/test/application/pipelines_app_test.dart +++ b/app/test/application/pipelines_app_test.dart @@ -239,9 +239,14 @@ void main() { final pipelinesRunsId = pipelineRequest(channel, 'list_runs')!['id'] as String; + // The terminal's bar button belongs to the Chat tab only. + const terminalButton = ValueKey('shell.terminal'); + expect(find.byKey(terminalButton), findsNothing); + await tester.tap(find.byKey(const ValueKey('shell.destination.runs'))); await tester.pump(); expect(provider.value.uri.path, '/runs'); + expect(find.byKey(terminalButton), findsNothing); final runsRequest = await waitForLaterRequest( tester, @@ -286,6 +291,12 @@ void main() { await tester.pump(); expect(findNativeBack(), findsNothing); expect(find.byKey(const ValueKey('run-detail-pane')), findsOneWidget); + + await tester.tap(find.byKey(const ValueKey('shell.destination.chat'))); + await tester.pump(); + await tester.pump(); + expect(provider.value.uri.path, startsWith('/chat')); + expect(find.byKey(terminalButton), findsOneWidget); }); testWidgets('a malformed boot path is corrected to /pipelines', (