fix(settings): reveal System-AI test result + refresh onboarding checklist
Some checks failed
Security / Security check (push) Failing after 1s

Two settings bugs the operator hit:

1. 'Test connection' appeared to do nothing. The result/error panel
   renders at the bottom of the System-AI editor's scrollable,
   600px-capped form, so on a tall dialog it lands below the fold —
   the footer button flickers 'Testing…' and nothing visible changes.
   The editor now holds a ScrollController and animates the content
   to reveal the outcome whenever a test result or error appears.

2. The welcome onboarding checklist kept 'connect System-AI'
   unchecked right after saving a working config. The checklist row
   opens the Settings dialog (an overlay, not a navigation), and on
   close the checklist never re-probed — so it showed the stale
   pre-config state. Both settings-opening rows (System-AI, MCP) now
   re-probe when the dialog closes; navigation-based rows already
   self-heal on return.

Studio suite green; flutter analyze clean.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-07-13 14:15:17 +02:00
parent 708bb74fa7
commit 4ceb5bb567
2 changed files with 36 additions and 2 deletions

View file

@ -641,6 +641,18 @@ class _OnboardingChecklistState extends State<_OnboardingChecklist> {
setState(() => _dismissed = true);
}
/// Open Settings (where System-AI + MCP are configured) and
/// re-probe when it closes. The Settings dialog overlays the
/// welcome page rather than navigating, so without this the
/// checklist kept showing the pre-config state (e.g. "connect
/// System-AI" stayed unchecked right after saving a working
/// config). Navigation-based rows self-heal on return; these
/// dialog-based ones did not.
Future<void> _openSettingsThenRefresh() async {
await ChainSettingsDialog.show(context);
if (mounted) await _refresh();
}
/// Localized plain-language label for the applied setup profile.
String _profileLabel(AppLocalizations l) => switch (_setupProfile) {
'enterprise' => l.setupProfileEnterprise,
@ -664,13 +676,13 @@ class _OnboardingChecklistState extends State<_OnboardingChecklist> {
_aiOk,
l.welcomeChecklistAi,
l.welcomeChecklistAiHint,
() => ChainSettingsDialog.show(context),
_openSettingsThenRefresh,
),
(
_mcpOk,
l.welcomeChecklistMcp,
l.welcomeChecklistMcpHint,
() => ChainSettingsDialog.show(context),
_openSettingsThenRefresh,
),
(
_moduleOk,