android: collapse the roster identity block into a dropdown #146
Loading…
Reference in a new issue
No description provided.
Delete branch "onionwire/t_d62da406-android-roster-collapse-the-identity-blo"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
The roster's identity card ate the top of the page:
Mono(fingerprint)is a 64-hex string that wraps to several lines on a phone, and the full onion is a second block under it. Collapse the block into a disclosure, closed by default.What changed
android/app/src/main/java/com/siriusdevops/onionwire/ui/RosterScreen.ktvar identityExpanded by rememberSaveable { mutableStateOf(false) }— closed by default, survives a rotation, never written to the store.Row:Label("YOU (stable forever)")+Mono(shortId(fingerprint))+ a trailing chevron (▸closed /▾open).Mono(fingerprint),Label("ONION (locator — rotates)"),Mono(onion). The rawready.fingerprint/ready.onionvalues pass through untouched — nothing is truncated in the expanded state.sdk …line andkeepAliveNotestay outside the disclosure. The keep-alive denial is the only place that note appears, so hanging it off a collapsed block would make the denial invisible.shortId(id: String, head: Int = 6, tail: Int = 4):headcharacters + U+2026 +tailcharacters, returned unchanged whenid.length < head + tail + 1(so empty stays empty).android/app/src/test/java/com/siriusdevops/onionwire/ui/RosterIdTest.kt(new)Seven JVM cases: the 64-hex fingerprint (
9f2c41…6a49), head and tail are literal slices of the input, customhead/tail, thehead + tail + 1boundary from both sides, shorter-than-abbreviation unchanged, empty unchanged, single U+2026 (not three dots).No other file touched.
Label/Mono/ConfirmStripsignatures are unchanged.Evidence
Unit test (CI does not run Kotlin unit tests —
.forgejo/workflows/android-ci.ymlassembles:sdk+:apponly):Device evidence:
-Ponionwire.abis=x86_64slice installed on AVDow35b(x86_64, google_apis API 35), collapsed and expandeduiautomatordumps are pasted in the task card. CI does not cover the pixels; the dumps do.