Android route hook up, sidebar and misc fixes#452
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThis PR introduces a comprehensive sidebar UI with wallet management, implements secure encrypted storage via Keychain, adds a hardware wallet import workflow with a bottom sheet interface, and refactors app initialization and routing state management to support enhanced navigation and AppManager visibility. Changes
Sequence Diagram(s)sequenceDiagram
participant App as CoveApplication<br/>(onCreate)
participant KA as KeychainAccessor
participant Device as DeviceAccessor
participant AM as AppManager<br/>getInstance()
participant MainAct as MainActivity
App->>KA: initialize Keychain
activate KA
KA-->>App: success / KeychainException
deactivate KA
alt Keychain Success
App->>Device: initialize Device/timezone
activate Device
Device-->>App: ready
deactivate Device
App->>AM: getInstance() to prepare updater
activate AM
AM-->>App: instance ready
deactivate AM
App->>MainAct: start lifecycle
else Keychain Failed
App->>App: throw RuntimeException
end
sequenceDiagram
participant User as User
participant NWS as NewWalletSelectScreen
participant BMS as ModalBottomSheet
participant IW as importWallet()
participant Rust as app.rust
participant Nav as app.popRoute()
participant Alert as app.alerts
User->>NWS: tap "Hardware Wallet"
NWS->>BMS: show bottom sheet (QR/File/NFC/Paste)
activate BMS
User->>BMS: select import method (e.g., QR)
BMS->>IW: pass content (Xpub)
deactivate BMS
activate IW
alt Wallet Creation Succeeds
IW->>Rust: create & select wallet
Rust-->>IW: wallet ID
IW->>Alert: show success
IW->>Nav: popRoute()
else Wallet Already Exists
IW->>Rust: select existing wallet
IW->>Alert: show success
else Error
IW->>Alert: show error
end
deactivate IW
sequenceDiagram
participant User as User
participant SC as SidebarContainer
participant Drag as Drag Gesture
participant SV as SidebarView
participant AM as AppManager
participant Router as app.router
User->>SC: drag from edge (when routes.isEmpty)
activate SC
SC->>Drag: track drag offset
Drag-->>SC: current offset
alt Drag passes 50% threshold
SC->>AM: isSidebarVisible = true
AM-->>SC: state updated
else Drag below threshold
SC->>AM: isSidebarVisible = false
end
deactivate SC
SC->>SV: render at currentOffset
activate SV
SV->>Router: load wallets from database
Router-->>SV: wallet list
User->>SV: tap wallet
SV->>AM: toggleSidebar()
SV->>Router: navigate to wallet
deactivate SV
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
Suggested labels
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
New Features
Chores