Skip to content

Mobile support: iOS and Android via Tauri v2 #171

@careck

Description

@careck

Summary

Add iOS and Android support to Krillnotes by building mobile targets from the existing krillnotes-desktop package using Tauri v2's native mobile support. The krillnotes-core library is already Tauri-independent and compiles cleanly for mobile targets with one prerequisite fix (device ID).

Branch: mobile (exploratory — single-package approach)
Target devices: Android phone, iPad (tablet)
Design spec: docs/superpowers/specs/2026-04-29-mobile-support-design.md

Phased Scope

Phase 1 — MVP

  • Device ID migration (all platforms) — replace mac_address crate with persisted UUID in workspace_meta + app-level seed file
  • Tauri mobile scaffoldingtauri ios init / tauri android init, #[cfg(desktop)] guards for menu/multi-window
  • Adaptive layout with three breakpoints:
    • Phone (<640px CSS) — stack navigation (tree ↔ note), bottom nav bar (Tree/Search/Tags/More)
    • Tablet portrait (640–1024px) — compact sidebar + note panel, draggable divider with touch support
    • Tablet landscape (>1024px) — full desktop-like layout
  • New components: MobileNav.tsx (stack navigator), useLayout() hook, bottom nav bar, toolbar hamburger menu (replaces native menu on mobile/tablet)
  • Touch UX: 44px tap targets, long-press context menu, swipe-back, safe area padding, virtual keyboard awareness
  • Core features: tree browsing, note viewing/editing, search, tags, workspace open/create

Phase 2

  • Multi-device sync (same identity across desktop + mobile)
  • Attachments with camera capture

Phase 3

  • Script editor (mobile-friendly)
  • RBAC permission UI
  • Operations log, import/export

Future

  • CI/CD via GitHub Actions (fastlane for TestFlight + Google Play distribution)

Key Design Decisions

  • Single package — build mobile from krillnotes-desktop, not a separate crate. Tauri v2 supports this natively. Pivot to separate package if this hits a wall.
  • Device ID — persisted UUID with priority chain: workspace_metaoperations table → app-level seed file → generate new. Migration gate blocks new workspace creation until an existing workspace is opened (to preserve relay/sync identity).
  • NavigationMobileNav wrapper for phone stack nav; existing WorkspaceView with different defaults for tablet. useLayout() hook drives the switch.
  • Menu — native menu bar is desktop-only (#[cfg(desktop)]). Mobile/tablet use toolbar hamburger button (☰) with dropdown.
  • Tags — bottom sheet on phone (via bottom nav bar icon), in sidebar on tablet.

Technical Notes

  • Cargo.toml already has crate-type = ["staticlib", "cdylib", "rlib"] — mobile-ready
  • All crypto deps (ChaCha20, Ed25519, X25519, Argon2, AES-GCM) are pure Rust — cross-compile clean
  • SQLCipher uses bundled-sqlcipher-vendored-openssl — no system lib dependency
  • SQLCipher Android x86_64 emulator crash is mitigated (dev machine is Apple M2 — ARM64 emulator natively)
  • No #[cfg(target_os)] guards in krillnotes-core — no platform-specific code to worry about

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions