Files
pipelines/android/app
alan 2881256af3 Fix workflow-graph crashes and label layout in the Android client
Running the client on an emulator against a live server exposed real defects in the
workflow graph, all fixed here:

- DrawScope.drawText's string overload measured against the draw scope's constraints
  and threw when a node or edge label fell outside them (wide or panned graphs),
  crashing the pipeline-detail and run-detail screens. Both call sites now draw a
  pre-measured TextLayoutResult.
- The graph Canvas was not clipped, so panning drew nodes and edges over the
  'Versions' row and the 'Workflow graph' heading. The viewport now clips its
  children.
- Outcome labels overprinted when a stage had more than one outgoing edge ('error'
  over 'success'). Labels are now laid out in one row per source edge, with a
  backing rect for legibility.
- Stage columns followed an iterative rank relaxation, so graphs with a back edge
  rendered out of order (planner before reviewer). rankStages now returns
  declaration order, matching internal/tui/graph_layout.go.

Verified: :app:compileDebugKotlin, :app:assembleDebug and :app:testDebugUnitTest
succeed offline with 20 tests and 0 failures (new WorkflowGraphTest covers the
rank order and label slots), and the app was driven on the Pixel_Fold_API_36
emulator against the live server with no FATAL or Compose exception in logcat.
2026-10-13 19:23:10 +01:00
..