From c11c90348ed2cfbddf0e8b00e0392ee9bdf1af71 Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 22 Nov 2026 11:26:08 +0100 Subject: [PATCH] H-A-467 view: a pipelines page in the web view and the terminal view The operator follows the pipelines in the delivery view: the newest pipelines of a branch (main by default, the newest 20) with their steps counted per outcome, one pipeline's mover rows and one mover's steps, read through the seat mesh-pipeline-runner's list and show and read again on the runner's events pipeline-started, step-ended, pipeline-ended and re-pinned, heard on the module's one pull; the web pages reload on a stream of those changes and the terminal view's -follow prints again, never on a timer. Each delivered source revision links to the newest pipeline of its source. The view keeps no state of its own for it. Issue 1983. Builds: design 47 H2 H-A-467 (1), (2), (3), H-A-376 --- .../cmd/mesh-delivery-cli/main.go | 66 ++++- .../cmd/mesh-delivery-cli/main_test.go | 50 ++++ .../mesh-delivery-view/integration_test.go | 74 +++++ .../cmd/mesh-delivery-view/main.go | 8 + .../cmd/mesh-delivery-view/waits.go | 19 ++ modules/mesh-delivery-view/go.mod | 2 + .../internal/view/pipelines.go | 275 +++++++++++++++++ .../internal/view/pipelines_test.go | 216 ++++++++++++++ .../internal/view/pipelinespage.go | 277 ++++++++++++++++++ .../mesh-delivery-view/internal/view/serve.go | 146 ++++++++- .../mesh-delivery-view/internal/view/view.go | 25 +- modules/mesh-delivery-view/manifest_test.go | 6 +- modules/mesh-delivery-view/module.json | 10 +- 13 files changed, 1162 insertions(+), 12 deletions(-) create mode 100644 modules/mesh-delivery-view/internal/view/pipelines.go create mode 100644 modules/mesh-delivery-view/internal/view/pipelines_test.go create mode 100644 modules/mesh-delivery-view/internal/view/pipelinespage.go diff --git a/modules/mesh-delivery-view/cmd/mesh-delivery-cli/main.go b/modules/mesh-delivery-view/cmd/mesh-delivery-cli/main.go index 24a732b17..74959b66a 100644 --- a/modules/mesh-delivery-view/cmd/mesh-delivery-cli/main.go +++ b/modules/mesh-delivery-view/cmd/mesh-delivery-cli/main.go @@ -3,6 +3,8 @@ // to write the operator's answer to an ask that needs no proof of who answered (the view refuses the merge's Approve). `holds` // lists every fingerprint the assigner holds with its node, cause and answer; `hold-release [words]` and // `hold-keep [words]` answer its hold ask, again when the operator changes their mind (issue 1906). +// `pipelines [branch]` and `pipeline [mover]` are the pipelines page (design 47 H2 H-A-467): a branch's newest +// pipelines, one pipeline's mover rows or one mover's steps; with -follow printed again at each change the runner's events say. package main import ( @@ -13,7 +15,9 @@ import ( "os" "strings" "text/tabwriter" + "time" + seat "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-contracts/go/seats/meshpipelinerunner" "mesh-delivery-view/internal/view" ) @@ -31,9 +35,14 @@ func run(args []string, socket string, out, errOut io.Writer) int { fs := flag.NewFlagSet("mesh-delivery-cli", flag.ContinueOnError) fs.SetOutput(errOut) asJSON := fs.Bool("json", false, "print the rows as JSON") + follow := fs.Bool("follow", false, "pipelines and pipeline: print again at each change the runner's events say, until interrupted") + next := fs.String("next", "", "pipeline: the cursor of the next page a pipeline's answer named") if err := fs.Parse(args); err != nil { return 2 } + if fs.NArg() > 0 && (fs.Arg(0) == "pipelines" || fs.Arg(0) == "pipeline") { + return pipelines(socket, fs.Args(), *next, *follow, *asJSON, out, errOut) + } if fs.NArg() > 0 && fs.Arg(0) == "holds" { return holds(socket, *asJSON, out, errOut) } @@ -53,7 +62,7 @@ func run(args []string, socket string, out, errOut io.Writer) int { } if fs.NArg() > 0 { if fs.Arg(0) != "answer" || fs.NArg() < 3 { - fmt.Fprintln(errOut, "mesh-delivery-cli shows the rows, or answers: mesh-delivery-cli answer