android: profile screen — nickname + Monero receiving address #148
Loading…
Reference in a new issue
No description provided.
Delete branch "onionwire/t_54329f2b-android-profile-screen-nickname-monero-r"
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?
What
The Android half of the TUI's
/profile. A Profile action on the roster's app bar opens a newui/ProfileScreen.ktwhere this identity sets its nickname, bio, and the Monero receiving address friends pay to.Why it matters
Node::wallet_receive_address()answers with the wallet child's own subaddress while the child is up, and the profilexmr_addrotherwise; with neither, the invoice path fails outright. Until now the phone had no way to set either, so every inbound invoice depended on the wallet child running.Design
"profile", entry point is aProfileTextButtonin the roster's existingTopAppBaractions, besideLock(which is untouched). Wired through a newonOpenProfile: () -> Unitparameter and acomposable("profile")inMainActivity.kt.set_self_profilevalidates nickname (≤ 64 bytes), bio (≤ 512), newlines, and a non-empty address. The screen pre-checks the address withuniffi.onionwire_sdk.checkAddressso a typo is refused before the write, with the typed text still in the field, rather than surfacing as a store error afterwards.self_profile()immediately before the write, so a bio set in the TUI cannot be blanked from the phone.src/tui.rs::save_profile. A push failure is never a save failure: the status always starts withprofile saved, names the count, and lists each failure by petname (elseshortId(fingerprint)).Files
New symbols:
ProfileScreen(vm, onBack),ProfileDraft,ProfilePushOutcome,ProfileDraft.normalized(),profileSaveEnabled,profileAddressProblem,bioToWrite,friendLabel,profileStatusLine,profileAddressNotice,PROFILE_SAVED;WireViewModel.selfProfile() / setSelfProfile() / pushSelfProfile();RosterScreen(onOpenProfile).Verification
Unit tests (forced re-run — CI does not run Kotlin unit tests)
./gradlew :app:testDebugUnitTest --rerun -Ponionwire.abis=x86_64→ BUILD SUCCESSFUL, the whole:appsuite re-executed at2026-09-22T06:12:04Z: 163 tests, 0 failures, 0 errors, 0 skipped;ProfileDraftTest21/21 (xml sha2565516831f889deca58038b9c981453064cfe8466e1f2dd642490db37913a487f8).The cases that matter: the save button is dead before the first read and while the form is unchanged, live when dirty, and indifferent to edge whitespace; an empty nickname is saveable (the core allows it, the TUI allows it, the roster already falls back to the fingerprint) — asserted explicitly; the address predicate is not even called for an empty address and sees the trimmed value that would be written; the bio rule (
draft wins only when edited, otherwise the freshly stored value) has its own case; the status-line aggregation covers empty roster / all sent / partial / all failed.Device (AVD
ow35, x86_64, API 35,emulator-5560)Built with
-Ponionwire.abis=x86_64; installed APK sha2562a305bde7561b0cb60f1a59bb44e47dbda2bf493f26905894cae3d3b0c86d19ematches the built APK. Driven by coordinates read fromuiautomator dump.Profile[778,194][885,247]besideLock[954,194][1033,247]not-an-address→ tap Save →invalid Monero addressshown,not-an-addressstill in the field, no status line (no write)profile savedam force-stop(pid gone) → relaunch → Unlock → Profile:lance-emu/bio set on the phone/4AdUnd…Rgeall still thereprofile saved · sent to 1 friendsvc data/wifi disable) → save →profile saved · sent to 0 of 1 friend · failed: 0a144d…34bf: connect i2mkeacc…aid.onion:80: tor: error connecting to Tor: Failed to obtain hidden service circuitDumps (
uiautomator) are attached: before force-stop, after relaunch, the network-down failure, and the roster with the friend.Not verified
an_untouched_bio_writes_back_what_the_store_holds_now,an_edited_bio_writes_what_the_user_typed,padding_a_bio_is_not_an_edit) only — there is no TUI build on this host to set a bio behind the screen's back. On the device the bio round-tripped through the store and the process restart; the "field untouched wins over the fresh read" rule was not exercised end to end.cargoresolves to Arch's/usr/bin/cargo, whose sysroot carries no Android targets); CI builds it via the rustup toolchain.src/,crates/).