Show a run's title beside its pipeline name

Surface the operator's title for a run so two runs of the same pipeline
read as clearly different goals, with the pipeline name kept as context.

- protocol: optional nullable `title` on RunSummary and RunDetail; absent
  or blank degrades to the pipeline name.
- ui/RunIdentity.kt: one shared fallback (`runLabel`) and two-line identity
  (`runIdentity`) so the list, detail header and stage pane never spell a
  run differently; a titled run shows the pipeline name + version as a
  second line, an untitled run keeps the pipeline name as its only line.
- runs list / run detail / stage pane use the shared identity; the status
  chip, duration and metadata layout are unchanged.
- no rename affordance: the server exposes no title and no `set_run_title`,
  so the app does not fake renaming.
- tests: RunIdentityTest (5) plus ProtocolModelTest cases for a present and
  an absent title; README documents the change and its verification.
This commit is contained in:
2026-10-16 18:26:29 +01:00
parent e1c531a537
commit 8b0d7b1ecb
8 changed files with 249 additions and 10 deletions
+55
View File
@@ -3662,3 +3662,58 @@ inner display rather than a physical fold, then reset; `:app:lintDebug` was not
re-run (its only known findings remain the two pre-existing `NewApi` errors for
`android:windowLightNavigationBar`).
## Run title beside the pipeline name (16 Oct 2026)
A run now shows the operator's title for the goal, with the pipeline it ran on as
the secondary line, so two runs of the same pipeline are distinguishable.
`android/` only; no dependency was added, no run was started from the app, and no
device command was run (build + unit tests only).
- **Protocol.** `data/protocol/Message.kt` gains an optional `title` on both
`RunSummary` and `RunDetail` (the server's `RunSummary.title`). It is nullable
and defaults to absent, so a server that does not send it degrades cleanly.
- **One shared fallback.** New `ui/RunIdentity.kt` holds `runLabel(title, name)`
(mirroring the server's `RunSummary.Label`) and `runIdentity(title, name)`: the
label is the title, or the pipeline name when the title is absent/blank, and the
pipeline is a second line only when a title exists — never an empty line.
- **Runs list.** `RunHistoryScreen.RunRow` shows the label as the primary line and,
only for a titled run, the pipeline name plus its version chip on a second line;
an untitled run keeps the pipeline name and version chip as its single identity
line. The status chip, progress, id/start/duration line and diagnostic are
unchanged.
- **Run detail + stage panes.** The run detail app bar and the Summary lead with
the label and, when titled, name the pipeline (`name · vN`) on a second line; the
covered peek uses the label too. `StageDetailPane` takes an optional `runLabel`
and shows it under the stage name, so a stage/visit pane keeps the run context.
- **Renaming is not offered.** The authoritative server does not expose it: it has
no `set_run_title` command and `list_runs`/`get_run` return no `title` field, so
the app does not fake a rename. The protocol field is parsed for the server that
does send it; until then the title falls back to the pipeline name.
Evidence (macOS, JDK 17 from Homebrew `openjdk@17`, Gradle 8.11.1 from the wrapper
cache, `ANDROID_HOME=/Users/alan/Library/Android/sdk`, `--offline`, `--no-daemon`):
- `:app:testDebugUnitTest` → `BUILD SUCCESSFUL`; the 32 result XMLs aggregate to
**276 tests, 0 failures, 0 errors, 0 skipped**. The new `RunIdentityTest` (5
cases) covers the title/fallback/trim logic, and `ProtocolModelTest` gained a
case for a present and one for an absent title on both the run summary and the
run detail.
- `:app:assembleDebug` → `app-debug.apk` **18,257,214 bytes**, sha256
`bce661069b2bd013f0802545402766a3ae8fed97e1bbe0109f81a4bfb6233601`.
- Server capability probe (read-only, through the installed CLI):
`pipelines runs` and `pipelines rpc '{"type":"get_run","run_id":155}'` return no
`title` field, and the running `pipelines-server` binary contains no
`set_run_title` string. So renaming is deliberately not offered and the title
falls back to the pipeline name until a server carrying the field is deployed.
- **APK publish.** `app-debug.apk` copied to
`…/artifacts/162/1/pipelines-debug-wip-e1c531a.apk` (`e1c531a` = short `HEAD`;
the working tree is uncommitted WIP on top of it); `shasum -a 256` matched.
`curl -I http://10.0.0.249:8080/artifacts/162/1/pipelines-debug-wip-e1c531a.apk`
returned `HTTP/1.1 200 OK`, `Content-Type:
application/vnd.android.package-archive`, `Content-Length: 18257214`.
Not verified in this pass: device captures of the runs list and run detail (the
visual review owns the device); no server that actually sends `title` was
available, so the titled layout is exercised by the unit tests and the fallback
path only.