Make executed vs not-executed unmistakable in the run graph
Carry the two states structurally instead of by fading, so the difference
survives a screenshot, a dim screen and a colour-blind reader.
- Executed edges: solid full-colour stroke plus an arrowhead.
- Not-executed edges: dashed muted stroke (INACTIVE_DASH_EFFECT), no arrowhead.
- Executed nodes: keep their fill and normal border.
- Not-executed nodes: no fill, dashed muted border and a muted but legible label.
- Add a one-line legend (GRAPH_LEGEND / GraphLegendEntry / LegendSwatch) pinned
TopStart, rendered only when a run is selected.
- Replace the private EdgeLayout.isExecuted/inline visited check with the shared
edgeIsExecuted/stageIsExecuted predicates and remove the alpha-based dimming.
- Update the KDoc and the run Graph tab help text ("solid ... dashed and outlined").
Tests: executed/inactive predicates over the definition view and a RunGraphState,
the dash pattern as a positive even-length rhythm, and the legend naming both
states with executed first.
This commit is contained in:
+106
-2
@@ -108,8 +108,12 @@ stops it.
|
||||
declaration order, with `#failure`/`#success` terminals sharing a lower row and
|
||||
arrows entering their top borders (an `error -> #failure` route leaves its
|
||||
source's bottom); labelled outcome edges (`error*` marks the implicit
|
||||
fallback), loops and branches, pan/zoom, and run highlighting (executed routes
|
||||
highlighted, others dimmed) plus a screen-reader description. Edges are drawn as
|
||||
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
|
||||
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
|
||||
points along its route's final segment rather than the from-to chord. Pinch
|
||||
@@ -1757,3 +1761,103 @@ has both pipelines and runs, `list_runs` is not workspace-scoped, and the task
|
||||
forbids touching the server's data, so there was no empty source to render them
|
||||
against; the branch is unit-covered only indirectly. A real hardware fold and
|
||||
`:app:lintDebug` were again not exercised.
|
||||
|
||||
## Executed vs not-executed is structural, with a legend (16 Oct 2026)
|
||||
|
||||
`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 every `adb`/emulator command targeted `emulator-5556`
|
||||
(lane A's `emulator-5554` was never used; the attached Pixel was never installed
|
||||
on or driven).
|
||||
|
||||
- **The two states differ by shape, fill and border style, not by a faded tint.**
|
||||
`ui/graph/WorkflowGraph.kt` now draws an executed route as a solid full-colour
|
||||
stroke **with** its arrowhead, and a not-executed route as a dashed muted
|
||||
stroke **without** an arrowhead. A node the run visited is filled with its
|
||||
normal border; a node it did not is hollow (no fill) with a dashed muted border
|
||||
and a muted-but-legible `onSurfaceVariant` label. The old `alpha = 0.25f` /
|
||||
`0.3f` dimming is gone, so the distinction survives a screenshot, a dim screen
|
||||
and a colour-blind reader.
|
||||
- **Shared, testable predicates.** `stageIsExecuted(key, runState)` and
|
||||
`edgeIsExecuted(edge, runState)` (both `runState == null` ⇒ executed) replace
|
||||
the private `EdgeLayout.isExecuted` and the inline `visitedStages` check, so
|
||||
drawing and the screen-reader `graphDescription` share one definition.
|
||||
- **Dash token.** `INACTIVE_DASH_INTERVALS = floatArrayOf(14f, 10f)` is the one
|
||||
line-style token; `INACTIVE_DASH_EFFECT` is the lazily-built `PathEffect` used
|
||||
by both the not-executed edges and the not-executed node borders, so it is
|
||||
never rebuilt per frame. Node/edge geometry keeps the existing layout
|
||||
tokens/insets — the only new literals are the dash rhythm and the compact
|
||||
legend swatch, not graph geometry.
|
||||
- **Compact legend.** `GRAPH_LEGEND` (a solid, arrowed swatch labelled
|
||||
`Executed`; a dashed, arrowless swatch labelled `Not executed`) is drawn as a
|
||||
one-line `Row` pinned to the graph's top-start, opposite the Fit/expand
|
||||
controls, so it stays visible with the top of the panel even on a short/narrow
|
||||
window. It renders only when a run is selected.
|
||||
- **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.
|
||||
- The run-detail Graph tab's help line was updated from "highlighted … dimmed" to
|
||||
"solid … dashed and outlined".
|
||||
|
||||
Verification (macOS; Homebrew `openjdk@17` at
|
||||
`JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home`,
|
||||
Gradle 8.11.1, `ANDROID_HOME=/Users/alan/Library/Android/sdk`, `--offline`):
|
||||
|
||||
- `gradle --offline clean :app:testDebugUnitTest :app:assembleDebug` →
|
||||
**188 tests, 0 failures, 0 errors**; `WorkflowGraphTest` **34** tests (3 new:
|
||||
the executed predicates over the definition view and a `RunGraphState`, the
|
||||
dash pattern being a positive even-length rhythm, and the legend naming both
|
||||
states with executed first). The clean `:app:assembleDebug` produced
|
||||
`app-debug.apk` **17,912,489 bytes**, sha256
|
||||
`49631a3a2763bf1d9232eb9e7c8f9ff3edd719355ac0a99b7c91f7f40c3a1cc5` (two clean
|
||||
rebuilds were byte-identical; this is the published artifact).
|
||||
- A partly-executed run (run 77, pipeline id 11 "Focused tweak - implement review
|
||||
commit": `implementer`, `reviewer`, `ui_reviewer` ran, `committer` did not) was
|
||||
opened in the app against the live server `ws://10.0.2.2:8080/connect` in dark
|
||||
mode, driven with `adb shell input`, and every capture below was written with
|
||||
`android/scripts/capture_png.sh -s emulator-5556` (validated PNG magic bytes;
|
||||
the fold emulator has two displays, so a `screencap` redirect must never be
|
||||
used). Captures are in `…/artifacts/93/1/`:
|
||||
- **Narrow** 1080x1920 @ density 480 (≈360dp): `[implementer]`, `[reviewer]`,
|
||||
`[ui_reviewer]` and `[FAILURE]` are filled with solid, arrowed routes between
|
||||
the visited stages and into `#failure`; `[committer]` and `[SUCCESS]` are
|
||||
hollow with dashed borders, and every other route is dashed with no arrowhead
|
||||
(`graph_partly_exec_narrow_1x.png`).
|
||||
- **Narrow, 2x** at 2160x3840 @ density 960 (same 360dp): the same graph at
|
||||
double the pixel density, dashes and arrowheads clearly resolved
|
||||
(`graph_partly_exec_narrow_2x.png`).
|
||||
- **Wide** 2208x1840 @ density 420 (≈841dp): `graph_partly_exec_wide_1x.png`;
|
||||
**wide 2x** at 4416x3680 @ density 840: `graph_partly_exec_wide_2x.png`; a
|
||||
colour 2x crop of the graph and legend `graph_partly_exec_wide_1x_zoom.png`.
|
||||
- **Grayscale check.** Greyscale conversions (`PIL` `Image.convert('L')`) of
|
||||
the narrow-2x and wide-1x captures, plus a 2x greyscale crop, keep the
|
||||
distinction: the executed routes are continuous solid lines with arrowheads
|
||||
and the nodes fill, while the not-executed routes are broken dashed lines and
|
||||
the nodes are hollow outlines (`graph_partly_exec_narrow_2x_gray.png`,
|
||||
`graph_partly_exec_wide_1x_gray.png`,
|
||||
`graph_partly_exec_wide_1x_gray_zoom.png`).
|
||||
- **Definition-only view unchanged.** Captured the pipeline Graph tab (no run)
|
||||
on a pre-change build (a `54af453` worktree) and on this build; the graph pane
|
||||
is pixel-identical (no legend on either side). A
|
||||
`PIL ImageChops.difference` over the graph pane (`x 1150–2208, y 150–1500`)
|
||||
reported `bbox None` / `0` differing pixels of 1,428,300 / max channel diff
|
||||
`0`. Before/after pair: `def_before_p8.png` / `def_after_p8.png` (pipeline 8
|
||||
Graph tab); the same source's pipeline-11 Graph tab after is
|
||||
`graph_definition_only_wide_1x.png`.
|
||||
- `adb -s emulator-5556 logcat -d` contained 0 `FATAL EXCEPTION` and 0
|
||||
`E AndroidRuntime` lines.
|
||||
- **APK publish.** `app-debug.apk` copied to
|
||||
`…/artifacts/93/1/pipelines-debug-wip-54af453.apk` (`54af453` = `git rev-parse
|
||||
--short HEAD`); `shasum -a 256` matched. `curl -I
|
||||
http://10.0.0.249:8080/artifacts/93/1/pipelines-debug-wip-54af453.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. At
|
||||
~17.1 MiB the APK exceeds the server's 8 MiB 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/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.
|
||||
|
||||
Reference in New Issue
Block a user