Render a compact identity for covered Android panes
On a wide window, a covered pane in the stack used to render a squeezed copy of a full pane, so a covered entry showed a truncated title and a crushed tab rail. A covered pane now renders only a compact identity: a centred title plus at most one status/subtitle line, with no tab rail, list, gallery or scroll body drawn into the sliver. - SlidingPaneStack's pane lambda receives a covered flag; on a wide window a covered level composes only the new PaneIdentity, while the list, both detail screens and the stage pane early-return from their covered branch after their data-loading effects. - Adds MIN_COVERED_PANE_WIDTH_DP (112.dp); peekStripsDp shows at most budget / MIN_COVERED_PANE_WIDTH_DP covered peeks and folds the oldest levels into a single "<n> more" edge indicator rather than squeezing them below the minimum. - The fixed PEEK_BUDGET_DP (224.dp) and the constant active-pane width are unchanged; the peek tap, Back and the narrow layout keep the same behaviour. - Rewrites SlidingPaneStackTest (10 cases) for the fold rule, minimum width, constant active width and inset/geometry invariants, and records the evidence and the unreachable-fold gap in android/README.md.
This commit is contained in:
@@ -1159,3 +1159,89 @@ covered by the existing unit tests (`StageDetailSheetTest`, `FormatTest`) rather
|
||||
driven on the device; the narrow/wide gallery thumbnail failure for run 60's corrupt
|
||||
artifacts is a data issue in that run, not re-tested against a repaired copy.
|
||||
|
||||
|
||||
## Covered panes show a compact identity, with a minimum peek width (16 Oct 2026)
|
||||
|
||||
A wide-window stack no longer squeezes a full pane into each covered peek: a
|
||||
covered pane now renders only its compact identity (a title and at most one
|
||||
status/subtitle, centred in its strip) and its full body — tab rail, list,
|
||||
gallery, scroll body — is never drawn into a sliver. `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 (the debug APK was
|
||||
installed with `adb -s emulator-5554 install -r`).
|
||||
|
||||
- **Compact covered panes.** `SlidingPaneStack`'s `pane` lambda now receives a
|
||||
`covered: Boolean`; on a wide window a covered level is composed inside a box
|
||||
constrained to its visible strip, and the caller renders only
|
||||
`ui/components/PaneIdentity.kt` — a centred title plus at most one
|
||||
status/subtitle line. The list (`PipelineListScreen`/`RunHistoryScreen`), both
|
||||
detail screens and the stage pane each gained a `covered` branch that
|
||||
early-returns after their data-loading effects, so nothing heavy is composed
|
||||
into a sliver. The strip itself stays a separate, higher tappable sibling and
|
||||
the compact identity rides with the pane's own slide.
|
||||
- **A named minimum covered width, and a fold.** `MIN_COVERED_PANE_WIDTH_DP`
|
||||
(`112.dp`) is the least width a covered pane's compact identity needs.
|
||||
`peekStripsDp` shows at most `budget / MIN_COVERED_PANE_WIDTH_DP` covered peeks;
|
||||
when a stack has more covered levels than that, the oldest levels fold into a
|
||||
single edge indicator (`"<n> more"`) rather than being squeezed below the
|
||||
minimum, and the number of peeks shown shrinks instead of their width. The fixed
|
||||
budget (`PEEK_BUDGET_DP`, `224.dp`) and the constant active-pane width are
|
||||
unchanged.
|
||||
- **Unchanged behaviour.** Tapping a covered pane's peek calls the same
|
||||
`onPopTo(level)`, closing everything to its right; Back/gesture/back arrow and
|
||||
the narrow (no-peek) layout are untouched.
|
||||
|
||||
Evidence (macOS, JDK 17 from Homebrew `openjdk@17`, Gradle 8.11.1,
|
||||
`ANDROID_HOME=/Users/alan/Library/Android/sdk`, `--offline`):
|
||||
|
||||
- `gradle :app:testDebugUnitTest` reported **134 tests, 0 failures, 0 errors**;
|
||||
`gradle :app:assembleDebug` succeeded (17,992,288-byte debug APK, sha256
|
||||
`3923224136be7ef9bdd8eb87111fae1f6af0211a7ba070af0e5270e324a0fc93`). The
|
||||
rewritten `SlidingPaneStackTest` has 10 cases (narrow spends no peek, the wide
|
||||
active pane is constant width at every depth, two covered levels each keep the
|
||||
minimum, a fourth level folds the oldest into one indicator carrying its count,
|
||||
the newest level still peeks, the first strip clears the gesture inset, the
|
||||
budget clamps, a tiny host never goes negative, strips are monotonic and
|
||||
deterministic, and widths are host-less-offset).
|
||||
- On `emulator-5554` (2076x2152, density 390 ≈ 852dp wide; **never** the attached
|
||||
Pixel) against the live server `ws://10.0.2.2:8080/connect`, driven with
|
||||
`adb shell input` and `uiautomator dump`:
|
||||
- Wide, `uiautomator dump` of the peek strips: at two levels the single strip
|
||||
was `[73,165]–[546,1859]` (`[30dp, 224dp]` after the ~30dp left gesture
|
||||
inset); at three levels the two strips were `[73,165]–[273,1859]` and
|
||||
`[273,165]–[546,1859]` (`[30dp,112dp]` and `[112dp,224dp]`), so the active
|
||||
pane still starts at `224dp` (constant width) and each covered pane now keeps
|
||||
at least `112dp` for its identity.
|
||||
- Narrowest wide size (`wm size 1463x2152`, density 390 = 600dp): the same
|
||||
`224dp` budget, strips `[73,127]–[273,1859]` and `[273,127]–[546,1859]`; both
|
||||
compact identities stayed readable and the active pane was full.
|
||||
- Tapping the detail peek (`409 1000`) at three levels popped to the detail
|
||||
(only `Back to pipelines` left); tapping the list peek (`173 1000`) popped to
|
||||
the list (no strips). `input keyevent 4` at depth 2 returned to depth 1 (one
|
||||
`Back to pipelines` strip).
|
||||
- Narrow (`wm size 1080x1920`, `wm density 480`, ≈360dp): opening a pipeline
|
||||
showed **0** `Back to …` strips and the detail tabs as before.
|
||||
- `adb -s emulator-5554 logcat -d` contained 0 `FATAL EXCEPTION`; no run was
|
||||
started from the app.
|
||||
- Screenshots were written to the run's artifacts directory:
|
||||
`wide-2-levels.png` (the list covered as `Pipelines · 11 on this server`),
|
||||
`wide-3-levels.png` (list and detail covered, stage active) and
|
||||
`wide-narrowest.png` (600dp); `wide-2-levels-after-peek.png` is the state
|
||||
after the peek tap.
|
||||
- **APK publish.** `app/build/outputs/apk/debug/app-debug.apk` was copied to
|
||||
`…/artifacts/65/1/pipelines-debug-wip-206953e.apk` (`206953e` =
|
||||
`git rev-parse --short HEAD`); `shasum -a 256` matched. `curl -I
|
||||
http://10.0.0.249:8080/artifacts/65/1/pipelines-debug-wip-206953e.apk` (LAN
|
||||
address from `ipconfig getifaddr en0`) returned `HTTP/1.1 200 OK`,
|
||||
`Content-Type: application/vnd.android.package-archive`, `Content-Length:
|
||||
17992288`; 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.
|
||||
|
||||
Not verified in this pass: the four-level / folded layout on a device — the app
|
||||
has exactly three pane levels (`MasterPane.List/Detail/Stage`, `MAX_PANE_DEPTH =
|
||||
2`), so the fold is unreachable and its rule is covered by the pure
|
||||
`SlidingPaneStackTest` cases instead; a long covered detail title wraps to three
|
||||
centred lines and ellipsizes (e.g. `Pipelines maintenance - plan implem…`) rather
|
||||
than being rotated.
|
||||
|
||||
Reference in New Issue
Block a user