Bump Vite 8, matrix-js-sdk, and related deps; fix immer/vanilla-extract imports for new majors. Replace blocking sync error dialog with background recovery on wake/offline, and disable Vite auto-open in dev. Add feature handoff documentation index.
2.8 KiB
2.8 KiB
Android (Capacitor / Tauri) — handoff
Summary
Paarrot ships an Android build via Capacitor and/or Tauri (src-tauri/, cinny/capacitor.config.json). Mobile-specific code handles native notifications, UnifiedPush background sync, share intents, and platform detection branching away from Electron APIs.
User-facing behavior
- Native Android app with Paarrot UI (WebView)
- Share into Paarrot from other apps (images/files → room upload draft)
- Background notifications via UnifiedPush (not FCM-only)
- No local HTTP API on mobile (Electron-only)
Architecture
Capacitor/Tauri shell
→ WebView loads cinny bundle
ClientNonUIFeatures.tsx
→ isCapacitorNative / isTauri branches
backgroundSync.ts → UnifiedPush + Matrix pusher
androidShare.ts → share intent → room draft
tauri.ts → native notification APIs
Key files
| Path | Role |
|---|---|
cinny/capacitor.config.json |
Capacitor app id, web dir |
src-tauri/src/main.rs |
Tauri Android entry |
cinny/src/app/utils/tauri.ts |
Platform detection, notifications |
cinny/src/app/utils/backgroundSync.ts |
UnifiedPush registration |
cinny/src/app/utils/androidShare.ts |
Share target handling |
cinny/src/app/pages/client/ClientNonUIFeatures.tsx |
Share listener wiring |
Data model
Same as background notifications (paarrot.unifiedpush.* localStorage).
Share payloads: ephemeral in-memory until user picks room.
Dependencies
- Capacitor plugins / Tauri mobile toolchain
- UnifiedPush distributor (ntfy, etc.)
- Android notification icon resources
Integration points
- background-notifications: primary overlap
- Room input drafts:
roomIdToUploadItemsAtomFamilyfor shared files - NOT Electron:
initPaarrotAPIskips on mobile webview
Testing
Manual
- Build Android APK/AAB per project scripts.
- Share image from Gallery → Paarrot → pick room → verify upload draft.
- Background app; trigger mention; verify UP notification.
- Tap notification → opens correct room.
Automated
- None on device CI in repo (check Gitea workflow)
Known issues & gotchas
ANDROID_NOTIFICATION_SMALL_ICON = 'ic_stat_paarrot'must exist in Android res- UnifiedPush without distributor shows user-facing error string
- Feature parity gap vs desktop (plugins, Stream Deck, local API)
- Test
isTaurivsisCapacitorNative— both may be true in some builds
Future work
- iOS Capacitor target
- Play Store release pipeline docs
- Mobile plugin sandbox policy
Related docs
Add your extra things here
listenForAndroidShares,getPendingAndroidShare,materializeSharedFileinandroidShare.ts- Capacitor app name in
capacitor.config.json— verifyappIdmatches push config