From 42f271679c10d44a355f231c05fdb8ea34e0f8c5 Mon Sep 17 00:00:00 2001 From: flemming-it Date: Sat, 11 Jul 2026 10:02:55 +0200 Subject: [PATCH] feat: per-row start button on runnable flows (0.21.2) Flows without missing modules get a play button in the list that opens them directly on the Run tab - one click from the list to entering inputs and starting a run. Rows with missing modules keep the install badge as their single actionable path. Signed-off-by: flemming-it --- CHANGELOG.md | 9 +++++++++ lib/src/flow_editor_page.dart | 37 +++++++++++++++++++++++++++++++++++ lib/src/l10n.dart | 2 ++ pubspec.yaml | 2 +- 4 files changed, 49 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cb335d..a68713d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ All notable changes to `chain_studio_flow_editor` recorded here. Studio bumps its `pubspec.yaml` git ref to a specific release of this package on every editor change. +## 0.21.2 — 2026-07-11 + +### Added + +- **Per-row start button.** Runnable flows (no missing modules) get a + play button in the flow list that opens them directly on the Run + tab — one click from the list to entering inputs and starting + (usertest quick win). + ## 0.21.1 — 2026-07-11 ### Fixed diff --git a/lib/src/flow_editor_page.dart b/lib/src/flow_editor_page.dart index fc29c3f..c3a316c 100644 --- a/lib/src/flow_editor_page.dart +++ b/lib/src/flow_editor_page.dart @@ -289,6 +289,17 @@ class _FlowEditorPageState extends State return files; } + /// Row-level start: open the flow and land directly on the Run + /// tab, where inputs + the start button live. One click from the + /// list to running a flow. + Future _startFile(_FlowFile f) async { + await _openFile(f); + if (!mounted) return; + if (_controller.analyzerErrorCount == 0) { + _tabs.animateTo(2); + } + } + Future _openByName(String name) async { final path = '${_defaultFlowsDir()}/$name.yaml'; final file = File(path); @@ -551,6 +562,7 @@ outputs: ), onOpen: _openFile, onRefresh: _refreshFiles, + onStart: _startFile, onInstallMissing: widget.onInstallCapability == null ? null : _installMissingCaps, @@ -1218,6 +1230,11 @@ class _FileList extends StatelessWidget { final void Function(_FlowFile) onOpen; final VoidCallback onRefresh; + /// Open the flow directly on the Run tab — the per-row start + /// affordance the usertest asked for. Rows with missing modules + /// don't offer it (they can't run yet). + final void Function(_FlowFile) onStart; + /// Install the listed missing capabilities. `null` when the /// host wired no install handler — the warning badge still /// renders, just without the one-click action. @@ -1230,6 +1247,7 @@ class _FileList extends StatelessWidget { required this.installedNames, required this.onOpen, required this.onRefresh, + required this.onStart, required this.onInstallMissing, }); @@ -1401,6 +1419,25 @@ class _FileList extends StatelessWidget { ], ), ), + // Per-row start: one click from the list to the + // Run tab. Hidden while modules are missing — + // the install badge is the actionable path then. + if (missing.isEmpty) + IconButton( + onPressed: () => onStart(f), + tooltip: strings.listStartTooltip, + icon: Icon( + Icons.play_arrow_rounded, + size: 20, + color: theme.colorScheme.primary, + ), + visualDensity: VisualDensity.compact, + padding: EdgeInsets.zero, + constraints: const BoxConstraints( + minWidth: 32, + minHeight: 32, + ), + ), ], ), ), diff --git a/lib/src/l10n.dart b/lib/src/l10n.dart index a31dcbf..f0cbf26 100644 --- a/lib/src/l10n.dart +++ b/lib/src/l10n.dart @@ -18,6 +18,8 @@ class FlowEditorStrings { String get run => _t('Run', 'Ausführen'); String get refresh => _t('Refresh file list', 'Datei-Liste neu laden'); String get listHeader => _t('FLOWS', 'FLOWS'); + String get listStartTooltip => + _t('Open on the Run tab', 'Im Starten-Tab öffnen'); String get copy => _t('Copy', 'Kopieren'); String get runOutput => _t('RUN OUTPUT', 'LAUF-ERGEBNIS'); /// Toolbar title while no flow is open — names the page, never diff --git a/pubspec.yaml b/pubspec.yaml index 02406b9..7f31b0d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: chain_studio_flow_editor description: Swappable inline YAML editor for F∆I Studio flows. -version: 0.21.1 +version: 0.21.2 publish_to: 'none' repository: https://git.flemming.ai/fai/studio-flow-editor