android: collapse the roster identity block into a dropdown #146

Merged
sirius merged 2 commits from onionwire/t_d62da406-android-roster-collapse-the-identity-blo into main 2026-09-22 04:31:23 +00:00

2026-09-22

Merge branch 'main' into onionwire/t_d62da406-android-roster-collapse-the-identity-blo
All checks were successful
android-ci / android (pull_request) Successful in 12m1s
2026-09-22 04:31:06 +00:00
agent
android: collapse the roster identity block into a dropdown
All checks were successful
android-ci / android (pull_request) Successful in 12m26s
The identity card's full fingerprint wraps to several lines on a phone and
pushes the friend list off the first screen. Collapse it: one line by
default (label + `shortId(fingerprint)` + chevron), the full fingerprint and
the full onion behind a tap, in the order they already had.

The `sdk …` line and `keepAliveNote` stay outside the disclosure — the
keep-alive denial is the only place that note appears, so hanging it off a
collapsed block would hide it.

`shortId` is a pure top-level function (`head … tail`, unchanged when the
value is no longer than the abbreviation, empty stays empty) so the collapsed
line is a slice of the value shown expanded, not a parallel encoding. The
expand state is `rememberSaveable`: a rotation keeps what the user chose, and
nothing about it belongs in the store.

RosterIdTest covers the abbreviation on the JVM (7 cases: the 64-hex
fingerprint, the head/tail boundary, custom head/tail, shorter-than-input,
empty, single-char ellipsis).
2026-09-22 00:28:39 -04:00