Draw workflow-graph edges as straight runs and give the graph a bigger panel
A user reading the graph on their phone said it was not clear what happened, and asked for the TUI's straight arrows and a larger panel. - Edges are now axis-aligned orthogonal polylines instead of Bezier curves: the stage-to-stage runs and the routes into the bottom-row #success/#failure terminals are horizontal/vertical segments joined at right angles, matching the Go TUI's routing, and every arrowhead now points along the direction of its final segment instead of the straight source-to-target chord (which pointed wrongly as soon as a route turned a corner). Routing is a pure function. - The graph panel is a sensible share of the window height on both screens instead of 360dp/340dp, and a new expand/collapse control beside 'Fit graph to view' grows it to nearly the full height. Verified: :app:assembleDebug and :app:testDebugUnitTest succeed offline with 42 tests and 0 failures (WorkflowGraphTest 15 to 23, covering the orthogonal routing and arrowhead direction), and the app was driven on the emulator with before/after screenshots of a pipeline graph, a run graph with the executed route highlighted, a panned state and the expanded panel.
This commit is contained in:
+32
-4
@@ -86,7 +86,21 @@ stops it.
|
||||
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.
|
||||
highlighted, others dimmed) 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.
|
||||
- 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
|
||||
that still fits a 4-stage graph with its terminal row. The graph's TopEnd
|
||||
control cluster pairs "Fit graph to view" with an expand/collapse toggle that
|
||||
grows the panel to about the full window height; the expanded state is stored
|
||||
in `rememberSaveable` and the panel refits on resize. Because the panel lives
|
||||
inside each screen's `verticalScroll` column, growing it only extends it below
|
||||
the fold, so expanding also requests `BringIntoViewRequester` to scroll the
|
||||
taller panel back into the visible viewport instead of leaving the graph
|
||||
centred off-screen.
|
||||
- Dark-first Material 3 theme with an app-owned colour scheme (no dynamic/
|
||||
wallpaper colour): the dark scheme is the default and the window background and
|
||||
system bars are dark so launching shows no light flash; a complete light scheme
|
||||
@@ -129,9 +143,10 @@ Verified on macOS with the host toolchain (JDK 17 from Android Studio,
|
||||
`ANDROID_HOME=/Users/alan/Library/Android/sdk`, Gradle 8.11.1 `--offline`):
|
||||
|
||||
- `:app:compileDebugKotlin`, `:app:assembleDebug` and `:app:testDebugUnitTest`
|
||||
all succeed; **34 unit tests, 0 failures** (protocol model, graph semantics,
|
||||
server URL, workflow-graph layout including the terminal row, bottom exits and
|
||||
back edges). Re-run with `--rerun-tasks` to confirm.
|
||||
all succeed; **42 unit tests, 0 failures** (protocol model, graph semantics,
|
||||
server URL, workflow-graph layout including the terminal row, bottom exits,
|
||||
back edges, orthogonal routing/axis alignment, arrowhead direction and the
|
||||
shared panel height). Re-run with `--rerun-tasks` to confirm.
|
||||
- The debug APK was installed and driven on the `Pixel_Fold_API_36` emulator
|
||||
(Android 16, `adb shell cmd uimode night yes`) against a live server at
|
||||
`ws://10.0.2.2:8080/connect` with workspace `/Users/alan/repos/pipelines`.
|
||||
@@ -140,6 +155,19 @@ Verified on macOS with the host toolchain (JDK 17 from Android Studio,
|
||||
`captures/style_pass/` (both git-ignored) and reviewed.
|
||||
- `adb logcat` for the app package contained no `FATAL EXCEPTION`, Compose or
|
||||
other runtime exception during the sweep.
|
||||
- The orthogonal-edge / resizable-panel pass was verified the same way: a
|
||||
baseline APK was built from the pre-change tree and installed, then the new
|
||||
build was installed and driven to the 4-stage pipeline-detail graph and a
|
||||
run-detail graph with the executed route highlighted. `captures/graph_pass/`
|
||||
(git-ignored) holds `pipeline_detail_before/after` and `run_detail_before/after`
|
||||
pairs plus a panned state and the expanded panel after tapping the toggle
|
||||
(`pipeline_detail_expanded_after`, `run_detail_panned_after`,
|
||||
`run_detail_expanded_after`). A review of that pass found the expanded panel
|
||||
scrolled below the fold (blank) and the PNGs prefixed by an adb stderr warning,
|
||||
so the expand now scrolls the panel into view and the after-captures were
|
||||
re-taken with a display id (`adb exec-out screencap -p -d <display-id>`) so no
|
||||
warning leaks into the files. `adb logcat` showed no `FATAL EXCEPTION` and no
|
||||
app/Compose exception during the sweep.
|
||||
|
||||
Known limitations of that run: pinch-zoom could not be driven through `adb`
|
||||
(single-touch pan only) and one portrait Fold viewport was used. A follow-up pass
|
||||
|
||||
Reference in New Issue
Block a user