web: notify failed and waiting runs from the browser Notification API (L5)

This commit is contained in:
2026-10-19 14:11:31 +01:00
parent 2fe63012f9
commit 878b1e0bf3
9 changed files with 1007 additions and 3 deletions
+18
View File
@@ -115,6 +115,24 @@ export class PipelinesRepository {
return response.run_detail;
}
/**
* Watches run state (L5), mirroring `PipelinesRepository.subscribeRuns` for the
* blank "any workspace" scope the runs list shows: exactly `{type:'subscribe',
* workspace:''}` and no `run_ids` (an empty list would watch the whole scope,
* but omitting the field is the shape the Android client sends). The server
* replies with the current state of every matching run as unsolicited
* `run_event` frames, then an id-matched ack, then deltas. Awaiting the ack is
* how the page knows the snapshot has been delivered.
*/
async subscribeRuns() {
return this.#client.call({ type: Protocol.SUBSCRIBE, workspace: "" });
}
/** Stops this connection's run-state watch. Best effort; a disconnect drops it. */
async unsubscribeRuns() {
return this.#client.call({ type: Protocol.UNSUBSCRIBE });
}
/**
* Omni-search. Sends exactly `SearchRequest{query, kind, limit}` from
* internal/protocol/search.go: `kind` is the empty string for every kind, and