Give run status an app-owned palette with correct hues
Run status was mapped onto Material roles, so a succeeded run read amber (tertiary) and a running run read mint (primary). Replace that mapping with an app-owned RunStatusPalette: Running/Active blue, Succeeded green, Failed the app error red, Interrupted amber, Canceled muted grey, Queued neutral grey and Unknown a low-key surface grey, each with a one-line rationale. runStateColor is now a pure lookup over the palette. Keep each state's distinct material glyph and text label so status is never colour-only, and add a WCAG-AA contrast test for every status colour against the dark surface plus hue-specific assertions. Leave the graph's stage-outcome palette untouched. The timeline's step chips are a stage outcome, not a run status, so point them at the shared graphColors/ outcomeColor factory (extracted from WorkflowGraph) to agree with the graph, and factor the shared ColoredChip pill out of StatusChip so neither repeats the layout. Document the change and its evidence in android/README.md.
This commit is contained in:
@@ -1268,3 +1268,81 @@ has exactly three pane levels (`MasterPane.List/Detail/Stage`, `MAX_PANE_DEPTH =
|
||||
`SlidingPaneStackTest` cases instead; a long covered detail title wraps to three
|
||||
centred lines and ellipsizes (e.g. `Pipelines maintenance - plan implem…`) rather
|
||||
than being rotated.
|
||||
|
||||
## An app-owned run-status palette (16 Oct 2026)
|
||||
|
||||
Run status had the wrong hue for its two most important states because it was
|
||||
mapped onto Material roles: `primary` (mint) made a **running** run read green and
|
||||
`tertiary` (amber) made a **succeeded** run read yellow. `android/` only; nothing
|
||||
in the Pipelines server, its Go source, the Docker/compose files or the installer
|
||||
was touched, no dependency was added, no run was started from the app, and the
|
||||
attached Pixel 10 Pro Fold was never installed on or driven (every `adb`/emulator
|
||||
command targeted `emulator-5556`; lane A's `emulator-5554` was not used).
|
||||
|
||||
- **A new app-owned palette.** `ui/components/RunStatusPalette.kt` defines one
|
||||
`Entry(colour, rationale)` per status, fixed (not scheme-derived) so a status
|
||||
reads the same on every device, with a one-line reason each: Running/Active
|
||||
blue, Succeeded green, Failed the app error red, Interrupted amber, Canceled
|
||||
muted grey, Queued neutral grey, Unknown the low-key surface grey.
|
||||
`runStateColor` is now a pure function over this palette (no `MaterialTheme`), so
|
||||
it is asserted in a plain JVM test. Each state keeps its distinct material glyph
|
||||
and text label, so status is never colour alone.
|
||||
- **The graph outcome palette is unchanged.** `GraphPalette` and the terminal
|
||||
`success`/`error` roles are untouched; run status and stage outcome stay
|
||||
different vocabularies. The runs-list **Timeline** step chips (and their leading
|
||||
glyphs) previously rendered through `runStateOf`/`StatusChip`, i.e. the run-status
|
||||
mapping, so they were pointed at the graph's outcome palette instead: they now
|
||||
call the shared `graphColors(scheme)` factory (extracted from `WorkflowGraph`,
|
||||
which uses it too) and `outcomeColor`, so a step chip agrees with the graph.
|
||||
The run header and runs-list cards keep the run-status palette.
|
||||
- **Shared helper.** `ui/components/RunStatus.kt` gained `ColoredChip(label,
|
||||
colour, icon, …)` — the single pill layout now used by both `StatusChip` (run
|
||||
status) and the Timeline's outcome chip, instead of a second copy.
|
||||
|
||||
Evidence (macOS, JDK 17 from Homebrew `openjdk@17`, Gradle 8.11.1,
|
||||
`ANDROID_HOME=/Users/alan/Library/Android/sdk`, `ANDROID_SDK_ROOT` set,
|
||||
`--offline`):
|
||||
|
||||
- `gradle :app:testDebugUnitTest` reported **143 tests, 0 failures, 0 errors**
|
||||
(new `RunStatusPaletteTest`: WCAG-AA contrast ≥ 4.5:1 for every status colour
|
||||
against `DarkSurface 0xFF0E1513`, Succeeded green and ≠ `DarkTertiary`, Running/
|
||||
Active blue and ≠ `DarkPrimary`, Failed = `DarkError`, Interrupted amber and ≠
|
||||
Failed, Queued near-grey and ≠ Running, and a non-blank rationale per status).
|
||||
`gradle :app:assembleDebug` succeeded (18,009,527-byte debug APK, sha256
|
||||
`17f52f23e40f4ba0c524ac2929adfd6a8f39353e68ccdeedb2e029019225e350`).
|
||||
- On `emulator-5556` (`FoldB_API_36`, 2208x1840, density 420) in dark mode
|
||||
(`adb shell cmd uimode night yes`) against the live server
|
||||
`ws://10.0.2.2:8080/connect`, driven with `adb shell input` and `uiautomator
|
||||
dump`. Every capture below was written with `android/scripts/capture_png.sh -s
|
||||
emulator-5556` (which names the SurfaceFlinger display id and validates the PNG
|
||||
magic bytes), and a validated screenshot was pixel-sampled to read the rendered
|
||||
colour back:
|
||||
- **Before** (pre-change tree, `git stash` build): runs-list usage values were
|
||||
Succeeded `#F2C879` (amber), Running card `#6FD3B8` (mint); a run header read
|
||||
`#F2C879` (succeeded) and `#6FD3B8` (running) — the reported bug, `captures` in
|
||||
`runs_list_before.png`, `run_header_before.png`, `run_header_running_before.png`.
|
||||
- **After**: runs-list usage values were Succeeded `#7FE0A8` (green), Failed
|
||||
`#FFB4AB` (error red), Canceled `#889391` (muted), Interrupted `#E8C06A`
|
||||
(amber), Active `#7FB2F0` (blue); the running card was `#7FB2F0` and the
|
||||
succeeded card `#7FE0A8` (`runs_list_after.png`). A run header read `#7FE0A8`
|
||||
(succeeded) and `#7FB2F0` (running) (`run_header_after.png`,
|
||||
`run_header_running_after.png`).
|
||||
- **Timeline agrees with the graph**: before, a graph-only outcome still went
|
||||
through the run-status mapping — an `approved` step chip sampled `#BEC9C5`
|
||||
(the run-status `Unknown` grey). After, the `success` step chip sampled
|
||||
`#F2C879` (the graph's tertiary terminal role) and the `approved` chip
|
||||
`#C0A3F5` (`GraphPalette` index 5), both equal to the graph's `outcomeColor`
|
||||
(`run_timeline_before.png`, `run_timeline_after.png`).
|
||||
- `adb -s emulator-5556 logcat -d` contained 0 `FATAL EXCEPTION` / `E
|
||||
AndroidRuntime` lines (the only app-matched lines were expected
|
||||
`InputDispatcher … Consumer closed input channel` warnings from the
|
||||
force-stop/reinstall).
|
||||
- **APK publish.** `app/build/outputs/apk/debug/app-debug.apk` was copied to
|
||||
`…/artifacts/69/1/pipelines-debug-wip-cd85f69.apk` (`cd85f69` = `git rev-parse
|
||||
--short HEAD`); `shasum -a 256` matched. `curl -I
|
||||
http://10.0.0.249:8080/artifacts/69/1/pipelines-debug-wip-cd85f69.apk` (LAN
|
||||
address from `ipconfig getifaddr en0`) returned `HTTP/1.1 200 OK`,
|
||||
`Content-Type: application/vnd.android.package-archive`, `Content-Length:
|
||||
18009527`; a streamed `GET | shasum -a 256` equalled the local file. At 17.2 MiB
|
||||
it exceeds the server's 8 MiB per-file inventory cap, so it is served by direct
|
||||
URL only.
|
||||
|
||||
Reference in New Issue
Block a user