feat: detached-runs monitor page (T3 parity)
Some checks failed
Security / Security check (push) Failing after 1s

New Runs sidebar destination listing detached invocations (detach:true)
with phase, current step, project and a Cancel button while
pending/running. Workspace-scoped like Audit/Approvals, polls every 2s.
Detached runs are opt-in (detached.enabled) — the empty state explains
how to enable them. Inline help doc DE+EN. DetachedRun model +
listDetachedRuns/cancelDetachedRun in HubService, backed by the SDK's
listInvocations()/cancelInvocation(). flutter analyze clean; 29 tests
green (sidebar Y-stability updated for the new destination, model
mapping unit-tested).

Screenshot verification (light+dark) deferred — shared desktop in use.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-07-12 14:43:37 +02:00
parent 984c91f91d
commit 54ccd3936a
13 changed files with 764 additions and 2 deletions

45
assets/docs/runs.md Normal file
View file

@ -0,0 +1,45 @@
# Runs
The Runs page monitors **detached invocations** — flows submitted
to run in the background rather than being waited on. Each row shows
the flow, its current phase, the step it is on, and the project it
was stamped with.
## What a detached run is
Most flows run *inline*: you start them and wait for the result. A
**detached** run is handed to the hub and returns an id immediately;
the flow keeps running in the background. You come back later to
read its result, follow it live, or cancel it.
Detached invocations are **opt-in**. They only work when the
operator enabled them in the hub config:
```yaml
detached:
enabled: true
```
Until then this page is empty — that is the normal state.
## Phases
- **Pending** — accepted, not yet executing.
- **Running** — a step is executing (the row names it).
- **Succeeded** — finished; the result is retained under the hub's
size/count/TTL limits.
- **Failed** — finished with an error (shown on the row).
- **Cancelled** — stopped by an operator.
## Cancelling
A pending or running detached run carries a **Cancel** button.
Cancelling signals the run to stop; a run that already finished
cannot be cancelled (Studio says so rather than pretending).
## Workspace scope
The page respects the active workspace: with a project selected it
shows only that project's detached runs. Detached results are held
in memory for the current hub process — they are not retained across
a hub restart.

48
assets/docs/runs_de.md Normal file
View file

@ -0,0 +1,48 @@
# Läufe
Die Läufe-Seite überwacht **abgekoppelte Aufrufe** — Flows, die im
Hintergrund laufen, statt auf ihr Ergebnis zu warten. Jede Zeile
zeigt den Flow, seine Phase, den aktuellen Schritt und das Projekt,
mit dem er gestempelt wurde.
## Was ein abgekoppelter Lauf ist
Die meisten Flows laufen *inline*: Man startet sie und wartet auf
das Ergebnis. Ein **abgekoppelter** Lauf wird dem Hub übergeben und
liefert sofort eine Kennung zurück; der Flow läuft im Hintergrund
weiter. Man kommt später zurück, um das Ergebnis zu lesen, dem Lauf
live zu folgen oder ihn abzubrechen.
Abgekoppelte Aufrufe sind **optional**. Sie funktionieren nur, wenn
der Betreiber sie in der Hub-Konfiguration aktiviert hat:
```yaml
detached:
enabled: true
```
Bis dahin ist diese Seite leer — das ist der Normalzustand.
## Phasen
- **Wartet** — angenommen, noch nicht in Ausführung.
- **Läuft** — ein Schritt wird ausgeführt (die Zeile nennt ihn).
- **Erfolgreich** — fertig; das Ergebnis wird unter den
Größen-/Anzahl-/TTL-Grenzen des Hubs aufbewahrt.
- **Fehlgeschlagen** — mit einem Fehler beendet (in der Zeile
angezeigt).
- **Abgebrochen** — von einem Betreiber gestoppt.
## Abbrechen
Ein wartender oder laufender abgekoppelter Lauf trägt einen
**Abbrechen**-Knopf. Der Abbruch signalisiert dem Lauf zu stoppen;
ein bereits beendeter Lauf lässt sich nicht abbrechen (Studio sagt
das ehrlich, statt es vorzutäuschen).
## Arbeitsbereich-Filter
Die Seite berücksichtigt den aktiven Arbeitsbereich: Mit gewähltem
Projekt zeigt sie nur dessen abgekoppelte Läufe. Abgekoppelte
Ergebnisse werden im Speicher des laufenden Hub-Prozesses gehalten —
sie überstehen keinen Hub-Neustart.