Migrate the list and detail screens onto the geometry tokens
Replace the hardcoded paddings, spacings, sizes and offsets in the four list/detail screens and the shared components they are built from with references to the token file from the previous item, via WindowInsets or layout where those derive the value. Every replacement is value-equal, so the screens render identically at both window widths. Name the glyph sizes that cannot derive from layout as four new ICON_* tokens in ui/theme/Dimens.kt (14/18/20/24dp) and shrink the DimensTest allow-list from 30 to 24 entries: 14.dp, 18.dp and 20.dp leave because their last call site migrated, and the already-unused 32.dp, 11.sp and 13.sp entries are dropped. All adb/emulator work targeted emulator-5554 only; android/ only; no new dependency, server/Go/installer/Docker file touched, and no run started from the app. Verified: :app:assembleDebug + the full unit suite (30 result XMLs, 259 tests, 0 failures/0 errors/0 skipped), the shrunk allow-list still fails a forced raw-literal probe, and before/after screenshots of every converted screen at narrow and wide widths match near-zero.
This commit is contained in:
@@ -2336,6 +2336,84 @@ 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).
|
||||
|
||||
## The list and detail screens on the geometry tokens (16 Oct 2026)
|
||||
|
||||
`android/` only. Every replacement is value-equal, so the screens render exactly
|
||||
as before. No new dependency, no server/Go/installer/Docker file touched, no run
|
||||
started from the app, and every `adb`/emulator command targeted `emulator-5554`
|
||||
only (never `emulator-5556` or the attached Pixel).
|
||||
|
||||
- **Scope.** The four list/detail screens
|
||||
(`ui/screens/PipelineListScreen.kt`, `RunHistoryScreen.kt`,
|
||||
`PipelineDetailScreen.kt`, `RunDetailScreen.kt`) and the shared components
|
||||
they are built from (`ListRow`, `States`, `Sections`, `PaneIdentity`,
|
||||
`ConnectionBanner`, `FilterMenu`, `CodeBlock`, `RunStatus`, `DetailTabs`). The
|
||||
navigation chrome (`SlidingPaneStack`, `PipelinesApp`) and the workflow-graph
|
||||
package keep their literals.
|
||||
- **Spacing.** Every 4/8/12/16/24dp padding, gap and arrangement on those files
|
||||
now references the previous item's `SPACING_XS/S/M/L/XL` tokens (and
|
||||
`SPACING_XXS` for the 2dp chip gaps); no value changed. The 10dp dense row
|
||||
padding, the 2dp progress hairline and the `0.dp` elevations stay as reasoned
|
||||
allow-list entries because they are not on the spacing scale.
|
||||
- **Glyph sizes.** Four new tokens in `ui/theme/Dimens.kt` name the icon sizes
|
||||
that cannot derive from layout: `ICON_STATUS_DP` (14dp), `ICON_INLINE_DP`
|
||||
(18dp), `ICON_LIST_DP` (20dp) and `ICON_RAIL_DP` (24dp), used by `RunStatus`,
|
||||
`CodeBlock`, `RunHistoryScreen`, `RunDetailScreen`, `PipelineDetailScreen` and
|
||||
`DetailTabs`.
|
||||
- **The allow-list shrinks.** `ui/theme/DimensTest.kt`'s allow-list drops from
|
||||
**30 to 24 entries**: `14.dp`, `18.dp` and `20.dp` are gone because their last
|
||||
call site migrated, and the already-unused `32.dp`, `11.sp` and `13.sp` entries
|
||||
were removed. The remaining entries are the structural hairlines/zeros
|
||||
(0/2/3/6dp), the not-yet-migrated graph/app-shell values, the container sizes
|
||||
and the `sp` type values owned by `Typography.kt`.
|
||||
|
||||
Evidence (macOS, JDK 17 from Homebrew `openjdk@17`,
|
||||
`ANDROID_HOME=~/Library/Android/sdk`, Gradle 9.7.1, `--offline`):
|
||||
|
||||
- `gradle :app:assembleDebug :app:testDebugUnitTest --rerun-tasks --console=plain`
|
||||
→ `BUILD SUCCESSFUL`; `--rerun-tasks` re-ran all 30 result XMLs to **259 tests,
|
||||
0 failures, 0 errors, 0 skipped**. `app/build/outputs/apk/debug/app-debug.apk`
|
||||
is 17,995,009 bytes, sha256 `d40d7b78…`.
|
||||
- **Allow-list shrinks.** `git show HEAD:…DimensTest.kt` counts 30 entries; the
|
||||
working tree counts 24 (`14.dp`, `18.dp`, `20.dp`, `32.dp`, `11.sp`, `13.sp`
|
||||
gone, the rest re-reasoned).
|
||||
- **Enforcement proof.** Appending `private val PROBE_RAW_LITERAL = 123.dp` to
|
||||
`ui/components/ListRow.kt` made
|
||||
`gradle :app:testDebugUnitTest --tests net.awan.pipelines.ui.theme.DimensTest`
|
||||
`FAILED` with `raw dimension literals outside
|
||||
net/awan/pipelines/ui/theme/Dimens.kt:
|
||||
[net/awan/pipelines/ui/components/ListRow.kt:113: 123.dp]`; removing the line
|
||||
made the same task pass. The probe was reverted.
|
||||
- **Before/after screenshots on `emulator-5554` only** (fold AVD, 2076x2152 /
|
||||
390dpi, dark mode; narrow 1080x2340 and wide 2000x3400 via `wm size`; never
|
||||
`emulator-5556` or the attached Pixel), against the live server at
|
||||
`ws://10.0.2.2:8080/connect`, each frame captured and validated with
|
||||
`scripts/capture_png.sh -s emulator-5554`. The **before** APK was built from
|
||||
HEAD `8e49a0c` (sha256 `e50bb381…`) with the working changes stashed; the
|
||||
**after** APK from the working tree (sha256 `d40d7b78…`). Every converted
|
||||
screen was captured at both widths (Pipelines list, Runs list, pipeline
|
||||
detail, run detail): `geom-<screen>-<width>-before.png` / `-after.png` in
|
||||
`~/.local/share/pipelines/data/artifacts/122/1/`. `captures/imgdiff.py`
|
||||
reports a mean channel difference of 0.01–0.04 for both detail screens,
|
||||
0.02–0.04 for the Pipelines list and 0.04–0.12 for the Runs list, all
|
||||
confined to the status-bar clock, the live relative-time/badge text and
|
||||
thumbnails that load asynchronously; the layout itself is unchanged.
|
||||
- `adb -s emulator-5554 logcat -d` held 0 `FATAL EXCEPTION` / 0
|
||||
`E AndroidRuntime` lines; `animator_duration_scale` was left at 1; no run was
|
||||
started from the app.
|
||||
- **APK publish.** `app-debug.apk` copied to
|
||||
`~/.local/share/pipelines/data/artifacts/122/1/pipelines-debug-wip-8e49a0c.apk`
|
||||
(`8e49a0c` = `git rev-parse --short HEAD`; the working tree is uncommitted WIP
|
||||
on top of it), sha256 `d40d7b78…`. `curl -I
|
||||
http://10.0.0.249:8080/artifacts/122/1/pipelines-debug-wip-8e49a0c.apk`
|
||||
returned `HTTP/1.1 200 OK`, `Content-Type:
|
||||
application/vnd.android.package-archive`, `Content-Length: 17995009`, and a
|
||||
streamed `GET | shasum -a 256` returned the same `d40d7b78…`.
|
||||
|
||||
Not verified in this pass: `:app:lintDebug` (not run); the Runs-list and
|
||||
run-detail before/after pairs are not byte-identical because their live
|
||||
relative-time text and artifact thumbnails load asynchronously.
|
||||
|
||||
## An app-owned run-status palette (16 Oct 2026)
|
||||
|
||||
Run status had the wrong hue for its two most important states because it was
|
||||
|
||||
Reference in New Issue
Block a user