Open stage sections as their own pane instead of expanding inline
Expanding a stage section drew its rows stacked at the section's origin: CollapsibleSectionBody passed the section's several field composables straight into AnimatedVisibility, which lays out a single child, so the rows overlapped at the top of the section and only the last was visible. The shared body now wraps its content in one full-width Column, so any multi-row section stacks its rows under its header. Every stage section now opens as its own pane rather than growing the stage screen inline: - PaneState: add the Section pane level (MAX_PANE_DEPTH = 3) and a saved sectionKey primitive, with backStep/popTo/encode/decode handling so one Back or peek pops exactly one level and the open section survives rotation and process death. - StageDetailPane: the stage screen keeps a compact collapsed list of its sections (Artifacts, Output, Input, This run, Stage definition); opening one shows it as a full-window surface over the stage on a narrow window, or a panel to the right of the stage pane on a wide one, with its own Scaffold/TopAppBar title, its own scroll and its own top spacing. - SectionHeader: a navigation mode for those rows - a static forward chevron (mirrored for RTL) and an "Open <section>" action instead of a rotating disclosure chevron and "Expand/Collapse", so assistive tech is not told the row expands in place. The detail screens' disclosure rows are unchanged. - DetailTabs: drop the rememberSectionExpansion initiallyExpanded seed, whose last caller was the inline stage definition. - Tests: cover the Section level's backStep, popTo, encode/decode and depth, and the shared stageSectionSpecs order and blank-section cases. Sections still start collapsed, the operator's choices still persist, and each section's content is unchanged. android/ only; no dependency was added. Also in this diff, from the covered-identity statistics work: PipelinesApp passes compactStats = true on its two stacks (SlidingPaneStack's statistics flag).
This commit is contained in:
@@ -3840,3 +3840,85 @@ wrapping is asserted against an injected measurer, not rendered pixels; the
|
||||
whole-word guarantee therefore rests on `TextMeasurer` and the drawn `Text`
|
||||
using the same role and width, which is why both read `text.cardTitle` and the
|
||||
identity's own `SPACING_S` padding.
|
||||
|
||||
## Stage sections open as their own pane, not inline (17 Oct 2026)
|
||||
|
||||
The reported stage-screen defect is reproducible and this pass fixes it by
|
||||
opening every stage section as its own pane and by laying a collapsible body out
|
||||
in one column. `android/` only; nothing in the Pipelines server, its Go source,
|
||||
the Docker/compose files or the installer was touched, no dependency was added
|
||||
and no run was started from the app.
|
||||
|
||||
- **The defect and its cause.** Expanding a stage section drew its rows stacked
|
||||
at the top of the section: the section's content lambda emits one composable
|
||||
per field (`fields.forEach { StageFieldRow(it) }`) straight into
|
||||
`CollapsibleSectionBody`'s `AnimatedVisibility`. `AnimatedVisibility` lays out
|
||||
a *single* child, so several siblings were placed on top of each other at the
|
||||
section's origin instead of one below the next; the body took the height of its
|
||||
tallest single row and showed only the last one, so the content did not sit
|
||||
cleanly under — or under all of — its header.
|
||||
- **Sections are panes.** The stage screen now keeps a **compact list** of its
|
||||
section rows (`Artifacts`, `Output`, `Input`, `This run`, `Stage definition`)
|
||||
and tapping one opens that section as the next pane of the stack — a
|
||||
full-window screen over the stage on a narrow window, a panel to the stage
|
||||
pane's right on a wide one — with its own `Scaffold`/`TopAppBar` named for the
|
||||
section, its own scroll and its own top spacing. Back (the app bar, the gesture
|
||||
or a peek) returns exactly one level, to the stage screen. `MasterPane` gained
|
||||
the `Section` level (`MAX_PANE_DEPTH = 3`) and `PaneSelection.sectionKey` (a
|
||||
primitive saved with the pane selection), so the open section survives rotation
|
||||
and process death.
|
||||
- **No trivial inline exceptions.** None of the five sections is kept inline:
|
||||
each can hold an arbitrarily long value (the definition's prompt/output
|
||||
contract, the input/output maps, the run evidence, the artifacts gallery), so
|
||||
an inline body would both risk the layout with many rows and push the run
|
||||
context off screen; one uniform rule keeps the screen predictable.
|
||||
- **Rows read as navigation, not as disclosures.** The stage screen's section
|
||||
rows go through the shared `SectionHeader` with `navigation = true`: the
|
||||
chevron becomes the static forward arrow (`Icons.AutoMirrored.Filled
|
||||
.KeyboardArrowRight`, mirrored for RTL) instead of a rotating disclosure
|
||||
chevron, and the row announces as `Artifacts` with an `Open Artifacts` action
|
||||
instead of `Artifacts, collapsed` / `Expand Artifacts`. Assistive tech is
|
||||
therefore never told the row expands in place after it started opening a pane.
|
||||
The disclosure rows (the run/pipeline detail lists) are unchanged. The
|
||||
`rememberSectionExpansion` seed that existed only to start the stage pane's
|
||||
definition expanded (`initiallyExpanded`) is gone with its last caller, so the
|
||||
shared component no longer carries docs or a parameter for the removed inline
|
||||
stage behaviour.
|
||||
- **The shared body fix.** `CollapsibleSectionBody` now lays its content out in a
|
||||
single full-width `Column`, so *any* collapsible section with more than one row
|
||||
(it also backs the run/pipeline detail `collapsibleSection` lists) stacks its
|
||||
rows under the header instead of overlapping them.
|
||||
- **Semantics kept.** Sections start collapsed; the operator's choice — which
|
||||
section is open, and the visit — is saved with the pane selection; and each
|
||||
section's content is derived from the same pure `stageSectionSpecs`
|
||||
(`stageDefinitionFields`/`runStepFields`/`evidenceFields`), so nothing shown
|
||||
before is lost. The artifacts section keeps the shared
|
||||
`ArtifactSelectionScaffold`.
|
||||
|
||||
Verification (macOS, JDK 17 from Homebrew `openjdk@17`,
|
||||
`ANDROID_HOME=/Users/alan/Library/Android/sdk`, cached Gradle 8.11.1,
|
||||
`--no-daemon --offline`):
|
||||
|
||||
- `gradle :app:testDebugUnitTest :app:assembleDebug --no-daemon --offline` →
|
||||
`BUILD SUCCESSFUL` (`compileDebugKotlin` and `compileDebugUnitTestKotlin`
|
||||
executed on the edited sources); the test-result XMLs aggregate to **303 tests,
|
||||
0 failures, 0 errors, 0 skipped** across 34 classes (`PaneStateTest` gained the
|
||||
Section-level backStep, popTo, encode/decode and depth cases;
|
||||
`StageDetailSheetTest` replaced the definition-expansion seed with the
|
||||
`stageSectionSpecs` order/blank-section cases). The `navigation` affordance is
|
||||
Compose UI semantics, which this module has no unit harness for, so it is
|
||||
covered by compilation only, not by a test.
|
||||
- `app/build/outputs/apk/debug/app-debug.apk` is 18,272,941 bytes, sha256
|
||||
`dccce3ca1a3c5acc724dec376709f694e11a29b68ffd85eae4d5114c4f8989a1`; it was
|
||||
copied to
|
||||
`~/.local/share/pipelines/data/artifacts/216/1/pipelines-debug-wip-dcd58b8.apk`
|
||||
(`dcd58b8` = `git rev-parse --short HEAD`; the tree is uncommitted WIP on top
|
||||
of it). `curl -sSI
|
||||
http://10.0.0.249:8080/artifacts/216/1/pipelines-debug-wip-dcd58b8.apk`
|
||||
returned `HTTP/1.1 200 OK`, `Content-Type: application/vnd.android.package-archive`,
|
||||
`Content-Length: 18272941`, matching the local file's size.
|
||||
|
||||
Not verified in this pass: the on-device narrow/wide renders (a section opening
|
||||
over the stage and returning, and the wide panel beside the stage pane) and any
|
||||
screenshot of the former inline case — the brief keeps implementation
|
||||
verification to the build and the unit tests, and visual review owns the device.
|
||||
|
||||
Reference in New Issue
Block a user