fix(welcome): module check now looks at capabilities, not module names
Some checks failed
Security / Security check (push) Failing after 1s
Some checks failed
Security / Security check (push) Failing after 1s
The welcome checklist's "Install a text module" item used:
m.any((x) => x.name.startsWith('text.'))
But ModuleSummary.name is the module identifier (text-extract,
text-summarize, …), not the capability identifier (text.extract,
text.summarize, …). The check never matched even when several
text-* modules were installed — Stefan saw the item pending with
4 text capabilities live.
Fix: check capability names instead, which carry the dot-namespace:
m.any((x) => x.capabilities.any((c) => c.startsWith('text.')))
Semantically aligned with the onboarding intent ("any text.*
capability available").
Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
3dede6d7d8
commit
e9538b66b7
1 changed files with 8 additions and 1 deletions
|
|
@ -434,7 +434,14 @@ class _OnboardingChecklistState extends State<_OnboardingChecklist> {
|
|||
.catchError((_) => false);
|
||||
final module = hub
|
||||
.listModules()
|
||||
.then((m) => m.any((x) => x.name.startsWith('text.')))
|
||||
// ModuleSummary.name is the module identifier
|
||||
// (e.g. `text-extract`, with a hyphen). The Onboarding-
|
||||
// Hinweis fragt nach einem Text-Modul — das ist auf
|
||||
// Capability-Ebene das `text.*`-Präfix (mit Punkt).
|
||||
// Vorher haben wir den Modul-Namen geprüft und damit
|
||||
// nie gematcht, obwohl text-extract / text-summarize /
|
||||
// text-translate installiert waren.
|
||||
.then((m) => m.any((x) => x.capabilities.any((c) => c.startsWith('text.'))))
|
||||
.catchError((_) => false);
|
||||
final flow = hub
|
||||
.recentEvents(limit: 100)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue