Merge lane-app2: keep both lanes' reviewed work

Compose the parallel lane (lane-app2) with the work already on main,
preserving both intents rather than picking one side:

- lane-app2's modernised run graph (rounded tonal nodes, pill terminals,
  chipped outcome labels, pass/fail emphasis and active-stage/edge motion)
  plus its remembered list filters/sort and last-run badges, and the
  app-owned run-status palette.
- main's cross-fading loading/empty/error states, animated list items and
  the single geometry token file (Dimens.kt + DimensTest).

Conflicts resolved in android/README.md (kept both appended sections),
RunStatus.kt (kept the shared ColoredChip extraction and made it animate
under MotionQuick), PipelineListScreen.kt (filters/sort/badges composed with
the StateCrossfade/load-phase presentation and animateListItem rows),
RunDetailScreen.kt (kept both the artifact-selection and graph-palette
imports) and RunHistoryScreen.kt (the cross-faded load branch now passes
sort/filters through, and both empty branches keep the Clear filters action
with animated items). LoadPhase.Empty now carries an optional recovery
action so the crossfade can still offer Clear filters. The graph's new
geometry literals moved onto Dimens.kt GRAPH_* tokens so DimensTest passes
and its allow-list shrinks as intended.

Verified: :app:assembleDebug and :app:testDebugUnitTest (259 tests,
0 failures) with the offline Gradle 8.11.1 / JDK 17 toolchain.
This commit is contained in:
2026-10-16 12:04:45 +01:00
32 changed files with 4354 additions and 208 deletions
+961 -4
View File
@@ -108,15 +108,31 @@ 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; 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
points along its route's final segment rather than the from-to chord. Pinch
zoom is anchored to the gesture centroid: the pure `zoomAbout` keeps the
content point under the fingers fixed (clamped to `MIN_SCALE`/`MAX_SCALE`) and
the existing pan clamp is applied afterwards, so the content no longer slides
away from the fingers.
away from the fingers. The visual language is a modern surface, not a terminal
diagram: a stage is a rounded rectangle (the theme's `shapes.medium`) and a
terminal a pill, both filled with a tonal surface tinted with the node's
semantic hue behind a soft border (not a flat fill plus hard outline); the node
name and the outcome labels use the app's type scale (`cardTitle`/`label`, no
ad-hoc sizes, no all-caps, terminal `Success`/`Failure` in their own colour);
edges draw with round caps/joins and every right-angle bend is rounded by one
`ROUTE_CORNER_RADIUS` control offset over the unchanged stored polyline, with a
filled arrowhead proportional to its stroke and the outcome label on a rounded
tonal chip rather than raw text over the canvas; node and per-edge-track spacing
are named dp tokens.
- One shared graph-panel height (`collapsedGraphHeight`/`expandedGraphHeight`)
replaces the former 360.dp and 340.dp literals, so both detail screens render
the graph at the same size: about 58% of the window height floored at a height
@@ -1278,7 +1294,6 @@ has exactly three pane levels (`MasterPane.List/Detail/Stage`, `MAX_PANE_DEPTH =
centred lines and ellipsizes (e.g. `Pipelines maintenance - plan implem…`) rather
than being rotated.
## Run stage pane leads with the run's results (16 Oct 2026)
A stage opened from a run no longer leads with its own definition. The pane now
@@ -2321,3 +2336,945 @@ Evidence (macOS, JDK 17 from Homebrew `openjdk@17`,
Not verified in this pass: whether `:app:lintDebug` stays at its two
pre-existing `NewApi` errors (it was not run).
## 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.
### Re-verified against the committed tree (run 72, 16 Oct 2026)
The change above is committed at `24584d8`; re-checked independently on that exact
tree (JDK 17 from Homebrew `openjdk@17`, Gradle 8.11.1, `--offline`):
- `gradle --offline :app:testDebugUnitTest --rerun` → **143 tests, 0 failures, 0
errors** (`RunStatusPaletteTest` 7/7, including the per-status WCAG-AA contrast
check). `gradle --offline :app:assembleDebug` succeeded; the APK is 18,009,527
bytes, sha256 `17f52f23e40f4ba0c524ac2929adfd6a8f39353e68ccdeedb2e029019225e350`.
- Before/after captured on `emulator-5556` (`sdk_gphone16k_arm64`, 2208x1840,
density 420, dark mode) with `android/scripts/capture_png.sh -s emulator-5556`.
The pre-change build was produced from a clean `git archive cd85f69` tree (never
a working-tree stash), and each capture was pixel-sampled to read the rendered
colour back:
- **Before**: runs-list usage Succeeded `#F2C879` (amber) and Active `#6FD3B8`
(mint); run 69 header `#F2C879`, run 72 header `#6FD3B8`; the `approved`
Timeline chip `#BEC9C5` (run-status `Unknown` grey).
- **After**: Succeeded `#7FE0A8` (green), Failed `#FFB4AB`, Canceled `#889391`,
Interrupted `#E8C06A`, Active `#7FB2F0`; run 69 header `#7FE0A8`, run 72 header
`#7FB2F0`; the `approved` Timeline chip `#C0A3F5` (graph palette index 5) while
the `success` chip stays `#F2C879` (the graph's tertiary role), so a step chip
agrees with the graph. `logcat` after a fresh launch had 0 `FATAL EXCEPTION` /
`E AndroidRuntime` lines.
- **APK publish.** `app/build/outputs/apk/debug/app-debug.apk` copied to
`…/artifacts/72/1/pipelines-debug-wip-24584d8.apk` (`24584d8` = `git rev-parse
--short HEAD`); `curl -I
http://10.0.0.249:8080/artifacts/72/1/pipelines-debug-wip-24584d8.apk` returned
`HTTP/1.1 200 OK`, `Content-Type: application/vnd.android.package-archive`,
`Content-Length: 18009527`, and a streamed `GET | shasum -a 256` matched.
## Last-run facts on every pipeline row (16 Oct 2026)
`android/` only. No server field was added: the whole run history already arrives
from `list_runs` (`internal/pipeline/runs.go`, id DESC), so the join is
client-side.
- **Pure join.** `ui/screens/PipelineLastRun.kt` adds `pipelineRunBadges(runs, now)`,
which folds the history onto a `Map<Long, PipelineRunBadge>` keyed by
pipeline id with `runId`, `state` (`runStateOf`), `ranAgo` and `duration`.
Recency comes from the run timestamps, not the input order — the higher run id
breaks an exact tie (or a missing/blank `created_at`), so an unsorted or
partial response is still correct. `PipelineRunBadge.metaLine()` formats
`ago · duration · run N` and drops any fragment that is genuinely absent (a
still-running run has no `finished_at`); it never prints a blank separator.
`formatRanAgo` mirrors the `formatDuration` integer rhythm (`just now`, then
`Nm ago`/`Nh ago`/`Nd ago`) and clamps clock skew to `just now`. A pipeline with
no run is simply absent from the map and the row prints the explicit
`NO_RUNS_RECORDED`
("no runs recorded") instead of a blank line. The last-run line is withheld
until `runsState.data != null` (`runsKnown`), so a not-yet-loaded history never
makes the false "no runs recorded" claim.
- **Row.** `PipelineListScreen.kt` refreshes runs alongside pipelines, anchors
"now" once per composition (`remember`), and renders the chip + meta line in a
`Row` under the unchanged title/secondary lines; the selected-row highlight is
untouched.
- **Tests.** `test/.../PipelineLastRunTest.kt` (10 cases) covers most-recent-wins
on unsorted input, no runs, unknown pipeline id, equal timestamps, an
unparseable timestamp, an unknown status word (`RunState.Unknown`, id still
rendered), each `formatRanAgo` scale plus blank/bad input, and the
`NO_RUNS_RECORDED` wording.
Verified on this tree (macOS, JDK 17 from Homebrew `openjdk@17`, Gradle 9.7.1,
`ANDROID_HOME=/Users/alan/Library/Android/sdk`):
- `gradle :app:testDebugUnitTest` → **153 tests, 0 failures, 0 errors, 0
skipped** (`PipelineLastRunTest` 10/10).
- `gradle :app:assembleDebug --rerun-tasks --no-build-cache` succeeded →
`app-debug.apk` **17,863,337 bytes**, sha256
`b22550660c1ce9f42719eb5a32a296055d9f3df97fa0fd94bb26fa3868730506`. This is a
full rebuild of the current tree; the review's blocker was that the earlier
published `artifacts/83/1/pipelines-debug-wip-5444390.apk` (17,997,811 bytes,
sha256 `0fb07207…`) was a different revision of `PipelineListScreen.kt`, so it
has been rebuilt and republished (see below).
- Screenshots on `emulator-5556` (`FoldB_API_36`, 2208x1840, density 420, dark
mode) with `android/scripts/capture_png.sh -s emulator-5556`: the narrow window
via `adb shell wm size 1080x2340`, the wide window at the default 2208x1840
(`wm size reset`). Both show the running run omitting its duration, the failed
and canceled rows carrying `ago · duration · run N`, and pipeline id 3 "Plan,
implement, review" printing `no runs recorded`.
- **APK publish.** Copied to
`…/artifacts/83/3/pipelines-debug-wip-5444390.apk` (`5444390` = `git rev-parse
--short HEAD`). `curl -I
http://10.0.0.249:8080/artifacts/83/3/pipelines-debug-wip-5444390.apk` returned
`HTTP/1.1 200 OK`, `Content-Type: application/vnd.android.package-archive`,
`Content-Length: 17863337`, and a streamed `GET | shasum -a 256` returned the
same `b2255066…` as the local file. The same APK was installed on the emulator
and the pulled installed `base.apk` hashed to `b2255066…`, so the reviewed
source is what was actually rendered.
## Remembered sort options for the pipelines and runs lists (16 Oct 2026)
Both list top bars gained a sort control that opens the choices plus a Reset, and
the choice is remembered per list across restarts. `android/` only; nothing in
the Pipelines server, its Go source, the Docker/compose files or the installer was
touched, no dependency was added (the icons come from the already-declared
`material-icons-extended`), 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`).
- **Pure comparators.** `ui/screens/ListSort.kt` defines the `PipelineSort`
(`ServerOrder` default, `NameAsc`, `NameDesc`, `RecentRun`, `FewestStages`,
`MostStages`) and `RunSort` (`NewestFirst` default, `OldestFirst`,
`LongestDuration`, `ShortestDuration`, `PipelineName`, `Status`) enums plus one
pure `pipelineComparator`/`runComparator` per sort and the `sortPipelines`/
`sortRuns` helpers. Every comparator ends in an explicit tie-break, so equal
primary keys always order the same way; a blank/unparseable timestamp and a run
with no recorded duration (still executing) sort last regardless of direction
instead of crashing. `ServerOrder` is a zero comparator, so the stable sort
preserves the server's own order exactly. `RecentRun` uses the shared
per-pipeline latest-run fold (`latestRunByPipeline`, extracted from the
last-run badge join in `PipelineLastRun.kt`) rather than folding the history
twice.
- **Shared time helpers.** `ui/Format.kt` gained `parseInstant` (moved out of
`PipelineLastRun.kt`) and `durationSeconds`; the existing `formatDuration` now
delegates to `durationSeconds`, so the printed duration and the sort key can
never disagree.
- **Shared control.** `ui/components/SortMenu.kt` is the one top-bar control both
screens use: an `IconButton` (its own glyph and content description, so it
cannot collide with the adjacent Refresh action or a future search entry point)
opening a `DropdownMenu` of the options — the active one carries a leading
check glyph, not colour alone — then a divider and Reset. It has no geometry
literals and anchors correctly at both window widths. The glyph is
`Icons.AutoMirrored.Filled.Sort` (the RTL-aware form, so no `Icons.Default.Sort`
deprecation warning at build time and the arrow mirrors correctly).
- **Persistence.** `data/SettingsRepository.kt` stores each choice as its stable
storage key (`pipeline_sort`, `run_sort`) with a `StateFlow`, exactly like the
server URL/workspace; `AppViewModel` exposes them and their setters. The list
screens resolve the stored string with `PipelineSort.fromStorage`/
`RunSort.fromStorage`, which fall back to the default for a stale, unknown or
blank value (the repository stays unaware of the UI enums).
- **Grouping.** `groupRunsByDay` now takes the ordering comparator and preserves
the order it produces (the default is still newest first, so the default output
is unchanged); the run list groups by day in that order and sorts within a day
by the same comparator.
Verified on this tree (macOS, Homebrew JDK 25 (`openjdk@25`), Gradle 9.7.1,
`ANDROID_HOME=/Users/alan/Library/Android/sdk`, `--offline`):
- `gradle --offline :app:testDebugUnitTest --rerun-tasks` → the 21 test-result XMLs
aggregate to **167 tests, 0 failures, 0 errors, 0 skipped** (the new
`ListSortTest` has 13 cases covering the storage fallback for both enums, server
order, case-insensitive name/stage sorts with their id/name tie-breaks,
recent-run no-run-last and run-id tie-breaks, newest/oldest with unparseable
timestamps last, duration longest/shortest with a still-executing run last and
equal-duration tie-break, pipeline-name/status sorts, and that equal keys order
identically whatever the input order; `RunGroupingTest` gained an explicit-order
case). `compileDebugKotlin` emits no warnings.
- `gradle --offline :app:assembleDebug --rerun-tasks --no-build-cache` (a full
rebuild, so the published binary is exactly this tree) succeeded →
`app-debug.apk` **17,879,721 bytes**, sha256
`cb68fbb13e469e81c15837ba95314a2ab40f1f29f4769e4a615bbc0ce4636a30`.
- On `emulator-5556` (`FoldB_API_36`, 2208x1840, density 420, dark mode) 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` (validated PNG, named display
id) into `…/artifacts/87/1/`. The live server's pipeline set churns while the
maintenance workflow runs, so the concrete names differ between captures, but
each ordering was read back from the accessibility tree:
- Wide (2208x1840 ≈ 841dp): tapping `Sort pipelines` opened the six options plus
`Reset` (`01_wide_pipelines_sort_open.png`); choosing `Name Z–A` reordered the
list to descending names and stored `pipeline_sort=name_desc`
(`02_wide_pipelines_name_za.png`). `Sort runs` opened the six run options plus
`Reset` (`03_wide_runs_sort_open.png`); `Oldest first` showed run 1 → 2 → 3 and
stored `run_sort=oldest_first` (`04_wide_runs_oldest_first.png`). The sort icon
and the adjacent `Refresh` stay separate actions at both widths (the icon's own
`Sort pipelines`/`Sort runs` content description sits left of `Refresh …`).
- **Persistence proof.** After setting pipelines `Name Z–A` and runs
`Oldest first`, `run-as net.awan.pipelines cat shared_prefs/pipelines_settings.xml`
showed `pipeline_sort=name_desc`, `run_sort=oldest_first`. `am force-stop
net.awan.pipelines` (verified `pidof` empty) then `am start` and a fresh
`uiautomator dump` showed the pipelines list still in descending-name order
(`05_wide_pipelines_name_za_after_relaunch.png`) and the runs list still oldest
first, run 1 → 2 → 3 (`06_wide_runs_oldest_first_after_relaunch.png`), with no
interaction.
- `Reset` on the pipelines menu restored the server order (id 1 → 5 → 11 → 6 →
4 → 9 → 3) and stored `pipeline_sort=server_order`; `Reset` on the runs menu
restored `run_sort=newest_first` and run 87 → 86 → 85 → 84 → 83 → 82
(`10_narrow_runs_reset_newest_first.png`).
- Narrow (`adb shell wm size 1080x2340` ≈ 411dp; `wm size reset` afterwards):
both `Sort pipelines` and `Sort runs` opened their menus
(`07_narrow_runs_sort_open.png`); `Status` ordered Canceled → Failed → Failed …
and stored `run_sort=status` (`08_narrow_runs_status_sort.png`); `Most recent
run` ordered the rows by recency 10h → 3d → 3d → 4d → 4d → 5d and put the
runless pipeline (`no runs recorded`) last, storing `pipeline_sort=recent_run`
(`09_narrow_pipelines_recent_run.png`).
- **Stale-key tolerance on device.** With `pipeline_sort` and `run_sort` set to
`garbage_key` in `shared_prefs/pipelines_settings.xml` (verified via `run-as …
cat`, then replaced by push + `run-as … cp`) and the app force-stopped and
relaunched, the pipelines list came back in the server's order (id 1 → 5 → 11 →
6 → 4 → 9 → 3, `11_narrow_pipelines_stale_key_falls_back_to_server_order.png`)
and the runs list in newest-first (run 87 → 86 → 85), with no crash.
- `adb -s emulator-5556 logcat -d | grep -c 'FATAL EXCEPTION'` and `… | grep -c
'E AndroidRuntime'` each returned 0; no run was started from the app.
- **APK publish.** `app-debug.apk` was copied to
`~/.local/share/pipelines/data/artifacts/87/1/pipelines-debug-wip-3480461.apk`
(`3480461` = `git rev-parse --short HEAD`); `shasum -a 256` matched. `curl -I
http://10.0.0.249:8080/artifacts/87/1/pipelines-debug-wip-3480461.apk` returned
`HTTP/1.1 200 OK`, `Content-Type: application/vnd.android.package-archive`,
`Content-Length: 17879721`, and a streamed `GET | shasum -a 256` returned the
same `cb68fbb1…` as the local file. The deterministic full-rebuild APK was
installed on `emulator-5556` (`adb -s emulator-5556 install -r`) and the pulled
installed `base.apk` hashed to `cb68fbb1…`, so the reviewed source is what was
actually rendered. At 17.1 MiB it 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` was not run (its only reported issues
are the two pre-existing `NewApi` errors for `android:windowLightNavigationBar`);
a real hardware fold to the cover display was not exercised (narrow was produced
with `wm size`); no before/after baseline build was captured, since the change is
additive and the default orders are asserted unchanged by the `ServerOrder`/
`NewestFirst` unit tests.
## Filters for the runs and pipelines lists (16 Oct 2026)
Both list top bars gained a filter control, remembered per list across restarts
like the sort. `android/` only; nothing in the Pipelines server, its Go source,
the Docker/compose files or the installer was touched, no dependency was added
(the one new glyph, `Icons.Default.FilterList`, is from the already-declared
`material-icons-extended`), 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`).
- **Pure predicates.** `ui/screens/ListFilter.kt` defines `RunTimeRange`
(`AnyTime` default, `Today`, `Last7Days`, `Last30Days`), `RunPresence`
(`Any` default, `HasRuns`, `NoRuns`) and the `RunFilters`/`PipelineFilters`
data classes plus one pure predicate per facet (`runMatchesStatuses`,
`runMatchesPipeline`, `runMatchesTimeRange`, `pipelineMatchesPresence`,
`pipelineMatchesLastRunStatus`) and the AND-combining `filterRuns`/
`filterPipelines`. A default filter narrows nothing; an empty status set means
"any status". The status options are the server's own run vocabulary
(queued/running/succeeded/failed/canceled/interrupted), not the app-only
`active`/`unknown` buckets. A time window is inclusive calendar days ending
today (last 7 = today + the six days before), and a blank, unparseable or
future-dated timestamp never matches a finite window. A pipeline with no run
has no last-run status, so a selected status never matches it. `fromStorage`
tolerates stale/unknown/blank values by returning the default, and
`encodeRunStates`/`decodeRunStates` round-trip the status set as the server
status words in ordinal order.
- **Runs list.** Status (multi-select), pipeline (single-select from the
distinct pipelines already present in the run history, named by their runs, so
no extra fetch) and the time range, combined with AND.
- **Pipelines list.** The existing name search stays a separate field; the new
filter adds has-runs / no-runs and the most-recent run's status (multi-select).
Both pipeline facets depend on the run history, so `filterPipelines` leaves the
list unfiltered until that history is known rather than briefly hiding every
row.
- **Shared control.** `ui/components/FilterMenu.kt` is the one top-bar control
both screens use: an `IconButton` carrying a numeric active-filter count badge
(so "filters active" is never colour alone) opening the caller's sections plus
a divider and one Clear filters action (disabled when nothing is active). Its
`optionContent` slot receives a `dismiss` callback, so single-select entries
close the menu while multi-select toggles keep it open; `FilterCheckItem` is
the shared leading-check row. It has no geometry literals and anchors
correctly at both window widths.
- **Empty states.** `ui/components/States.kt`'s `EmptyState` gained optional
`actionLabel`/`onAction`. Both lists now distinguish "nothing exists" (no
action) from "nothing matches the current filters" (a Clear filters action);
the pipelines list also says when the name search and the filters together
match nothing. The clear action resets that list's filters (and, on Pipelines,
the search) without touching the other list.
- **Persistence.** `data/SettingsRepository.kt` stores each facet under its own
stable key (`run_filter_statuses`, `run_filter_pipeline`,
`run_filter_time_range`, `pipeline_filter_presence`,
`pipeline_filter_run_statuses`) with a `StateFlow`, exactly like the sorts;
`AppViewModel` exposes them and their setters. The screens resolve the stored
strings with `RunFilters.fromStorage`/`PipelineFilters.fromStorage` (the
repository stays unaware of the UI enums).
- **Shared time helper.** The run screen's file-private `runDate` was removed in
favour of `ListFilter.kt`'s `runLocalDate`, so the day-grouping label and the
time-range predicate share one parse. `groupRunsByDay` is unchanged.
Verified on this tree (macOS, Homebrew JDK 25 (`openjdk@25`), Gradle 9.7.1,
`ANDROID_HOME=/Users/alan/Library/Android/sdk`, `--offline`):
- `gradle --offline :app:testDebugUnitTest --rerun-tasks` → the 22 test-result
XMLs aggregate to **183 tests, 0 failures, 0 errors, 0 skipped** (up from 167;
the new `ListFilterTest` has 16 cases covering stored-value parsing/fallback,
encode/decode round-trip and garbage tolerance, empty-status "any", the status
union, pipeline id vs any, the inclusive time windows and blank/future
timestamps, the AND combination of every facet, presence has/no-runs, last-run
status excluding runless pipelines, the `runsKnown` guard, and the
distinct/sorted pipeline options).
- `gradle --offline :app:assembleDebug --rerun-tasks --no-build-cache` (a full
rebuild, so the published binary is exactly this tree) succeeded →
`app-debug.apk` **17,912,489 bytes**, sha256
`eaa34c0b030511c2e4de1964dc4e905e62e822e876b5c0128bfff4d918933fc5`.
- On `emulator-5556` (`sdk_gphone16k_arm64`, 2208x1840, dark mode) 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` (validated PNG, named display
id) into `…/artifacts/89/1/`:
- Selecting status `failed` narrowed the runs list to the failed runs and
showed the badge `1` (`01_runs_filtered_failed.png`), read back from the
accessibility tree.
- The runs `Filter runs` menu opened with its Status, Pipeline and Time range
sections, the active-count badge and `Clear filters`
(`02_runs_filter_menu_open.png`).
- **Filtered-empty state.** Adding pipeline `Complete a Task` to the `failed`
status matched run 43, but the contradictory `running` status (no `Complete
a Task` run is running) yielded no match: the list showed `No runs match the
current filters.` with a `Clear filters` button and badge `2`
(`03_runs_filtered_empty.png`); the button restored the full list and removed
the badge.
- The pipelines `Filter pipelines` menu carries the Runs (Any/Has runs/No runs)
and Last run status sections, the badge and `Clear filters`
(`05_pipelines_filter_menu_open.png`). `Has runs` + last-run status
`succeeded` narrowed the list to its succeeded-last-run pipelines
(`04_pipelines_filtered_has_runs_succeeded.png`); `No runs` + last-run status
`succeeded` is contradictory and showed `No pipelines match the current
filters.` with `Clear filters` and badge `2`
(`06_pipelines_filtered_empty.png`); the button restored the list and cleared
only the pipelines filter (the runs filter was left intact).
- **Persistence proof.** With runs status `failed` and pipelines `has_runs` +
last-run status `succeeded`, `run-as net.awan.pipelines cat
shared_prefs/pipelines_settings.xml` showed `run_filter_statuses=failed`,
`pipeline_filter_presence=has_runs`, `pipeline_filter_run_statuses=succeeded`.
`am force-stop net.awan.pipelines` (verified `pidof` empty) then `am start`
and a fresh `uiautomator dump` showed the pipelines list still narrowed with
badge `2` (`07_pipelines_filtered_after_relaunch.png`) and the runs list still
filtered to `failed` with badge `1`
(`08_runs_filtered_after_relaunch.png`), with no interaction.
- `adb -s emulator-5556 logcat -d | grep -c 'FATAL EXCEPTION'` and `… | grep -c
'E AndroidRuntime'` each returned 0; no run was started from the app.
- **APK publish.** `app-debug.apk` was copied to
`~/.local/share/pipelines/data/artifacts/89/1/pipelines-debug-wip-1c925d7.apk`
(`1c925d7` = `git rev-parse --short HEAD`); `shasum -a 256` matched. `curl -I
http://10.0.0.249:8080/artifacts/89/1/pipelines-debug-wip-1c925d7.apk`
returned `HTTP/1.1 200 OK`, `Content-Type:
application/vnd.android.package-archive`, `Content-Length: 17912489`, and a
streamed `GET | shasum -a 256` returned the same `eaa34c0b…` as the local file.
The deterministic full-rebuild APK was installed on `emulator-5556`
(`adb -s emulator-5556 install -r`) and the pulled installed `base.apk` hashed
to `eaa34c0b…`, so the reviewed source is what was actually rendered. At
17.1 MiB it 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` was not run; a real hardware fold to
the cover display was not exercised (all captures were at the inner panel's
2208x1840 width, so no narrow-width capture of the filter menu was taken); the
time-range facet was unit-tested but not exercised on device, and no before/after
baseline build was captured, since the change is additive and the default filters
are asserted to narrow nothing by the unit tests.
### Filter menu overflow and accessibility (16 Oct 2026)
A UI review of the pass above found the runs `DropdownMenu` grew unbounded with
the distinct-pipeline count (N=8 made it fill the whole window), clipping the
`Clear filters` item under the bottom gesture inset, and that neither the
active-filter count nor the checked facets were exposed to accessibility. Fixed
in `ui/components/FilterMenu.kt` only (`android/`, no new dependency):
- **Bounded menu.** `filterMenuMaxHeight(screenHeightDp)` caps the menu at
`0.85 ×` the window height (window-derived, like the graph's height helpers, so
no new geometry literal), so the menu scrolls internally instead of growing
past the window as `N` rises.
- **Reset always visible.** The single `Clear filters` action is now a leading
header row (`Filters` + the reset `TextButton`, disabled when nothing is
active), so it is fully in view on open and never below the fold or clipped.
- **Above the navigation inset.** A trailing spacer of
`WindowInsets.navigationBars` bottom padding keeps the last option clear of the
gesture area at maximum scroll.
- **Accessible state.** The icon's description now folds in the count
(`filterMenuDescription`, e.g. "Filter runs, 2 filters active"), and
`FilterCheckItem` exposes `toggleableState` plus `Role.Checkbox`, so TalkBack
announces the count and which facet is checked.
Re-verified on this tree (Homebrew JDK 25, Gradle 9.7.1,
`ANDROID_HOME=/Users/alan/Library/Android/sdk`, `--offline`):
- `gradle --offline :app:testDebugUnitTest --rerun-tasks` → **185 tests, 0
failures** (new `FilterMenuTest`: the height helper's proportional/positive
growth and the description's 0/1/2/negative wording).
- `gradle --offline :app:assembleDebug` succeeded → `app-debug.apk` **18,005,500
bytes**, sha256 `7351c13b…`.
- On `emulator-5556` (2208x1840, density 420, dark mode) against
`ws://10.0.2.2:8080/connect`, captured with `android/scripts/capture_png.sh -s
emulator-5556` into `…/artifacts/89/4/`:
- The runs menu now has window `[1210,75]–[1945,1639]` (1564px = the 596dp cap),
ending ~138px above the gesture exclusion (y=1777); `Filters`/`Clear filters`
sit at the top (y=133–186) and after four swipes the last item `Last 30 days`
is at y=1466–1519, fully visible with the nav spacer below it
(`02_runs_filter_menu.png`).
- `uiautomator dump` reports the runs filter rows `checkable=true` with the
selected row `checked=true` (`Any time`), and the icon `content-desc` is
`Filter runs, 2 filters active` / `Filter runs, 1 filter active` matching
the badge (`03_runs_filtered_failed.png`, `01_runs_filtered_empty.png`).
- The pipelines menu (`Filters`/`Clear filters` at the top, `Runs` and `Last run
status` sections) is `[1542,93]–[1945,1622]`, also above the inset
(`04_pipelines_filter_menu.png`); `Has runs` + last-run `succeeded` filtered
the list (`05_…png`), `No runs` + `succeeded` showed `No pipelines match the
current filters.` with `Clear filters` (`06_…png`).
- **Persistence proof.** `am force-stop net.awan.pipelines` (verified `pidof`
empty) then `am start` and a fresh dump showed the pipelines screen still
filtered (badge `2`) and the runs list still `Filter runs, 1 filter active`
(`07_…png`, `08_…png`), with no interaction.
- `adb -s emulator-5556 logcat -d | grep -c 'FATAL EXCEPTION'` and `… | grep -c
'E AndroidRuntime'` each returned 0.
- **APK publish.** `app-debug.apk` copied to
`…/artifacts/89/4/pipelines-debug-wip-1c925d7.apk` (`1c925d7` = `git rev-parse
--short HEAD`); `shasum -a 256` matched. `curl` against
`http://10.0.0.75:8080/artifacts/89/4/pipelines-debug-wip-1c925d7.apk` returned
`HTTP 200`, `Content-Type: application/vnd.android.package-archive`,
`Content-Length: 18005500`.
Not verified: the **"nothing exists"** variants (`No pipelines are defined on this
server.` / `No runs have been recorded yet.`) were not captured — the live server
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. (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".
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.
## 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 filled arrowhead proportional to its
own width (`edgeArrowHeadSize`, i.e. `strokeWidth * ARROW_HEAD_SCALE` with
`ARROW_HEAD_SCALE = 4`: 28f for this 7f pass/fail stroke, 12f for a normal
executed route), 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.
## A modern visual language for the workflow graph (16 Oct 2026)
The graph read like an old terminal diagram (flat fills, hard outlines, sharp
right angles, `[bracketed]` all-caps labels, small arrowheads, raw text over the
canvas). This pass gives it a modern surface language without changing any
information or any hue. `android/` only; no dependency was added (the graph's
corner comes from the theme's own shape scale), 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 only modified tracked files are the four under `android/` shown in
`git status --short` below; the capture runs also leave untracked scratch
directories at the repo root (`.ui_review*/`), so a bare `git status --short` is
not clean and the "nothing outside `android/` touched" claim is only about the
change itself, not those untracked captures.
- **Nodes are rounded and tonal, terminals are pills.** `WorkflowGraph.kt` reads
`MaterialTheme.shapes.medium` once per composition for a stage's corner and
gives a terminal a full pill (`height/2`), so a terminal is visibly not a stage.
The fill is a *tonal surface*: the new pure `tonalFill(surface, accent,
fraction)` blends a raised `surfaceContainerHigh` with a subtle fraction of the
node's semantic colour (`NEUTRAL_TINT`/`KIND_TINT` for a stage by kind,
`TERMINAL_TINT` for a terminal's success/error hue), and the hard outline is
replaced by a soft `outlineVariant` border (`NODE_BORDER`, strengthened for a
selected stage with `NODE_BORDER_SELECTED`). Every kind's hue survives; the
terminal fill now genuinely tints the outcome hue.
- **Type comes from the app's scale.** The node name uses the app's `cardTitle`
role and the outcome labels its `label` role (no ad-hoc `13.sp`/`11.sp`), with
the theme's own line height and letter spacing; the `[brackets]` and the
all-caps `SUCCESS`/`FAILURE` are gone — the graph shows `Success`/`Failure` in
the terminal's own colour (the new pure `nodeDisplayLabel`; the shared
`GraphSemantics.nodeLabel` the TUI-mirroring panes use is untouched).
- **Edges are smoother, with one control offset and matched arrowheads.** The
stored route is still the axis-aligned polyline (`routePoints`, and its layout
tests, are unchanged), but drawing now rounds every right-angle bend with the
single `ROUTE_CORNER_RADIUS` control offset (the pure `cornerCutRadius` clamps a
short adjacent segment to half its length so two cut-backs can never meet),
uses `StrokeCap.Round`/`StrokeJoin.Round`, and scales the filled arrowhead to
the line with one `ARROW_HEAD_SCALE` (`edgeArrowHeadSize = edgeStrokeWidth *
ARROW_HEAD_SCALE`). Labels sit on a rounded *tonal chip* (`tonalFill` of the
raised surface with the label's own colour) instead of raw text over the canvas.
- **More breathing room, from named tokens.** Node width/height, the horizontal
gap, the graph padding, the per-edge lane spacing and track step, and the
terminal-row gap are now named dp tokens (no inline geometry literals); the
values grew so nodes and the per-edge tracks have visibly more room, and the
collapsed-panel floor grew to `320.dp` to still fit a 4-stage graph with its
terminal row.
- **Nothing semantic changed.** The executed/not-executed structural split (solid
full-colour + arrowhead vs dashed muted + no arrowhead; filled vs hollow/dashed
node), the pass/fail emphasis (heavier, same-hue, more-saturated stroke with the
largest head), the selected-stage invert, ntfy/custom/model kind tints, the
`error*` fallback label, the legend, the active halo/elapsed badge, the flow
dots and the screen-reader description are all kept. `graphColors` and
`outcomeColor` keep their field names, so the Timeline step chips that share
them still agree with the graph.
Verification (macOS, Homebrew JDK 25 `openjdk@25`, Gradle 9.7.1,
`ANDROID_HOME=/Users/alan/Library/Android/sdk`, `--offline`):
- `gradle --offline :app:testDebugUnitTest --rerun-tasks` → `BUILD SUCCESSFUL`;
the test-result XMLs aggregate to **207 tests, 0 failures, 0 errors, 0
skipped** (4 new: `WorkflowGraphTest` for the readable node labels, the
arrowhead proportional to its stroke and the corner-cut clamp, and
`GraphPaletteTest` for `tonalFill`). `compileDebugKotlin` emitted no warnings
(the deprecated `quadraticBezierTo` was replaced by `quadraticTo`).
- `gradle --offline :app:assembleDebug` → `BUILD SUCCESSFUL`; `app-debug.apk` is
**17,928,873 bytes**, sha256
`ba5bcc467989425b69aad2ae70799c0cf4d9eaf54be30243b4631fb7e94916b3`.
- On `emulator-5556` (`FoldB_API_36`, dark mode) against the live server
`ws://10.0.2.2:8080/connect`, driven with `adb shell input` and `uiautomator
dump`. Every capture was written with `android/scripts/capture_png.sh -s
emulator-5556` (validated PNG magic bytes, named display id) into
`~/.local/share/pipelines/data/artifacts/108/1/`. The three cases are a
definition-only graph (pipeline 3 "Plan, implement, review", 4 stages), a
partly executed run (run 94, failed at `committer`: `implementer`/`reviewer`/
`ui_reviewer` and the failed `committer` executed, `Success` not) and its
selected (current) stage. Widths: **wide** 2208x1840 @ density 420 (≈841dp) and **narrow**
1080x1920 @ density 480 (≈360dp); **2x** doubles the pixel size and density
(4416x3680 @840 and 2160x3840 @960), so the same dp layout is rendered at
double the pixels. "Before" is a clean `git archive 8b39c08` tree (never a
working-tree stash) built and installed; "after" is this tree.
- `{before,after}_wide_1x_definition.png`, `{before,after}_wide_2x_definition.png`,
`{before,after}_narrow_1x_definition.png`, `{before,after}_narrow_2x_definition.png`
— the definition graph; before shows `[planner]`/`[FAILURE]` rectangular
nodes with hard 90° routes and raw labels, after shows rounded, tonal nodes,
pill terminals and chipped labels.
- `{before,after}_wide_1x_run.png`, `{before,after}_wide_2x_run.png`,
`{before,after}_narrow_1x_run.png`, `{before,after}_narrow_2x_run.png` — run
94; `implementer`/`reviewer`/`ui_reviewer` were visited and the failed
`committer` was visited too (it was entered and then failed), so all four
stages are filled and the selected `committer` inverts (light `inverseSurface`
fill, solid primary border); the executed `success`/`error` routes are the
boldest lines, and the not-executed `Success` terminal is hollow with a dashed
border (the `Failure` terminal, reached by the executed `error` edge, is
filled). The invert applies only to an *executed* stage; a selected
*not-executed* stage is instead drawn hollow with a dashed primary border
(`drawNodes`' not-executed branch), so selection is legible in either state.
- `{before,after}_{wide,narrow}_{1x,2x}_selected.png` — a 2x crop of the
selected `committer` node (its primary border and rounded shape after vs the
sharper `[committer]` before).
- `compare_wide_1x_definition.png`, `compare_wide_1x_run.png`,
`compare_narrow_1x_definition.png`, `compare_narrow_1x_run.png` — stacked
before/after sheets for the 1x narrow and wide cases.
- `adb -s emulator-5556 logcat -d` contained 0 `FATAL EXCEPTION` and 0 `E
AndroidRuntime` lines after a fresh launch and a Runs/Graph sweep; no run was
started from the app. The emulator's display was reset to its native
2208x1840 @420 afterwards.
- **APK publish.** `app-debug.apk` was copied to
`~/.local/share/pipelines/data/artifacts/108/1/pipelines-debug-wip-8b39c08.apk`
(`8b39c08` = `git rev-parse --short HEAD`); `shasum -a 256` matched. `curl -I
http://10.0.0.249:8080/artifacts/108/1/pipelines-debug-wip-8b39c08.apk` (LAN
address from `ipconfig getifaddr en0`) returned `HTTP/1.1 200 OK`,
`Content-Type: application/vnd.android.package-archive`, `Content-Length:
17928873`, and a streamed `GET | shasum -a 256` returned the same `ba5bcc46…`
as the local file. At 17.1 MiB it 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` (its only reported issues are the two
pre-existing `NewApi` errors for `android:windowLightNavigationBar`); the light
theme; the active/animating halo, elapsed badge and flow dots (the run 94 graph
is a finished run, so it renders settled — those live-run visuals are unchanged
by this pass and are covered by `GraphMotionTest`); a real hardware fold
(narrow/wide were produced with `wm size`/`wm density`); and a greyscale pass (the
executed/not-executed distinction is still structural, but only colour captures
were taken). The crops are derived from the full captures with PIL; the
full-size PNGs above are the primary evidence.
### Review follow-up and re-verification (16 Oct 2026)
A follow-up pass addressed the review findings on the code above. The rendered
surface is unchanged (the token conversion maps the former pixel literals onto the
same device-scaled geometry), and `android/` is still the only modified tree; the
untracked `.ui_review*/` scratch captures at the repo root are not part of it.
- **Duplication.** The two near-identical rounded tonal chips (the edge outcome
labels and the active-stage elapsed badge) are now one
`DrawScope.drawTonalChip(textTopLeft, textSize, color)` helper; both call sites
pass the accent tinted into `labelBackground`, so the chip geometry lives once.
- **Redundant geometry.** `cornerCutRadius` now takes the adjacent segment lengths
the caller has already measured (`cornerCutRadius(inLength, outLength, radius)`),
so `roundedRoutePath` computes each corner's two `hypot`s once instead of twice.
- **Redundant width.** The new pure `arrowHeadSizeFor(strokeWidth)` is the one
arrowhead-from-stroke mapping; `drawEdgePaths` passes the width it has just
computed (`arrowHeadSizeFor(width)`) instead of re-deriving it, and
`edgeArrowHeadSize` delegates to the same function.
- **Geometry tokens.** `ROUTE_CORNER_RADIUS` (`7.dp`) and the chip
`EDGE_CHIP_PAD_X`/`EDGE_CHIP_PAD_Y`/`EDGE_CHIP_CORNER` (`2.dp`/`1.dp`/`2.dp`) are
dp tokens like the rest of the new graph geometry, not raw pixel literals.
Re-run checks (same environment as above):
- `gradle --offline :app:testDebugUnitTest` → `BUILD SUCCESSFUL`; the test-result
XMLs aggregate to **207 tests, 0 failures, 0 errors, 0 skipped** (the
`cornerCutRadius` test now exercises the length-based clamp).
- `gradle --offline :app:compileDebugKotlin --rerun-tasks` → `BUILD SUCCESSFUL`
with no `w:` warnings.
- `gradle --offline :app:assembleDebug --rerun-tasks` → `BUILD SUCCESSFUL`;
`app-debug.apk` is **17,928,873 bytes**, sha256
`ab99e734b0b190294ebfad8d342caf599286cefda23a0faf39f0244496e3af1a`. (A full
`--rerun-tasks` rebuild is byte-reproducible — two consecutive runs produced
this same hash — whereas incremental packaging is not, so the published APK is
the `--rerun-tasks` one.)
- Smoke captures on `emulator-5556` (native 2208x1840 @420) with the rebuilt APK
(`adb -s emulator-5556 install -r app/build/outputs/apk/debug/app-debug.apk`),
written via `android/scripts/capture_png.sh -s emulator-5556`:
`followup_wide_1x_definition.png` (the pipeline 3 definition graph) and
`followup_wide_1x_run106.png` (run 106, all four stages visited) in
`~/.local/share/pipelines/data/artifacts/108/3/`. Both render the rounded tonal
nodes, pill terminals and chipped labels; run 106 shows the executed stages
filled, the selected `committer` inverted (light fill, solid primary border) and
the not-executed `Failure` terminal hollow with a dashed border — the same
structural executed/not-executed split, unchanged. `adb -s emulator-5556 logcat
-d | grep -cE 'FATAL EXCEPTION|E AndroidRuntime'` is `0`; the display was not
resized (still native 2208x1840 @420).
- **APK publish (this pass).** The rebuilt APK was copied to
`~/.local/share/pipelines/data/artifacts/108/3/pipelines-debug-wip-8b39c08.apk`
(`8b39c08` = `git rev-parse --short HEAD`). `curl -I
http://10.0.0.249:8080/artifacts/108/3/pipelines-debug-wip-8b39c08.apk` returned
`HTTP/1.1 200 OK`, `Content-Type: application/vnd.android.package-archive`,
`Content-Length: 17928873`, and a streamed `GET | shasum -a 256` returned the
same `ab99e734…` as the local file.
### Second review follow-up (16 Oct 2026)
Two remaining findings on the modernised graph were fixed. The rendered surface is
unchanged — the first is a same-value refactor, the second a doc-only correction —
so the before/after captures above still describe the output.
- **One label colour, not two.** `drawEdgeLabels` declared `accent` and
`textColor` holding the identical value (both `outcomeColor(...)` when the edge
executed, else `colors.labelText`); they are now the single `labelColor`, used for
both the label text and its chip tint. No pixel changes.
- **README cites the live arrowhead token.** The dated "Pass/fail edges" section
cited the removed `PASSFAIL_ARROW_HEAD_SIZE = 20f`; it now describes the current
mapping (`edgeArrowHeadSize` = `strokeWidth * ARROW_HEAD_SCALE`, i.e. 28f
pass/fail and 12f normal), matching `WorkflowGraph.kt`.
Re-verified (Homebrew `openjdk@25`, Gradle 9.7.1,
`ANDROID_HOME=/Users/alan/Library/Android/sdk`, `--offline`):
- `gradle --offline :app:compileDebugKotlin --rerun-tasks` → `BUILD SUCCESSFUL`
with no `w:` warnings.
- `gradle --offline :app:testDebugUnitTest --rerun-tasks` → `BUILD SUCCESSFUL`;
the test-result XMLs aggregate to **207 tests, 0 failures, 0 errors, 0 skipped**.
- `gradle --offline :app:assembleDebug --rerun-tasks` → `BUILD SUCCESSFUL`;
`app-debug.apk` is **17,928,873 bytes**, sha256
`c95fab884d392a2b3df6170ec2e16ccc4fdf6f1fef4e946425f5dcda56c881a7`, reproducibly
(two consecutive `--rerun-tasks` rebuilds matched).
- Smoke captures on `emulator-5556` (native 2208x1840 @420) with this APK, written
via `android/scripts/capture_png.sh -s emulator-5556`:
`followup2_wide_1x_launch.png`, `followup2_wide_1x_definition.png` (pipeline 3)
and `followup2_wide_1x_run.png` (run 109, partly executed) in
`~/.local/share/pipelines/data/artifacts/108/5/`. The definition graph renders
rounded tonal stages, pill terminals (filled `Failure`/`Success`) and chipped
labels; run 109 fills the visited stages, inverts the selected `committer`
(light fill, solid primary border) and leaves the not-executed `Failure` terminal
hollow with a dashed border. `adb -s emulator-5556 logcat -d | grep -cE 'FATAL
EXCEPTION|E AndroidRuntime'` is `0`.
- **APK publish (this pass).** The rebuilt APK was copied to
`~/.local/share/pipelines/data/artifacts/108/5/pipelines-debug-wip-8b39c08.apk`
(`8b39c08` = `git rev-parse --short HEAD`); `curl -I
http://10.0.0.249:8080/artifacts/108/5/pipelines-debug-wip-8b39c08.apk` returned
`HTTP/1.1 200 OK`, `Content-Type: application/vnd.android.package-archive`,
`Content-Length: 17928873`.
### Re-verification with a fresh before/after capture set (run 117, 16 Oct 2026)
The source is unchanged from the sections above; this pass re-ran every check on
it and produced a fresh, complete before/after capture set in
`~/.local/share/pipelines/data/artifacts/117/1/`. `android/` remains the only
modified tree (the untracked `.caps117/` scratch captures at the repo root and the
older `.ui_review*/` directories are not part of the change). No run was started
from the app, only `emulator-5556` was ever addressed, and its display was reset to
native 2208x1840 @420 at the end.
- `gradle --offline :app:assembleDebug --rerun-tasks` → `BUILD SUCCESSFUL`;
`app-debug.apk` is **17,928,873 bytes**, sha256
`c95fab884d392a2b3df6170ec2e16ccc4fdf6f1fef4e946425f5dcda56c881a7` (identical to
the "Second review follow-up" build above).
- `gradle --offline :app:testDebugUnitTest --rerun-tasks` → `BUILD SUCCESSFUL`;
the test-result XMLs aggregate to **207 tests, 0 failures, 0 errors, 0 skipped**
(the new `tonalFill`, `nodeDisplayLabel`, `arrowHeadScalesWithTheStrokeItTerminates`
and `cornerCutNeverExceedsHalfTheShorterSegment` tests included).
- **Captures.** The same four display configurations as the first pass
(`wm size`/`wm density`: wide 2208x1840 @420 and its 2x 4416x3680 @840; narrow
1080x1920 @420 and its 2x 2160x3840 @840), each for the pipeline 3
definition-only graph and the partly executed run 109 (the selected `committer`),
written with `android/scripts/capture_png.sh -s emulator-5556`:
`{before,after}_{wide,narrow}_{1x,2x}_{definition,run}.png`, the 2x-upscaled
`{before,after}_{wide,narrow}_{1x,2x}_selected.png` node crops, and the stacked
`compare_{wide,narrow}_1x_{definition,run}.png` sheets. The `before` images were
rebuilt from `HEAD` (the four tracked files stashed, `assembleDebug`, captured,
then the stash popped and the after build reproduced the same sha256); they show
the sharp-cornered flat fills, `[bracketed]` all-caps labels and thin raw-text
routes, while the `after` images show the rounded tonal stages, pill terminals
(`Failure` hollow/dashed when not executed, `Success` filled) and chipped labels.
`adb -s emulator-5556 logcat -d | grep -cE 'FATAL EXCEPTION|E AndroidRuntime'`
is `0`.
- **APK publish (this pass).** Copied to
`~/.local/share/pipelines/data/artifacts/117/1/pipelines-debug-wip-8b39c08.apk`;
`curl -I http://10.0.0.249:8080/artifacts/117/1/pipelines-debug-wip-8b39c08.apk`
returned `HTTP/1.1 200 OK`, `Content-Type: application/vnd.android.package-archive`,
`Content-Length: 17928873`.