Reach the covered pane's full statistics and wrap its title at whole words
A covered pane's width is spent on the covered region (`identityWidth +
startInset`), and when a second level is covered `coveredEdgesDp` gives the
nearest identity that region less the thin older edge (`startInset + minTouch`;
the leading gesture inset cancels), i.e. `identityWidth - minTouch`. Flooring a
statistics-bearing identity at the full block alone (`MIN_COVERED_PANE_WIDTH_DP +
PEEK_WIDTH_DP`, 168dp) therefore left the nearest edge at 120dp, below the
`paneStatTier` Full boundary, so a pipeline's last-run/age and average lines were
filtered out at every depth a pipeline is ever covered. `coveredIdentityWidthDp`
now floors a statistics-bearing identity one touch target above the block
(`+ minTouch`), so the nearest edge is exactly 168dp and reaches Full, while the
single-covered and title-only cases are unchanged and the active pane width still
does not depend on depth.
The covered title also broke mid-word in a narrow strip ("Complete a Task" ->
"Complet"/"e a Task"). `wholeWordTitle` now packs the title greedily onto
whole-word lines and, once they are full, drops the remaining words and
ellipsizes the last line at a word boundary; a word wider than the whole strip is
the one exception, ellipsized to the width because it has no internal boundary.
It takes an injected `measure`, so the packing rule is unit-testable without a
device, and `PaneIdentity` measures with the same `cardTitle` role it draws with.
`PaneIdentityTest` adds the pure cases: the width-degradation tiers, the
statistics-bearing width floor, the nearest-edge geometry at depth 2 (which fails
without the `+ minTouch` reserve, so it pins the defect), and the whole-word
wrap/ellipsis/oversized-word/no-room cases. `android/README.md` records the
corrected geometry, the fix and the run's build/test evidence.
android/ only; no new dependency, no server field, and no server/Go/installer/
Docker change. Build and unit tests only (no device): 300 tests, 0 failures.
This commit is contained in:
@@ -3754,3 +3754,89 @@ review stages, and the device policy for this brief keeps the implementation to
|
||||
the build and the unit tests. Four levels are also unreachable in the app itself
|
||||
(`MasterPane.List/Detail/Stage`, `MAX_PANE_DEPTH = 2`), so the four-level fold is
|
||||
covered by the pure `coveredEdgesDp` cases rather than by a screenshot.
|
||||
|
||||
## The covered region is sized for the statistics it shows (16 Oct 2026)
|
||||
|
||||
Review of the statistics block found three blocking problems, all rooted in the
|
||||
same cause: the covered region was measured too small for the statistics it was
|
||||
supposed to carry. First, the region was measured from the destination's bare
|
||||
`compactLabel` (`"Runs"` measured `~48.9dp`, `"Pipelines"` `~76dp`) plus the touch
|
||||
target floor, so `PaneIdentity`'s width-derived tier never reached the statistics
|
||||
it was supposed to carry: `"Runs"` fell below `PEEK_WIDTH_DP` and rendered the
|
||||
title alone (the runs list showed no counts and no most-recent run), and even
|
||||
`"Pipelines"` only reached the `Counts` tier because the `Full` tier needs
|
||||
`MIN_COVERED_PANE_WIDTH_DP + PEEK_WIDTH_DP` (`168dp`). Second, even after the
|
||||
region was floored at the block, a pipeline-scoped identity is only ever the
|
||||
nearest covered pane at depth 2, where the thin older edge (`startInset +
|
||||
minTouch`) narrows it below `168dp`, so its last-run/age and average lines stayed
|
||||
unreachable — `avg` was dead in the UI. Third, the title broke mid-word in a
|
||||
narrow strip (`"Complete a Task"` → `"Complet"`/`"e a Task"`). `android/` only; no
|
||||
dependency was added, no run was started from the app, no server field was added,
|
||||
and the server/Go source/installer/Docker files were not touched.
|
||||
|
||||
- **The measured region carries the statistics, and the nearest edge keeps
|
||||
them.** `coveredIdentityWidthDp` (`ui/components/PaneIdentity.kt`) is the pure
|
||||
width rule: the measured content (title or icon) plus the identity's own
|
||||
padding, floored at the platform touch target and — when the identity carries
|
||||
statistics — one touch target above the full block's width
|
||||
(`MIN_COVERED_PANE_WIDTH_DP + PEEK_WIDTH_DP + minTouch`). That extra touch
|
||||
target is the thin older edge the nearest identity gives up when a second level
|
||||
is covered (`coveredEdgesDp`; the leading gesture inset cancels against the
|
||||
region's own), so the nearest edge — the only pipeline-scoped pane that is ever
|
||||
covered — now clears the `Full` boundary and renders its last-run/age and
|
||||
average lines instead of only the counts. `rememberCompactIdentityWidth` gained
|
||||
a `withStats` flag, and `SlidingPaneStack` a `compactStats` parameter; the
|
||||
Pipelines and Runs stacks both pass `true`, since every covered pane in either
|
||||
is a list or a detail and both carry a statistics block (the stage pane is never
|
||||
a covered level: `covered = level < depth` and it is the third level). The active
|
||||
pane's width stays the same at every depth, because the region does not depend
|
||||
on depth. At depth 1 a single covered pane measures the full block width and
|
||||
shows every line; at depth 2 the nearest covered identity still reaches `Full`,
|
||||
while the older level shows its title alone in the thin edge.
|
||||
- **The title breaks at whole words rather than mid-word.** `wholeWordTitle`
|
||||
packs the title greedily onto whole-word lines and, once its lines are full,
|
||||
drops the remaining words and ellipsizes the last line at a word boundary; the
|
||||
only exception is a word wider than the whole strip, which is ellipsized to the
|
||||
width rather than wrapped (there is no internal boundary to break at). The
|
||||
helper takes an injected `measure`, so the packing rule is unit-testable, and
|
||||
`PaneIdentity` measures with the same `cardTitle` role and `TextMeasurer` it
|
||||
draws with.
|
||||
- **The fixes are pure and unit-tested.** `coveredIdentityWidthDp`'s round trip
|
||||
through `paneStatTier` (a stats-bearing identity shows the full block),
|
||||
`theNearestEdgeOfAStatisticsBearingStackStillShowsTheFullBlock` (the region fed
|
||||
to `coveredEdgesDp` yields a nearest edge that clears the block at depth 2 — the
|
||||
geometry that was wrong) and `wholeWordTitle`'s
|
||||
packing/ellipsis/oversized-word/no-room cases are asserted in
|
||||
`PaneIdentityTest` without a device. The nearest-edge case fails when the
|
||||
`+ minTouch` reserve is removed, so it pins the defect rather than restating it.
|
||||
|
||||
Evidence (macOS, JDK 17 from Homebrew `openjdk@17`, the cached Gradle 8.11.1
|
||||
distribution, `ANDROID_HOME=~/Library/Android/sdk`, `--offline`, every command
|
||||
with `--no-daemon`):
|
||||
|
||||
- `gradle clean :app:testDebugUnitTest :app:assembleDebug --no-daemon --offline
|
||||
--console=plain` → `BUILD SUCCESSFUL in 6s` (41 actionable tasks; the clean
|
||||
evicted nothing cached, so `compileDebugKotlin` and `testDebugUnitTest` were
|
||||
`FROM-CACHE` for the fixed source and `packageDebug`/`assembleDebug` ran). The
|
||||
result XMLs total **300 tests, 0 failures, 0 errors, 0 skipped** across 34
|
||||
files; `PaneIdentityTest` has 12 cases, including
|
||||
`aStatisticsBearingIdentityIsNeverSizedForItsBareTitle`,
|
||||
`theNearestEdgeOfAStatisticsBearingStackStillShowsTheFullBlock` (run alone
|
||||
against the pre-fix floor it failed at `PaneIdentityTest.kt:96`, so it pins the
|
||||
defect), `theTitleWrapsAtWholeWordsAndNeverSplitsOne` and
|
||||
`theTitleEllipsizesWholeWordsWhenTheLinesAreFull`.
|
||||
- `app/build/outputs/apk/debug/app-debug.apk` is 18,046,987 bytes, sha256
|
||||
`9c2735c8e07db6a04a85616a85a88f2828ef8a551d5b6281a3993b9ea6be9ea7`; it was copied
|
||||
to `~/.local/share/pipelines/data/artifacts/198/4/pipelines-debug-wip-af68a62.apk`
|
||||
(`af68a62` = `git rev-parse --short HEAD`; the tree is WIP on top of it).
|
||||
`curl -sI http://10.0.0.75:8080/artifacts/198/4/pipelines-debug-wip-af68a62.apk`
|
||||
returned `HTTP/1.1 200 OK`, `Content-Type: application/vnd.android.package-archive`,
|
||||
`Content-Length: 18046987`, matching the local file's size.
|
||||
|
||||
Not verified in this pass: the on-device wide/narrow renders and the
|
||||
one/two/four-level screenshots — the brief keeps implementation verification to
|
||||
the build and the unit tests, and visual review owns the device. The title
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user