fix(welcome,store): sticky flow-completed tick, carousel position text
Some checks are pending
Security / Security check (push) Waiting to run
Some checks are pending
Security / Security check (push) Waiting to run
- the 'start a saved flow' checklist tick no longer unticks once the flow.completed event scrolls out of the 100-event window — a local sticky marker keeps it honest to its wording - the Today carousel shows 'n/m' next to the 6-px dots so the position is readable without aiming at them Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
5578c32710
commit
b42003e600
2 changed files with 27 additions and 1 deletions
|
|
@ -570,6 +570,13 @@ class _TrustRow extends StatelessWidget {
|
|||
/// onboarding needed).
|
||||
const String _kChecklistDismissedKey = 'welcome.checklist.dismissed';
|
||||
|
||||
/// Sticky marker for "a flow has completed at least once". The live
|
||||
/// probe only sees the recent-events window (100), so a long-running
|
||||
/// hub would silently untick the step once the event scrolls out —
|
||||
/// the marker keeps the tick honest to its wording ("start a saved
|
||||
/// flow", ever), at the cost of being Studio-local.
|
||||
const String _kChecklistFlowDoneKey = 'welcome.checklist.flowCompleted';
|
||||
|
||||
/// Live getting-started checklist. Probes the running hub for
|
||||
/// four signals that the operator has the basic loop wired up
|
||||
/// (System AI configured, MCP source added, text module
|
||||
|
|
@ -650,13 +657,18 @@ class _OnboardingChecklistState extends State<_OnboardingChecklist> {
|
|||
.then((events) => events.any((e) => e.type == 'flow.completed'))
|
||||
.catchError((_) => false);
|
||||
final results = await Future.wait([ai, mcp, module, flow]);
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
final flowSeen = prefs.getBool(_kChecklistFlowDoneKey) ?? false;
|
||||
if (results[3] && !flowSeen) {
|
||||
await prefs.setBool(_kChecklistFlowDoneKey, true);
|
||||
}
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
_refreshing = false;
|
||||
_aiOk = results[0];
|
||||
_mcpOk = results[1];
|
||||
_moduleOk = results[2];
|
||||
_flowOk = results[3];
|
||||
_flowOk = results[3] || flowSeen;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue