From 900a6f0567bf014e3355a53df37e25941d4ae1e7 Mon Sep 17 00:00:00 2001 From: sladro Date: Mon, 6 Apr 2026 12:45:10 +0800 Subject: [PATCH] fix: align terminal more control sizing --- .../lib/features/terminal/terminal_page.dart | 6 +++--- apps/mobile_app/test/widget_test.dart | 20 +++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/apps/mobile_app/lib/features/terminal/terminal_page.dart b/apps/mobile_app/lib/features/terminal/terminal_page.dart index ade017e..3a921f1 100644 --- a/apps/mobile_app/lib/features/terminal/terminal_page.dart +++ b/apps/mobile_app/lib/features/terminal/terminal_page.dart @@ -1050,15 +1050,15 @@ class _TerminalPageState extends ConsumerState Widget _buildMoreControlsButton() { return _buildCommandDeckAction( - OutlinedButton.icon( + RepeatableTerminalKeyButton( key: const Key('terminal_more_controls_button'), onPressed: () { setState(() { _showExpandedControls = !_showExpandedControls; }); }, - icon: Icon(_showExpandedControls ? Icons.expand_less : Icons.expand_more), - label: Text(_showExpandedControls ? 'Less' : 'More'), + icon: _showExpandedControls ? Icons.expand_less : Icons.expand_more, + label: _showExpandedControls ? 'Less' : 'More', ), ); } diff --git a/apps/mobile_app/test/widget_test.dart b/apps/mobile_app/test/widget_test.dart index a93b37d..59ac4e4 100644 --- a/apps/mobile_app/test/widget_test.dart +++ b/apps/mobile_app/test/widget_test.dart @@ -375,6 +375,26 @@ void main() { }, ); + testWidgets('terminal more controls button matches arrow key size', ( + tester, + ) async { + await _pumpApp( + tester, + projectRepository: _FakeProjectRepository(), + sessionRepository: _FakeSessionRepository(), + ); + + await _openProjectTerminal(tester); + + final moreButtonSize = tester.getSize( + find.byKey(const Key('terminal_more_controls_button')), + ); + final upKeySize = tester.getSize(find.byKey(const Key('terminal_quick_key_up'))); + + expect(moreButtonSize.height, upKeySize.height); + expect(moreButtonSize.width, upKeySize.width); + }); + testWidgets('terminal more controls button toggles expanded quick terminal keys', (tester) async { final transportFactory = _QueuedTerminalSocketTransportFactory();