ui: app shell, messenger and invite refresh (plan P2 and P3)

Plans P2 and P3 are one change: the shell decides who calls the roster, so the
roster cannot land before it. The tree is green at this commit, which is why
they are not split.

Shell (P2)
- The horizontal text-link bar is gone. Three top-level destinations hang off a
  persistent 64dp bottom bar — Chats (default), Wallet, Node and Settings — and
  everything else is a sub-screen behind a chevron.
- MainActivity owns the shell: a Scaffold with the tab bar around a NavHost of
  chats / wallet / settings plus share, paste, chat, profile, wallets and
  rotate. Tab selection pops back to the start destination and restores saved
  state, so a chat left open behind the Wallet tab survives a trip to Settings.
- The node keeps living on the wallet screen, where its card already is, so the
  third tab is the security surface: profile, saved wallets, rotate identity,
  delete message history, the keep-alive status row, and — disclosed here
  instead of under the roster — the identity/SDK lines that made the home screen
  read as a test build.
- OwTopBar: 20sp bold title, optional "Tor active" pill beneath it, a 36dp
  padlock surface for Lock, and the overflow. Rotate identity, saved wallets and
  delete history live in the overflow; the destructive two go through a typed
  confirmation dialog or the typed ROTATE screen, never a single tap.
- Insets: the tab bar consumes the navigation-bar inset and
  LocalBottomBarPresent tells screens inside the shell not to pad for it again,
  so there is no double gap above the tabs and the IME still wins when the
  keyboard is up.
- window.isNavigationBarContrastEnforced = false on Q+, so the system's
  translucent scrim does not draw a second band over the canvas.

Messenger (P3)
- The identity block is one bar: identicon, "Your identity", the truncated
  fingerprint in mono, a copy-invite icon and a QR icon. Gone from here: the
  YOU (stable forever) card, the "sdk … · identity = ed25519 pubkey" line and
  the keep-alive paragraph. The full fingerprint and locator stay on the profile
  and invite screens.
- The empty state says what to do and offers both ways out ("Add contact",
  "Share my invite"), and keeps the honest sentence: invites are not
  discoverable.
- Friend rows: petname, short mono fingerprint, and a locator shortened as
  head…tail.onion — the suffix is never the part that is cut, and a v3 onion is
  never soft-wrapped.
- Invite sharing shows a QR of the payload beside the copyable text; the clip is
  marked sensitive on API 33+.

No ViewModel, SDK, Tor or wallet call changed. Every callback is the call the
old screens made; the wallet screens are untouched for the next card.
This commit is contained in:
agent 2026-10-28 23:51:51 -04:00
commit 0283e6bf48
No known key found for this signature in database
13 changed files with 1228 additions and 406 deletions

View file

@ -344,6 +344,20 @@ The cuprated graph is built with Rust 1.98 here, the same floor as `ci.yml`
(`rust-version = "1.98"`). Job timeout is **90** minutes on `android-release.yml` and **120**
on `android-ci.yml`.
## App shell
Three top-level destinations, one persistent bottom tab bar
(`ui/components/BottomTabBar.kt`): **Chats** (default), **Wallet**, and **Node &
Settings**. Sub-screens (chat, invite share, add contact, rotate, profile, saved
wallets) keep a chevron back button and hide the bar. The rare and destructive
actions — rotate identity, delete message history, saved wallets — are behind the
`⋮` overflow and a typed confirmation, not on the home screen.
Colours, radii and type live in `ui/Theme.kt` as `OwColors` / `OwRadius` /
`OwSize`; new UI takes tokens from there instead of `MaterialTheme` defaults.
Monospace is reserved for pubkeys, truncated onion locators, seeds, `host:port`
and block heights — never for a sentence.
## Layout
```
@ -363,25 +377,33 @@ android/
build.gradle.kts
src/main/AndroidManifest.xml
src/main/java/com/siriusdevops/onionwire/
MainActivity.kt # NavHost
MainActivity.kt # app shell: bottom tabs + NavHost
WireViewModel.kt # UI-side Wire handle; wallet-child poller
crypto/ # Keystore-wrapped store passphrase
keepalive/ # NodeHost, KeepAliveService, policy, lifetime
wallet/ # ChainStorage, WalletChildBinaries
ui/ # Compose screens (M3)
components/ # design system: OwButton, OwSegmentedControl,
# OwAlertBanner, OwCard, OwTopBar, OwBottomTabBar,
# OwConfirmDialog, OwQrCode, Identicon
WalletScreen.kt
WalletManagerScreen.kt
WalletChildStatusText.kt
ChatScreen.kt
RosterScreen.kt
InviteScreens.kt
RosterScreen.kt # Chats tab: identity bar + roster
SettingsScreen.kt # Node & Settings tab
ProfileScreen.kt
InviteScreens.kt # share (QR + text) and paste-a-contact
InviteAddFlow.kt
OutboxDetail.kt
MessageDelivery.kt
UnlockScreen.kt
UnlockSubmit.kt
SeedBackupGate.kt
RotateScreen.kt
Insets.kt
Theme.kt
Insets.kt # systemBars ∪ ime, minus the tab-bar inset
Theme.kt # design tokens: palette, radii, sizes, typography
src/main/res/drawable/ic_ow_*.xml # single-colour design-system icons
src/test/ # JVM: envelope, store, invite, outbox, keepalive, wallet line, refresh loop
src/androidTest/ # device-only: AndroidKeyStore
src/main/jniLibs/arm64-v8a/libmonerowalletrpc.so