android: stand the destination pill down in an open chat conversation

The floating destinations pill was drawn over the bottom of every screen,
including an open chat, where it sat on the composer and the newest message
and competed with the send/stop controls. It now stands down while the Chat
destination shows an open conversation and stays everywhere else, unchanged.

- One rule: `destinationPillVisible(currentRoute, conversationOpen)` is false
  only for `chat` with an open conversation. `conversationOpen` is the new
  `AppViewModel.conversationOpen`, a distinctUntilChanged boolean derived from
  the same ChatStore the chat surface renders, so a background chat never hides
  the pill elsewhere and a streamed delta never recomposes the app shell.
- The space, not just the pill: `destinationPillReserve(pillVisible)` returns
  the named DESTINATION_PILL_RESERVE while drawn and 0.dp while hidden, so the
  content Column clears a drawn pill and leaves no empty band when it is gone,
  and no frame reserves a gap behind a hidden pill or draws one over content it
  does not clear. Keyboard-open and the IME padding are unchanged.
- Escapability untouched: the top-bar "Back to chats" arrow, ChatScreen's
  PredictiveBackHandler and SlidingPaneStack.onPopTo remain the way out.
- No other pill behaviour changed: destinations, selection indicator,
  morph-into-search and every other screen are as before.

Checked for staleness: none of the packaged templates or the packaged authoring
skill references (internal/author/skill/references) mention the destination pill,
so no template or reference needed updating for this Android-only change.

Tests: PipelinesNavTest gains thePillStandsDownOnlyWhileAConversationIsOpen and
theReserveTracksTheDrawnPillSoContentNeitherJumpsNorLeavesAGap.
This commit is contained in:
2026-10-17 16:25:22 +01:00
parent 890d267c71
commit 3e14baebd7
4 changed files with 168 additions and 16 deletions
+59
View File
@@ -6010,3 +6010,62 @@ and the phone's own notification — the brief keeps ordinary code review to the
build and the unit tests, and visual review owns the operator's Pixel 9 Pro XL.
The concrete payload delivered to the local ntfy service was reproduced by the
code review with a live curl subscriber; the device captures are visual review's.
## Destination pill stands down in an open conversation (17 Oct 2026)
The floating destinations pill was drawn over the bottom of every screen,
including an open chat, where it sat on the composer and the newest message and
competed with the send/stop controls. It now stands down while the Chat
destination is showing an open conversation and stays everywhere else,
unchanged. `android/` only; no new dependency, no run started from the app, no
server/installer/Docker file touched, and the operator's Pixel was never used.
- **One rule.** `destinationPillVisible(currentRoute, conversationOpen)` is false
only for `chat` with an open conversation — a session's transcript and composer
— and true for the chat list and every other destination. `conversationOpen` is
the new `AppViewModel.conversationOpen` (`chatStore.state.map { it.active != null }`,
`distinctUntilChanged`), read from the same store the chat surface renders, so a
background open chat never hides the pill elsewhere and a streamed chat delta
never recomposes the app shell.
- **The space, not just the pill.** `destinationPillReserve(pillVisible)` returns
the named `DESTINATION_PILL_RESERVE` while the pill is drawn and `0.dp` while it
is hidden: the content Column keeps clearing a drawn pill, and a hidden pill
leaves no empty band at the end of scrollable content, so the composer sits at
the true bottom. The pill and its reservation are driven by the one predicate,
so no frame has a drawn pill over content it does not clear or a reserved gap
behind a hidden pill; the viewport height is constant for as long as a
conversation is open, so the composer and the newest message do not move while
it is shown. Works with the keyboard open: the composer's own `imePadding` and
the pill's `paneSafeArea()` are unchanged, with no pill left to sit over them.
- **Still escapable.** Nothing about leaving a conversation changed: its top-bar
back arrow (`Back to chats`), the system Back button/gesture (`ChatScreen`'s
`PredictiveBackHandler`), and on a wide window the covered chat-list strip
(`SlidingPaneStack.onPopTo`) all return to the list. The pill was never the way
out; Back is.
- **Nothing else touched.** The pill's destinations, travelling indicator,
morph-into-search and behaviour on every other screen are untouched; the
attention indicator is unchanged.
Evidence (this pass, macOS, JDK 17 `/opt/homebrew/opt/openjdk@17`, cached Gradle
8.11.1, `ANDROID_HOME=$HOME/Library/Android/sdk`, `--offline --no-daemon`):
- `gradle :app:testDebugUnitTest --offline --no-daemon --console=plain` →
`BUILD SUCCESSFUL in 11s`; the JUnit XMLs total **58 suites / 533 tests / 0
failures / 0 errors / 0 skipped** (up from 531: `PipelinesNavTest` gains
`thePillStandsDownOnlyWhileAConversationIsOpen` and
`theReserveTracksTheDrawnPillSoContentNeitherJumpsNorLeavesAGap`).
- `gradle :app:assembleDebug --offline --no-daemon --console=plain` →
`BUILD SUCCESSFUL`; `app/build/outputs/apk/debug/app-debug.apk` is **18,535,932
bytes**, sha256 `fc872b5398c231f053cd6e5f6794b2b6c2a8f947314ba0de02851dab2a95c3e`.
- **APK publish.** Copied to
`~/.local/share/pipelines/data/artifacts/287/1/pipelines-debug-wip-890d267.apk`
(`890d267` = `git rev-parse --short HEAD`; the tree is uncommitted WIP on top of
it), sha256 matched. The LAN URL
`http://10.0.0.75:8080/artifacts/287/1/pipelines-debug-wip-890d267.apk` returned
`HTTP/1.1 200 OK`, `Content-Type: application/vnd.android.package-archive`,
`Content-Length: 18535932`.
Not verified in this pass: the conversation/list screenshots — the brief keeps
implementation and ordinary code review to the build and the unit tests, and
visual review owns the operator's Pixel 9 Pro XL (its captures are the ones the
brief names: a conversation with no pill, and the chat list with it).