Make Android pane navigation adaptive with a fixed peek budget
Replace the per-level peek with a fixed total peek budget on wide windows and drop the stack entirely on narrow ones, so a folded phone loses no width to dead peek space and a deep stack never reserves more than the budget. - SlidingPaneStack gains a `wide` parameter (the callers pass the existing isWideLayout value). On a narrow window the budget is 0dp, so every pane's open offset is 0 and each opened pane is a full-window screen that springs in over the last; Back, the gesture and the pane's own back control pop one level and nothing is left on the left. - On a wide window peekBudgetDp (PEEK_BUDGET_DP, 224dp) is the fixed total space shared between the covered panes, independent of depth, so the active pane's left edge is always exactly the budget and its width (hostWidth - budget) stays constant as levels are added. paneOpenOffsetsDp widens the leftmost strip first so it stays tappable after the start inset (min of PEEK_WIDTH_DP and the platform minimum interactive size), then splits the rest evenly. peekBudgetDp clamps so the active pane never collapses below MIN_ACTIVE_PANE_WIDTH_DP and paneWidthDp is never negative. All geometry is derived from the named tokens, the measured host width and the system insets - no new literals. - The peek-strip hit targets now come from the shared offsets, and panes remain opaque, inset inside the safe area, hidden from accessibility when covered, and opening/closing stay exact mirrors through the same animators. PaneState documents the narrow (no peek) rule. - SlidingPaneStackTest is rewritten around the pure budget geometry (narrow spends no peek, the wide active pane is constant width, four levels share one budget with every strip tappable, the budget clamps, tiny hosts never go negative), and android/README.md records the pass, its evidence and what was not verified.
This commit is contained in:
+113
-8
@@ -158,14 +158,20 @@ stops it.
|
||||
`LazyColumn`, so no scrollable nests inside a same-direction scrollable.
|
||||
- Foldable-responsive layout driven by window size (`ui/WindowSize.kt`,
|
||||
`isWideLayout(widthDp)` at a 600dp breakpoint, read from
|
||||
`LocalConfiguration.current.screenWidthDp`): both window widths use one sliding
|
||||
three-level pane stack (`ui/components/SlidingPaneStack.kt`) — pane 0 is the
|
||||
pipeline (or run) list filling the window, pane 1 the selected detail and pane
|
||||
2 the selected stage/graph node, each overlaying the one below at `peek * level`
|
||||
leaving a tappable peek strip of the pane it covers on the left; tapping a
|
||||
covered pane's peek closes every pane to its right. There is no collapse
|
||||
control, no collapsed strip and no master-pane width constant any more. The
|
||||
section index presentation does follow
|
||||
`LocalConfiguration.current.screenWidthDp`): both window widths use one
|
||||
adaptive sliding pane stack (`ui/components/SlidingPaneStack.kt`) — pane 0 is
|
||||
the pipeline (or run) list, pane 1 the selected detail and pane 2 the selected
|
||||
stage/graph node. On a **narrow** window there is no stack and no peek: every
|
||||
opened pane is a full-window screen that slides in over the last, and Back,
|
||||
the back gesture or the pane's own back control returns one level with nothing
|
||||
left over on the left. On a **wide** window the panes stack, but the space the
|
||||
covered panes reserve is one fixed budget shared between them
|
||||
(`PEEK_BUDGET_DP`), so the active (topmost) pane's left edge is always exactly
|
||||
the budget and its width never shrinks as levels are added; the leftmost strip
|
||||
is widened first so it stays tappable after the gesture inset, and the rest of
|
||||
the budget is split evenly. Tapping a covered pane's peek closes every pane to
|
||||
its right. There is no collapse control, no collapsed strip and no master-pane
|
||||
width constant any more. The section index presentation does follow
|
||||
the window width: a narrow window shows the tab row across the top, a wide
|
||||
window the always-visible side rail, with the text column capped at a
|
||||
comfortable width and the graph using the extra width. No material3-adaptive
|
||||
@@ -689,6 +695,12 @@ was not exercised (narrow was produced with `wm size`); the emulator
|
||||
|
||||
## Pane stack, click-outside back, stage pane and artifacts gallery (15 Oct 2026)
|
||||
|
||||
> **Superseded** by the adaptive pane navigation pass below (same day): the stack
|
||||
> is now `SlidingPaneStack(depth, wide, …)` with a single fixed peek budget
|
||||
> (`PEEK_BUDGET_DP`) shared between covered panes, and a narrow window shows no
|
||||
> peek at all. The `paneOffsetDp`/`peekWidthDp` helpers named here no longer
|
||||
> exist; the bullets record what that pass did at the time.
|
||||
|
||||
This pass turned the stage detail into a real pane, made the stack behave like
|
||||
Back at every level, and added an artifacts gallery to the summary.
|
||||
|
||||
@@ -878,3 +890,96 @@ neither the "capture pending" nor the finished "no artifacts recorded" message w
|
||||
seen on device — both are covered by `ArtifactGroupsTest`/`artifactsEmptyMessage`);
|
||||
the unconfigured (disabled open/copy) gallery row; the predictive-back animation
|
||||
frames and pinch-zoom (adb cannot drive a two-finger pinch).
|
||||
|
||||
## Adaptive pane navigation and a fixed peek budget (15 Oct 2026)
|
||||
|
||||
The pane stack was made adaptive to the window width and its peek space changed
|
||||
from one peek per level to a single fixed budget shared between the covered
|
||||
panes. `android/` only; nothing in the Pipelines server, its Go source, the
|
||||
Docker/compose files, the installer or the dependency blocks was touched, 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`).
|
||||
|
||||
- **Narrow windows: no stack, no peek.** `SlidingPaneStack` gained a `wide`
|
||||
parameter (the callers pass the existing `isWideLayout` value). On a narrow
|
||||
window the peek budget is `0.dp`, so every pane's open offset is `0` and each
|
||||
pane is a full-window screen; a covered pane is fully hidden, there is no strip
|
||||
and nothing is left over on the left. Tapping a list row or a stage/graph node
|
||||
opens the pane with the existing `spring()` slide from the right edge; Back,
|
||||
the predictive-back gesture and the pane's own top-bar back control all run the
|
||||
same one-level `backStep`.
|
||||
- **Wide windows: one fixed peek budget.** The total space the covered panes
|
||||
reserve is `PEEK_BUDGET_DP` (`224.dp`, a named token), never `peek * level`, so
|
||||
the stack consumes the same width however deep it gets. `paneOpenOffsetsDp`
|
||||
places the active pane at exactly the budget — its width is therefore
|
||||
`hostWidth - budget` at every depth, constant as levels are added — and shares
|
||||
the budget between the covered panes, widening the leftmost strip first so that
|
||||
after the left gesture inset (`systemBars ∪ systemGestures`) its tappable part
|
||||
is still at least `PEEK_WIDTH_DP` (`56.dp`) and the platform minimum
|
||||
interactive size, then splitting the rest evenly. At two levels the one covered
|
||||
pane takes the whole budget; at three the budget is split in two; at four (four
|
||||
panes, three covered) it is split in three.
|
||||
- **Named tokens, no literals.** `PEEK_WIDTH_DP` (`56.dp`), `PEEK_BUDGET_DP`
|
||||
(`224.dp`) and `MIN_ACTIVE_PANE_WIDTH_DP` (`320.dp`) live beside the stack;
|
||||
`peekBudgetDp` clamps the budget so the active pane never collapses on a small
|
||||
host (`hostWidth - MIN_ACTIVE_PANE_WIDTH_DP`), and `paneWidthDp` is never
|
||||
negative. Everything else is derived from the measured width and the insets.
|
||||
- Both models keep the other pane rules: opening and closing are exact mirrors
|
||||
(the same offsets and `spring()` retarget in reverse), panes are opaque, the
|
||||
peek strips are inset inside the status/nav bars and the gesture area, and a
|
||||
section inside a detail is a selection on its own tab row/pager, never a
|
||||
navigation level.
|
||||
|
||||
Evidence obtained in this pass (macOS, JDK 17 from Homebrew `openjdk@17`, Gradle
|
||||
8.11.1 from the wrapper cache, `ANDROID_HOME=/Users/alan/Library/Android/sdk`,
|
||||
`--offline`):
|
||||
|
||||
- `gradle :app:testDebugUnitTest` reported **130 tests, 0 failures, 0 errors**
|
||||
(the rewritten `SlidingPaneStackTest` has 8 cases: narrow spends no peek at any
|
||||
depth, the wide active pane's width is constant across depths, four levels share
|
||||
the one fixed budget with every strip at least the named minimum, the first
|
||||
strip clears the gesture inset, the budget clamps so the active pane never
|
||||
collapses, a tiny host never yields negative geometry, offsets are monotonic and
|
||||
deterministic, and widths are host-less-offset and never negative).
|
||||
- `gradle :app:assembleDebug` succeeded (17,990,397-byte debug APK, sha256
|
||||
`b7ba9d600031f09472b06fff4c06cd50ec93b995cf7b1f7bf8a2115846a8e602`).
|
||||
- On `emulator-5554` (2076x2152, density 390 ≈ 852dp wide; **never** the attached
|
||||
Pixel) against the live server `ws://10.0.0.75: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]`, i.e. `[30dp, 224dp]` — the whole budget after the
|
||||
~30dp left gesture inset; at three levels the two strips were `[73,165]–[273,
|
||||
1859]` and `[273,165]–[546,1859]`, i.e. `[30dp,112dp]` and `[112dp,224dp]`.
|
||||
The active pane therefore starts at `224dp` at both depths — its width is
|
||||
constant — and the two covered strips sum to the same `224dp` budget.
|
||||
- Narrow (`wm size 1080x1920`, `wm density 480`, ≈360dp): the list, the detail
|
||||
and the stage pane each filled the window (`uiautomator dump` listed **no**
|
||||
`Back to …` strips at any depth), a row tap opened the detail (`Summary` tab
|
||||
present) and the predictive-back swipe `input swipe 5 1000 900 1000 250`
|
||||
returned to the list.
|
||||
- `adb -s emulator-5554 logcat -d` contained 0 `FATAL EXCEPTION` and 0
|
||||
`E AndroidRuntime` lines after a clean sweep; no run was started from the app.
|
||||
- Screenshots and recordings were written to the run's artifacts directory:
|
||||
`wide-1-level-list.png`, `wide-2-levels-detail.png`, `wide-3-levels-stage.png`,
|
||||
`narrow-1-level-list.png`, `narrow-2-levels-detail.png`,
|
||||
`narrow-3-levels-stage.png`, `wide-open-close.mp4` (opening two and three
|
||||
levels then closing) and `narrow-open-close.mp4` (opening and closing the
|
||||
detail). The four-level layout (four panes, three covered) is not reachable in
|
||||
the app, which has exactly three pane levels (`MasterPane.List/Detail/Stage`);
|
||||
the shared budget at four levels is covered exactly by the
|
||||
`SlidingPaneStackTest` geometry cases instead.
|
||||
- **APK publish.** `app/build/outputs/apk/debug/app-debug.apk` was copied to
|
||||
`…/artifacts/61/1/pipelines-debug-wip-5314542.apk` (`5314542` =
|
||||
`git rev-parse --short HEAD`); `shasum -a 256` matched. `curl -I
|
||||
http://10.0.0.75:8080/artifacts/61/1/pipelines-debug-wip-5314542.apk` returned
|
||||
`HTTP/1.1 200 OK`, `Content-Type: application/vnd.android.package-archive`,
|
||||
`Content-Length: 17990397`; 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 layout on a device (unreachable — the
|
||||
app has three pane levels); the predictive-back animation frames (adb cannot drive
|
||||
a two-finger pinch and the frame-by-frame preview is not captured); the wide
|
||||
recording's final close-detail frame lands at the end of the clip. The narrow
|
||||
layout was produced with `wm size`/`wm density` (a real hardware fold was not
|
||||
exercised).
|
||||
|
||||
Reference in New Issue
Block a user