Make pass/fail edges the loudest lines in the run graph

Treat `success` and `error` as the emphasised outcomes so pass/fail is
obvious at a glance and from a distance. An executed pass/fail edge now
uses PASSFAIL_EDGE_STROKE=7f (was 3f), a same-hue, more saturated stroke
(PASSFAIL_SATURATION=1.6f via the new pure boostSaturation helper) and a
matched PASSFAIL_ARROW_HEAD_SIZE=20f arrowhead. Other executed outcomes
keep EDGE_STROKE=3f and not-executed routes the finer
INACTIVE_EDGE_STROKE=2.5f, so the two decisive outcomes dominate.

All widths, the arrowhead size and the saturation factor are named
tokens chosen by edgeStrokeWidth/edgeArrowHeadSize/edgeStrokeColor; the
old 12f arrowhead literal at the call site is gone (drawArrowHead now
takes the size as a parameter). Outcome hues are unchanged; the boosted
stroke keeps the original hue and value.

The run Graph tab help line notes that executed success and failure
routes are drawn thickest, and the definition-only view gets the same
emphasis since every route counts as executed there. New unit tests cover
the saturation maths (hue/value/alpha preserved, safe and clamped) and the
per-edge width/arrowhead/colour choices.
This commit is contained in:
2026-10-16 08:06:34 +01:00
parent 9c47527def
commit 1e7862e7c9
6 changed files with 353 additions and 19 deletions
+94 -3
View File
@@ -111,8 +111,10 @@ stops it.
fallback), loops and branches, pan/zoom, and run highlighting (under a run the
executed stage/route is a solid full-colour stroke with an arrowhead and a
filled, normal-bordered node, while a not-executed one is a dashed, arrowless
muted stroke with a hollow, dashed-bordered node and a muted label, plus a
one-line legend; the definition-only view is unchanged) plus a screen-reader
muted stroke with a hollow, dashed-bordered node and a muted label; an executed
`success`/`error` route is drawn noticeably heavier with a stronger same-hue
stroke and a larger arrowhead so pass/fail dominates; a one-line legend names
both states) plus a screen-reader
description. Edges are drawn as
axis-aligned orthogonal polylines like the TUI (`routePoints` computes the
path once per layout and stores it on `EdgeLayout.points`), and each arrowhead
@@ -1796,7 +1798,8 @@ on or driven).
- **The definition-only view is untouched.** With no `runState` every
stage/route is executed, so the graph renders exactly as before (solid, filled,
arrowed) and the legend is not composed — confirmed against the pipeline Graph
tab.
tab. (Superseded later the same day: the pass/fail change below now widens an
executed `success`/`error` route in this view too.)
- The run-detail Graph tab's help line was updated from "highlighted … dimmed" to
"solid … dashed and outlined".
@@ -1861,3 +1864,91 @@ Not verified in this pass: `:app:lintDebug`, the light theme, and a real hardwar
fold (the wide/narrow layouts were produced with `wm size`/`wm density`); the
on-device captures used the debug build of this source, while the published APK
is a clean rebuild of the same source.
## Pass/fail edges are the loudest lines (16 Oct 2026)
`android/` only. Nothing outside `android/` was touched, no dependency was added,
no run was started from the app, and every `adb`/emulator command targeted
`emulator-5556` (lane A's `emulator-5554` was never used; the attached device was
never installed on or driven).
- **Two decisive outcomes, drawn heavier.** `ui/graph/WorkflowGraph.kt` now
treats `success` (pass) and `error` (fail) as the emphasised outcomes
(`isPassFailOutcome`). An executed pass/fail edge is drawn at
`PASSFAIL_EDGE_STROKE = 7f` — noticeably heavier than the previous `3f` — with
a stronger, more saturated stroke and a matching `PASSFAIL_ARROW_HEAD_SIZE =
20f` arrowhead, so pass/fail is obvious at a glance and from a distance.
- **Other lines stay finer.** Every other executed outcome keeps `EDGE_STROKE =
3f`, and a not-executed edge uses the finer `INACTIVE_EDGE_STROKE = 2.5f`, so
the two emphasised outcomes dominate. No outcome hue changed.
- **Stronger, same-hue stroke.** `boostSaturation(color, factor)` in
`ui/graph/GraphPalette.kt` scales HSV saturation by `PASSFAIL_SATURATION =
1.6f`, clamping at 1 while preserving hue, value and alpha. On the dark theme
the executed `success` stroke moves from `#F2C879` (hue 39.2°) to a vivid
`#F2AF30`-ish core (hue 39.3°, measured pixel `(242,175,48)`) and the executed
`error` stroke from `#FFB4AB` (hue 6.4°) to a stronger `(255,135,121)` (hue
6.3°); the measured pixel hues match their unboosted originals, so meaning is
not conveyed by a new colour. A non-pass/fail or not-executed edge keeps its
exact outcome colour.
- **Widths come from named tokens, not call sites.** `edgeStrokeWidth`,
`edgeArrowHeadSize` and `edgeStrokeColor` pick the token for an edge; the old
`12f` arrowhead literal is gone (the draw scope takes the size as a
parameter). The legend swatch keeps the base `EDGE_STROKE`/`ARROW_HEAD_SIZE`
because it names the generic executed/not-executed states, not pass/fail.
- **Definition-only view.** With no run selected every route counts as executed,
so the definition graph now shows the same pass/fail emphasis (still no
legend). The run Graph tab help line now adds "Executed success and failure
routes are drawn thickest."
Verification (macOS; Homebrew `openjdk@17`,
`JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home`,
Gradle 8.11.1 at
`~/.gradle/wrapper/dists/gradle-8.11.1-bin/…/gradle-8.11.1/bin/gradle`,
`ANDROID_HOME=/Users/alan/Library/Android/sdk`, `--offline`):
- `gradle --offline clean :app:testDebugUnitTest :app:assembleDebug` →
**193 tests, 0 failures, 0 errors**; `WorkflowGraphTest` **36** (2 new: the
executed pass/fail edge is the widest and its arrowhead scales, and only
`success`/`error` are pass/fail outcomes) and `GraphPaletteTest` **10** (3 new:
`boostSaturation` raises saturation while keeping hue/value/alpha, is safe and
clamped at the edges, and only executed pass/fail strokes are saturated
further). The clean `:app:assembleDebug` produced `app-debug.apk`
**17,912,489 bytes**, sha256
`ce63722b851ce26322da69fa47bdc91958c3d7db3e339c1340efc3e04b6780f8`.
- **Before/after on a run with both a success and an error edge.** Run 77
(pipeline 11 "Focused tweak - implement review commit", failed at `ui_reviewer`
with `error`) was opened in the app against the live server
`ws://10.0.2.2:8080/connect` in dark mode; its taken routes include a `success`
and an `error` edge. "Before" is HEAD `9c47527` (the six edited files stashed,
rebuilt, installed; verified by the help line without "thickest"); "after" is
this change. Captures were written with
`android/scripts/capture_png.sh -s emulator-5556`:
- **Wide** 2208x1840 @ density 420 (≈841dp): `before_wide_1x.png` /
`after_wide_1x.png`. At the panel's fit scale the executed success/error
stroke's saturated core measures **1px before, 3px after** (sampled at the
same x), while the dashed non-pass/fail routes stay ~1px.
- **Wide 2x** 4416x3680 @ density 840: `before_wide_2x.png` /
`after_wide_2x.png`.
- Cropped graph panes `before_wide_{1x,2x}_graphcrop.png` /
`after_wide_{1x,2x}_graphcrop.png` and stacked before/after sheets
`compare_wide_1x.png` / `compare_wide_2x.png` show the two amber `success`
edges and the red `error` edge as the boldest lines after the change, with
the dashed `blocked`/`rejected`/`approved`/`skipped` routes and the
not-executed `committer`/`SUCCESS` edges unchanged.
- `adb -s emulator-5556 logcat -d` contained 0 `FATAL EXCEPTION` and 0
`E AndroidRuntime` lines.
- **APK publish.** `app-debug.apk` copied to
`…/artifacts/98/1/pipelines-debug-wip-9c47527.apk` (`9c47527` = `git rev-parse
--short HEAD`); `shasum -a 256` matched. `curl -I
http://10.0.0.249:8080/artifacts/98/1/pipelines-debug-wip-9c47527.apk` (`10.0.0.249`
from `ipconfig getifaddr en0`) returned `HTTP/1.1 200 OK`,
`Content-Type: application/vnd.android.package-archive`, `Content-Length:
17912489`, and a streamed `GET | shasum -a 256` equalled the local file. The
APK exceeds the server's per-file inventory cap, so it is served by direct URL
only.
Not verified in this pass: `:app:lintDebug`, the light theme, and a real hardware
fold (the wide layout was produced with `wm size`/`wm density`); the on-device
captures used the debug build of this source, while the published APK is a clean
rebuild of the same source.