android: colour every status from one palette
A successful stage read amber in the Timeline because a visit's chip was coloured from the graph's outcome palette (`graphColors`/`outcomeColor`) while every other surface used the run-status palette, so the same word meant two colours. This makes `RunStatusPalette` the single source of truth: - `RunState` gains the server's own `Waiting`/`Blocked`/`Skipped` words, each with a deliberate palette entry, a distinct material glyph and a label, so a status is never colour alone and success is green / failure red everywhere. - `graphColors()` takes success/error from `runStateColor(Succeeded/Failed)`; `outcomeColor()` returns the shared status colour for any word that resolves to a `RunState` and leaves `GraphPalette` only the graph-only flow outcomes (`rejected`/`exhausted`/`retry`/`approved`/`fast`/`missing`; `blocked`/ `skipped`/`done` removed). The Timeline's `TimelineRow` uses the same factory. - A visit's *outcome* stays distinct from the run's *status* by the chip's own label and the row's state glyph, never a second colour. - The runs-list failure diagnostic uses `runStateColor(Failed)` instead of a scheme role that could drift from the chip above it; the status filter gains `waiting`. Tests: new `StatusColorConsistencyTest` (timeline colour comes from the runs-list source; every state maps to exactly one colour) and extended `GraphPaletteTest`/ `RunStatusTest`. `gradle --offline --no-daemon :app:testDebugUnitTest --rerun-tasks` -> 516 tests, 0 failures, 0 errors, 0 skipped. Docs check: the root README and docs/ do not describe the Android status colours; the packaged templates and internal/author/skill/references cover the authoring surface and are unrelated, so nothing there needed updating. android/README.md did enumerate the run states and claimed the graph outcome palette was unchanged, so its features bullets were updated and a new "One status colour everywhere" section added, with the old bullet marked superseded. APK published to the run's artifacts as pipelines-debug-wip-d13f359.apk. (cherry picked from commit a3caa734cd4769f42883b518d877dd0132ef57ae)
This commit is contained in:
+56
-2
@@ -253,7 +253,12 @@ stops it.
|
||||
Nothing is removed, and the visit tabs still switch the selected visit.
|
||||
- Steps render as a timeline in run detail: a leading status glyph connected to
|
||||
the next step by an outcome-coloured line (kept aligned with the step title),
|
||||
the stage with its sequence and an outcome chip. A step's metadata is a set of
|
||||
the stage with its sequence and an outcome chip. A step's colour comes from the
|
||||
one status source, so a word that is a run state (`success`/`error`/`blocked`/
|
||||
`skipped`/`waiting`/…) is the same colour the runs list draws; only a graph-only
|
||||
flow outcome (`approved`, `retry`, …) keeps its curated graph colour. A visit's
|
||||
*outcome* is still distinguished from the run's *status* by the chip's own label
|
||||
and the row's state glyph, never by a second colour. A step's metadata is a set of
|
||||
aligned label/value rows (`KeyValueRow`) — paired side by side in two columns on
|
||||
a wide window and stacked in one column on a narrow one — with a single
|
||||
consistent vertical rhythm (one bottom gap per step, no doubled gap when a step
|
||||
@@ -267,7 +272,8 @@ stops it.
|
||||
via `formatDuration`, and colour-coded succeeded/failed/canceled/interrupted/
|
||||
active counts). Each card shows the pipeline name with a version chip, a
|
||||
colour-coded status chip with a distinct icon per state
|
||||
(running/queued/succeeded/failed/canceled/interrupted/active/unknown), a meta
|
||||
(running/waiting/queued/succeeded/failed/canceled/interrupted/active/unknown),
|
||||
a meta
|
||||
row (run id, start time, duration) and the diagnostic only when non-blank,
|
||||
clamped to two lines. The raw `resultPreview` is no longer printed, and
|
||||
progress is shown honestly (completed visits + current stage, with an
|
||||
@@ -2703,6 +2709,10 @@ command targeted `emulator-5556`; lane A's `emulator-5554` was not used).
|
||||
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.
|
||||
*(Superseded 17 Oct 2026: the graph's terminal roles and the Timeline chip now
|
||||
also take the one run-status colour, so "the graph outcome palette is unchanged"
|
||||
no longer holds — see "One status colour everywhere" below. `RunStatusPalette`
|
||||
stays the single status source.)*
|
||||
- **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.
|
||||
@@ -2785,6 +2795,50 @@ tree (JDK 17 from Homebrew `openjdk@17`, Gradle 8.11.1, `--offline`):
|
||||
`HTTP/1.1 200 OK`, `Content-Type: application/vnd.android.package-archive`,
|
||||
`Content-Length: 18009527`, and a streamed `GET | shasum -a 256` matched.
|
||||
|
||||
## One status colour everywhere (17 Oct 2026)
|
||||
|
||||
A successful stage in the Timeline read amber, because a visit's chip was coloured
|
||||
from the graph's outcome palette while every other surface used the run-status
|
||||
palette, so the same word meant two colours. `android/` only; nothing in the
|
||||
Pipelines server, its Go source, the Docker/compose files or the installer was
|
||||
touched, no dependency was added beyond the already-declared
|
||||
`material-icons-extended`, and no run was started from the app.
|
||||
|
||||
- **One source of truth.** `ui/components/RunStatusPalette.kt`, with `RunState` /
|
||||
`runStateOf` / `runStateColor` / `runStateIcon` in `ui/components/RunStatus.kt`,
|
||||
owns a status colour. `RunState` gained the server's own `Waiting`/`Blocked`/
|
||||
`Skipped` words (`waiting` corroborated by `internal/tui/run_progress.go`), each
|
||||
with a deliberate palette entry, a distinct material glyph
|
||||
(`HourglassEmpty`/`Block`/`SkipNext`) and a label, so status is never colour
|
||||
alone.
|
||||
- **The graph and timeline route through it.** `graphColors(scheme)` sets
|
||||
`success`/`error` from `runStateColor(Succeeded/Failed)`, and `outcomeColor`
|
||||
returns the shared status colour for any word that resolves to a `RunState`,
|
||||
falling back to `GraphPalette` only for the graph-only flow outcomes
|
||||
(`rejected`, `exhausted`, `retry`, `approved`, `fast`, `missing`; `blocked`/
|
||||
`skipped`/`done` were removed from the graph palette). The Timeline's
|
||||
`TimelineRow` uses the same factory, so a successful visit is green and a failure
|
||||
red. A visit's *outcome* stays distinct from the run's *status* by the chip's own
|
||||
label and the row's state glyph, never a second colour. The runs list's failure
|
||||
diagnostic uses `runStateColor(Failed)` rather than a scheme role that could
|
||||
drift from the chip above it, and the list's status filter gained `waiting`.
|
||||
- **Tests.** `GraphPaletteTest` asserts every status word's graph colour equals the
|
||||
runs-list colour and that the graph-only outcomes stay distinct and borrow no
|
||||
status colour; `ui/graph/StatusColorConsistencyTest` asserts the timeline maps
|
||||
through the same source and that every state maps to exactly one colour, the one
|
||||
deliberate alias being Running/Active.
|
||||
|
||||
Evidence obtained on this tree (macOS, JDK 17 from Homebrew `openjdk@17`, Gradle
|
||||
8.11.1, `ANDROID_HOME=/Users/alan/Library/Android/sdk`, `--offline`,
|
||||
`--no-daemon`):
|
||||
|
||||
- `gradle :app:testDebugUnitTest --rerun-tasks` → **516 tests, 0 failures, 0
|
||||
errors, 0 skipped** (including the new `StatusColorConsistencyTest`, 2 cases, and
|
||||
the extended `GraphPaletteTest`, 12 cases, and `RunStatusTest`, 3 cases).
|
||||
- **APK publish.** The run's debug APK is
|
||||
`…/artifacts/282/1/pipelines-debug-wip-d13f359.apk` (18,486,624 bytes, sha256
|
||||
`b11481889b2894efb5fb6b17bcb62af819fe4b6ffb0196f5e27834b4736a5e1c`).
|
||||
|
||||
## Last-run facts on every pipeline row (16 Oct 2026)
|
||||
|
||||
`android/` only. No server field was added: the whole run history already arrives
|
||||
|
||||
Reference in New Issue
Block a user