feat(app): open a run's decision prompt from its URL

A /runs/:id?action=decide route now opens the landed decision prompt once the named detail loads, and only when that detail genuinely awaits a person. A non-waiting run consumes the request without inventing a prompt, and dismissing the prompt leaves the loaded detail. The route flag is forwarded through the existing destination seam; submission, refusal wording and the bounded re-read are shared with the detail's Decide button.
This commit is contained in:
2026-10-22 11:52:22 +01:00
parent 81b2805cdd
commit 9344e6d3c0
5 changed files with 328 additions and 71 deletions
+1
View File
@@ -223,6 +223,7 @@ class _PipelinesAppState extends State<PipelinesApp> {
initialRunId: route.runId,
initialStageKey: route.stageKey,
initialVisit: route.visit,
initialDecide: route.decide,
listRefreshToken: _runsRefresh,
notifications: _notifications,
onRunSelected: (id) => _delegate.goTo(AppRoute.run(id)),
@@ -21,6 +21,7 @@ class RunsDestination extends StatelessWidget {
this.initialRunId,
this.initialStageKey,
this.initialVisit,
this.initialDecide = false,
this.onRunSelected,
this.onBack,
this.listRefreshToken = 0,
@@ -37,6 +38,10 @@ class RunsDestination extends StatelessWidget {
final String? initialStageKey;
final int? initialVisit;
/// The route's `?action=decide`. Forwarded as-is; the loaded screen decides
/// from the run's own detail whether a prompt exists.
final bool initialDecide;
final ValueChanged<int>? onRunSelected;
final VoidCallback? onBack;
@@ -84,6 +89,7 @@ class RunsDestination extends StatelessWidget {
initialRunId: initialRunId,
initialStageKey: initialStageKey,
initialVisit: initialVisit,
initialDecide: initialDecide,
syncToken: session.connectionEpoch,
listRefreshToken: listRefreshToken,
notifications: notifications,