fix(studio): theme picker confirms applied + surfaces load failures
Some checks failed
Security / Security check (push) Failing after 2s
Some checks failed
Security / Security check (push) Failing after 2s
Two operator-visible fixes prompted by 'I picked a theme but
nothing changed':
- Theme picker tile taps now show a brief "Theme applied:
<name>" snackbar — the picker applies themes instantly, so
the operator needs a confirming cue. Slow `_pluginThemes`
loads no longer read as "click did nothing".
- `_pluginThemes` failures (plugin unreachable, manifest
drift, etc.) write to `FaiLog` so `fai admin doctor` and
Studio's inline log viewer can surface them. Previously
swallowed silently, which is what made debugging this so
miserable.
- Settings dialog's primary button relabelled to
"Connect to endpoint" (was "Save & connect") so operators
don't mistake it for "save my theme choice". The theme
selection persists at tile-tap time; the Settings dialog
has nothing left to "save".
- Theme section header gains an explicit "(applies instantly)"
cue for the same reason.
Also fixes a pre-existing curly-braces lint in the n8n add-
endpoint dialog. Studio bumped to 0.62.1, editor pinned via
path override at 0.15.1.
Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
8f5cd2528b
commit
805f1b4c1f
9 changed files with 91 additions and 17 deletions
|
|
@ -8,6 +8,7 @@ import 'dart:async';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'data/fai_log.dart';
|
||||
import 'data/hub.dart';
|
||||
import 'data/system_actions.dart';
|
||||
import 'data/theme_plugin.dart';
|
||||
|
|
@ -26,7 +27,7 @@ import 'widgets/widgets.dart';
|
|||
/// Studio's own build version. Bump on every UI commit so the
|
||||
/// running app self-identifies — visible in the sidebar header
|
||||
/// and quick-glance proof that you're seeing the current build.
|
||||
const String kStudioVersion = '0.62.0';
|
||||
const String kStudioVersion = '0.62.1';
|
||||
|
||||
Future<void> main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
|
@ -178,10 +179,18 @@ class StudioAppState extends State<StudioApp> {
|
|||
: themeDataFromScheme(schemes.light!),
|
||||
dark: schemes.dark == null ? null : themeDataFromScheme(schemes.dark!),
|
||||
);
|
||||
} catch (_) {
|
||||
// Plugin unreachable, hub down, etc. Fall back to
|
||||
// FaiTheme defaults silently — the Settings dialog is
|
||||
// where the operator surfaces / fixes the problem.
|
||||
} catch (e) {
|
||||
// Plugin unreachable, hub down, manifest schema drift —
|
||||
// any of these end up here. Log the failure so doctor +
|
||||
// the in-app log viewer can surface it; the picker's
|
||||
// own "applied" snackbar is replaced upstream by the
|
||||
// friendlier failure message via [themePluginFailed].
|
||||
// ignore: discarded_futures
|
||||
FaiLog.instance.error(
|
||||
'theme.plugin.load',
|
||||
e,
|
||||
context: 'capability=$capability',
|
||||
);
|
||||
return (light: null, dark: null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue