Mirror the Android pane close animation
Give every pane one shared slide spec, a fixed 300 ms duration and a symmetric cubic-bezier easing, so a close is the open curve run backwards at the same duration; several levels that pop in one tap now stagger so each reverses in order from the top. The stack mounts a level while it is open or still sliding out and calls the pane only then, and rememberPaneContent retains each closing pane's full parent identity (item/version/section, stage key, visit). A closing pane therefore keeps rendering the content that opened it instead of vanishing or falling back to an empty node, and a fully closed level composes nothing. Geometry, tokens and insets are unchanged. Adds three pure unit cases for the symmetric easing and the stagger rule; documents the change and its emulator verification in android/README.md.
This commit is contained in:
@@ -1438,3 +1438,180 @@ Not verified: the two app appearances are dark-only (`PipelinesTheme` defaults t
|
||||
dark), so the `surfaceContainer` step was checked in the dark scheme only; the
|
||||
pane's leading-edge shadow is not used (the tonal step is the separation) so no
|
||||
new elevation token was introduced.
|
||||
|
||||
### Re-verification of the committed sheet (`1fece88`, 16 Oct 2026, run 73)
|
||||
|
||||
The change above is committed at `1fece88`; this run rebuilt and re-installed it
|
||||
and re-captured the pane on `emulator-5554` (fold AVD; narrow `wm size
|
||||
1080x1920`, wide `wm size reset` = 2076x2152 / 390dpi ≈ 852dp; **never** the
|
||||
attached Pixel) against the live server, using `android/scripts/capture_png.sh -s
|
||||
emulator-5554` (every image validated):
|
||||
|
||||
- `gradle :app:assembleDebug` → `BUILD SUCCESSFUL` (JDK 17, Gradle 8.11.1,
|
||||
`--offline`); `app/build/outputs/apk/debug/app-debug.apk` is 17,846,953 bytes,
|
||||
sha256 `d47c5bf993ca28293b188829c7fd5eec709fac49f04cca520377df96d393c887`.
|
||||
- `gradle :app:testDebugUnitTest --rerun-tasks` → `BUILD SUCCESSFUL`; the 18
|
||||
test-result XMLs aggregate to **137 tests, 0 failures, 0 errors, 0 skipped**.
|
||||
- `pane-opaque-wide-over-graph.png` / `pane-opaque-wide-over-timeline.png` and
|
||||
`pane-opaque-narrow-over-graph.png` / `pane-opaque-narrow-over-timeline.png`:
|
||||
the `implementer` pane opened over run 72's Graph and Timeline is one opaque
|
||||
`surfaceContainer` sheet — on the wide window from the fixed peek budget to the
|
||||
right edge, on the narrow window full-window — with the headline rows, section
|
||||
headers and the tonal step clearly readable.
|
||||
- `pane-opaque-narrow-over-running-graph.png`: the pane over run 73's running
|
||||
graph (`Status running`) is equally opaque.
|
||||
- `adb -s emulator-5554 logcat -d` contained 0 `FATAL EXCEPTION` / `E
|
||||
AndroidRuntime` lines during the sweep.
|
||||
- **APK publish.** Copied to
|
||||
`~/.local/share/pipelines/data/artifacts/73/1/pipelines-debug-wip-1fece88.apk`
|
||||
(`1fece88` = `git rev-parse --short HEAD`). `curl -I
|
||||
http://10.0.0.249:8080/artifacts/73/1/pipelines-debug-wip-1fece88.apk` returned
|
||||
`HTTP/1.1 200 OK`, `Content-Type: application/vnd.android.package-archive`,
|
||||
`Content-Length: 17846953`; a streamed `GET | shasum -a 256` returned the same
|
||||
`d47c5bf…` hash.
|
||||
|
||||
### Re-verification on the current tree (`1fece88`, 16 Oct 2026, run 77)
|
||||
|
||||
Same committed sheet, rebuilt and re-driven this run on `emulator-5554` only
|
||||
against the live server:
|
||||
|
||||
- `gradle :app:assembleDebug :app:testDebugUnitTest --offline` → `BUILD
|
||||
SUCCESSFUL` (Gradle 9.7.1, JDK 17 from the Android Studio JBR,
|
||||
`ANDROID_HOME=~/Library/Android/sdk`); `gradle :app:testDebugUnitTest
|
||||
--rerun-tasks --offline` re-ran all 18 result XMLs to **137 tests, 0 failures, 0
|
||||
errors, 0 skipped**. The fresh `app-debug.apk` is 17,846,953 bytes, sha256
|
||||
`8ff68d24…` — the same size but a different hash from `d47c5bf…` above, because
|
||||
APK signing is not byte-reproducible (called out in the run-73 review).
|
||||
- `pane-opaque-wide-over-graph.png` / `pane-opaque-wide-over-timeline.png`
|
||||
(2076x2152 @ 390dpi ≈ 852dp) and `pane-opaque-narrow-over-graph.png` /
|
||||
`pane-opaque-narrow-over-timeline.png` (`wm size 1080x1920`, `wm density 480` ≈
|
||||
360dp): run 76's running `implementer` pane is one solid `surfaceContainer`
|
||||
sheet, from the fixed peek budget (546 px) to the right edge on the wide window
|
||||
and full-window on the narrow one, with the headline rows and section headers
|
||||
readable and the covered panes' peeks untouched. `adb -s emulator-5554 logcat -d`
|
||||
held 0 `FATAL EXCEPTION` / `E AndroidRuntime` lines; `wm size`/`density` were
|
||||
reset afterwards.
|
||||
- **APK publish.** Copied to
|
||||
`~/.local/share/pipelines/data/artifacts/77/1/pipelines-debug-wip-1fece88.apk`
|
||||
(`1fece88` = `git rev-parse --short HEAD`); local and streamed `shasum -a 256`
|
||||
both return `8ff68d24…`. `curl -I
|
||||
http://10.0.0.249:8080/artifacts/77/1/pipelines-debug-wip-1fece88.apk` returned
|
||||
`HTTP/1.1 200 OK`, `Content-Type: application/vnd.android.package-archive`,
|
||||
`Content-Length: 17846953`.
|
||||
|
||||
### Mirror the open/close pane animation (16 Oct 2026, run 82)
|
||||
|
||||
A pane used to vanish on close: the destination cleared the selection that named
|
||||
it (a null `itemId`/`stageKey`) in the same recomposition that lowered the depth,
|
||||
so the sliding box carried no content, while the pane underneath swapped between
|
||||
its compact peek and its full body at the transition instant. The slide also used
|
||||
the default `spring()`, so it had no fixed duration or easing to run backwards.
|
||||
|
||||
- `SlidingPaneStack` now slides every pane with one shared spec
|
||||
(`paneSlideSpec`): a fixed `PANE_SLIDE_MILLIS` (300) duration and a symmetric
|
||||
`PANE_SLIDE_EASING` (`CubicBezierEasing(0.42, 0, 0.58, 1)`), so the same curve
|
||||
run from the open offset back to the closed one is the open curve travelled
|
||||
backwards. A single close is therefore the exact time-reverse of the open.
|
||||
- The stack reports a level **mounted** while it is open or has not yet finished
|
||||
sliding out, and only then calls the caller's `pane`. The destinations name a
|
||||
level's content through the new `rememberPaneContent(value)`, which keeps the
|
||||
last non-null value, so a closing pane keeps rendering the content that opened
|
||||
it until it is off-screen instead of vanishing. A fully closed level composes
|
||||
nothing, so a closed pane does no work and shows no stale content.
|
||||
- When one tap pops several levels, `paneSlideDelayMillis` waits
|
||||
`PANE_POP_STEP_MILLIS` (60) longer for each level below the topmost, so the
|
||||
cascade reverses in order. A level that is open or opening never waits, so a
|
||||
single-level open/close is unaffected.
|
||||
- Compose already maps the system animator duration scale onto its animations, so
|
||||
with animations disabled the slide is instant without a special case.
|
||||
- The covered pane's compact-vs-full presentation still swaps at the transition
|
||||
instant, exactly as opening already did (a styled change, not empty content);
|
||||
that presentation swap was not altered.
|
||||
|
||||
Verified on `emulator-5554` only against the live server (wide fold layout,
|
||||
2076x2152 / 390dpi ≈ 852dp; never the attached Pixel):
|
||||
|
||||
- `gradle :app:assembleDebug :app:testDebugUnitTest --offline` → `BUILD
|
||||
SUCCESSFUL`; `gradle :app:testDebugUnitTest --rerun-tasks --offline` re-ran all
|
||||
18 result XMLs to **140 tests, 0 failures, 0 errors, 0 skipped** (3 new pure
|
||||
cases: the easing is its own reverse, a single close starts at once, several
|
||||
closing levels stagger from the top).
|
||||
- Open/close pair: `input tap <timeline row>` then `input keyevent KEYCODE_BACK`
|
||||
on run 80's Timeline, captured with `screenrecord` and split into
|
||||
`open-1x-frames.png` / `close-1x-frames.png`; the stage pane slides in from the
|
||||
right on open and slides back out to the right on close, revealing the run
|
||||
detail underneath, instead of vanishing.
|
||||
- Multi-level pop: at depth 2, tapping the list peek (`onPopTo(0)`) captured in
|
||||
`multi-level-pop-1x-frames.png`; the stage pane leaves first and the list is
|
||||
revealed level by level.
|
||||
- Slow motion (`animator_duration_scale 10`): `open-close-slow10x.mp4` /
|
||||
`open-close-slow10x-frames.png`; the close frames are the open frames reversed.
|
||||
- Reduced motion: `animator_duration_scale 0`; 0.2 s after the open tap the stage
|
||||
pane is already at its final offset (title at `x=585`), and 0.2 s after Back the
|
||||
detail is already restored — unchanged 0.6 s later.
|
||||
- Narrow window (`wm size 1080x1920`, `wm density 480` ≈ 360dp):
|
||||
`narrow-open-1x-frames.png` / `narrow-close-1x-frames.png` — the full-window run
|
||||
detail slides in from the right on open and back out to the right on close,
|
||||
revealing the runs list underneath; `wm size`/`density` reset afterwards.
|
||||
- Stability: tapping Back mid-open (0.8 s in at `animator_duration_scale 10`)
|
||||
settles fully at the detail, never half-slid.
|
||||
- `adb -s emulator-5554 logcat -d` held 0 `FATAL EXCEPTION` / `E
|
||||
AndroidRuntime` lines; `animator_duration_scale` was left at 1.
|
||||
- **APK publish.** `app-debug.apk` (18,012,493 bytes, sha256 `d1c5506f…`) copied
|
||||
to `~/.local/share/pipelines/data/artifacts/82/1/pipelines-debug-wip-1fece88.apk`
|
||||
(`1fece88` = `git rev-parse --short HEAD`); `curl -I
|
||||
http://10.0.0.249:8080/artifacts/82/1/pipelines-debug-wip-1fece88.apk` returned
|
||||
`HTTP/1.1 200 OK`, `Content-Type: application/vnd.android.package-archive`,
|
||||
`Content-Length: 18012493`.
|
||||
|
||||
### Retain the parent identity of a closing pane (16 Oct 2026, run 82/3)
|
||||
|
||||
Review of the change above found a blocking defect: `popTo(0)` returns a bare
|
||||
`PaneSelection` (`itemId=0`, `stageKey=null`), and only the level-1 pane retained
|
||||
its `itemId`/version pair; the level-2 pane still read its parent id **live** from
|
||||
the selection, so closing a two-level stack to the list fed `runId=0` /
|
||||
`pipelineId=0` into the stage pane. The run was then `null`, the graph empty, the
|
||||
node not found, and the whole exit animation showed the `terminal` chip plus "No
|
||||
details recorded for this node." (captured in `repro-pop-050.png` /
|
||||
`pl-pop-090.png`); the same live read also reset the closing detail pane's section
|
||||
to Summary.
|
||||
|
||||
- `rememberPaneContent` now retains the **full** parent identity at every level:
|
||||
pipeline detail `(itemId, version, sectionIndex)`, pipeline stage
|
||||
`(itemId, version, stageKey)`, run detail `(itemId, sectionIndex)` and run stage
|
||||
`(itemId, stageKey, stageVisit)`. Each closing pane therefore keeps rendering
|
||||
the content, section and visit that opened it until it is off-screen; nothing a
|
||||
pane displays is read live from the selection while it exits.
|
||||
- No timing, easing or geometry changed — only what a closing pane reads.
|
||||
|
||||
Verified on `emulator-5554` only (2076x2152 / 390dpi fold layout, live server),
|
||||
`animator_duration_scale 10` for the frame work:
|
||||
|
||||
- `gradle :app:assembleDebug :app:testDebugUnitTest --offline` → `BUILD
|
||||
SUCCESSFUL`; `gradle :app:testDebugUnitTest --rerun-tasks --offline` re-ran all
|
||||
18 result XMLs to **140 tests, 0 failures, 0 errors, 0 skipped**.
|
||||
- Pipeline multi-level pop (tapping the list peek, `onPopTo(0)`, from depth 2):
|
||||
`before-after-pipeline-pop.png` puts the review's empty `pl-pop-090.png` (left)
|
||||
beside a frame of this build (right); every frame in
|
||||
`multi-level-pop-pipelines-sheet.png` shows the closing stage pane still
|
||||
rendering `implementer` / `model` / `Stage definition` with its Prompt, instead
|
||||
of the empty `terminal` state.
|
||||
- Runs multi-level pop: `multi-level-pop-runs-sheet.png` /
|
||||
`multi-level-pop-runs-stage-mid-exit.png` — the closing run stage pane keeps its
|
||||
run identity (`Status completed`, `Outcome success`, `Duration 5m18s`,
|
||||
`Visit 2 / 5`, `Target reviewer`, the Artifacts gallery), so `runId` is retained
|
||||
and the empty-node fallback never appears.
|
||||
- Single-level close (`single-level-close-runs-sheet.png`): the run detail slides
|
||||
back out to the right with its Summary section and rows intact, revealing the
|
||||
runs list underneath.
|
||||
- Reduced motion: `animator_duration_scale 0`; two captures 0.15 s and 0.6 s
|
||||
after Back are byte-identical (`sha256 692437bc…`), i.e. the close is instant.
|
||||
- `adb -s emulator-5554 logcat -d` held 0 `FATAL EXCEPTION` / `E
|
||||
AndroidRuntime` lines; `animator_duration_scale` was left at 1.
|
||||
- **APK publish.** `app-debug.apk` (18,012,767 bytes, sha256 `b3b7d948…`) copied
|
||||
to `~/.local/share/pipelines/data/artifacts/82/3/pipelines-debug-wip-1fece88.apk`
|
||||
(`1fece88` = `git rev-parse --short HEAD`); `curl -I
|
||||
http://10.0.0.249:8080/artifacts/82/3/pipelines-debug-wip-1fece88.apk` returned
|
||||
`HTTP/1.1 200 OK`, `Content-Type: application/vnd.android.package-archive`,
|
||||
`Content-Length: 18012767`; a streamed `GET | shasum -a 256` returned the same
|
||||
`b3b7d948…`.
|
||||
|
||||
Reference in New Issue
Block a user