From 2aecd711994ccc7e2e1a050c80af9dfc9647bb10 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Mon, 23 Mar 2026 23:43:05 +0800 Subject: [PATCH] Restore ACP settings save/apply actions --- lib/features/settings/settings_page.dart | 4 +++- test/features/settings_page_suite.dart | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/features/settings/settings_page.dart b/lib/features/settings/settings_page.dart index c54b43ad..7494363b 100644 --- a/lib/features/settings/settings_page.dart +++ b/lib/features/settings/settings_page.dart @@ -171,7 +171,9 @@ class _SettingsPageState extends State { _navigationContext = controller.settingsNavigationContext; final settings = controller.settingsDraft; final showingDetail = _detail != null; - final showGlobalApplyBar = _tab != SettingsTab.gateway; + final showGlobalApplyBar = + _tab != SettingsTab.gateway || + _integrationSubTab == _GatewayIntegrationSubTab.acp; return SingleChildScrollView( padding: const EdgeInsets.fromLTRB(32, 32, 32, 8), child: Column( diff --git a/test/features/settings_page_suite.dart b/test/features/settings_page_suite.dart index c9060f97..8917b854 100644 --- a/test/features/settings_page_suite.dart +++ b/test/features/settings_page_suite.dart @@ -240,6 +240,14 @@ void main() { expect(find.text('Claude'), findsOneWidget); expect(find.text('Gemini'), findsOneWidget); expect(find.textContaining('ws://127.0.0.1:9001'), findsWidgets); + expect( + find.byKey(const ValueKey('settings-global-save-button')), + findsOneWidget, + ); + expect( + find.byKey(const ValueKey('settings-global-apply-button')), + findsOneWidget, + ); }); testWidgets('SettingsPage gateway sections can collapse individually', (