github Darknetzz/jotty-android v1.3.0

11 hours ago

Release v1.3.0

Added

  • App screenshots — Added current application screenshots to the repository for clearer presentation in docs and project pages.
  • Setup API key guidance — Setup now includes clearer guidance for generating API keys, plus an action to open Jotty in the browser directly from the form. (SetupScreen, strings.xml.)
  • Offline conflict review banner — Notes now show a persistent local-copy warning with a View copies action when conflict copies are present, so conflict resolution is not lost after a snackbar disappears. (OfflineEnabledNotesScreen, OfflineNotesRepository, strings.xml.)
  • Offline cleanup coverage — Repository tests cover conflict-copy filtering and per-instance local note cleanup. (OfflineNotesRepositoryTest.)
  • Clearer API error messages — HTTP 401 and 403 map to dedicated strings (invalid API key / access denied). SSL/TLS failures map to a short message about HTTPS and certificates. (ApiErrorHelper, strings.xml, tests.)
  • Offline repository tests — JVM tests with in-memory Room and a fake JottyApi cover sync, server replace, and conflict “(Local copy)” behavior. (FakeJottyApi, OfflineNotesRepositoryTest; Robolectric + test dependencies.)
  • CI — GitHub Actions workflow runs ./gradlew test and ./gradlew lint on push/PR (JDK 17 + Android SDK setup).
  • UI smoke test — Instrumented test checks that MainActivity shows a Compose root (MainActivitySmokeTest).
  • build.sh — Linux build script mirroring build.ps1: Gradle wrapper bootstrap (version read from gradle-wrapper.properties), Java 11+ discovery (java on PATH, /usr/lib/jvm/*, /opt/android-studio/jbr, etc.), Android SDK detection (ANDROID_HOME, ~/Android/Sdk, /opt/..., scan for platform-tools under /opt), copies debug/release APK to jotty-android.apk.
  • local.properties.example — Documents sdk.dir and typical Studio vs SDK paths (including IDE under /opt).
  • Offline checklists — Added offline-mode support for checklists, mirroring notes behavior so checklist operations continue while disconnected and sync when connectivity returns.

Changed

  • UX polish — Startup and main-tab loading/error states now use shared centered components; tab titles live in the app bar; note detail shows the note title in the app bar. (JottyApp, MainScreen, ListScreenComponents, notes/checklists/settings screens.)
  • Navigation clarity — Settings → Manage instances keeps the Settings bottom-navigation item selected and uses the main app bar back affordance. (MainScreen, SetupScreen.)
  • API error messages — HTTP 404 maps to “Not found” and 429 maps to a rate-limit message. (ApiErrorHelper, strings.xml, tests.)
  • Checklists & offline notes UIChecklistsViewModel and OfflineEnabledNotesViewModel hold list/filter/selection state with StateFlow; screens collect via viewModel { … }. Notes search debouncing uses Flow.debounce with no delay for blank queries.
  • Offline sync routing — Replaced the fragile timestamp heuristic with an explicit isLocalOnly flag to correctly route create vs update during offline sync and avoid duplicate/lost notes.
  • README — Build requirements list Android SDK 36 to match compileSdk / targetSdk.

Fixed

  • Account switching on same server — Offline notes/checklists now recreate their ViewModel/repository when auth changes for the same instance ID, preventing stale API-key sessions from showing another account’s data. (MainScreen, OfflineNotesScreen, OfflineChecklistsScreen.)
  • Removed-instance local data — Removing a saved instance now clears that instance’s local offline notes from Room so stale data does not remain after credentials are removed. (SetupScreen, OfflineNotesRepository.)
  • Layout height — App content now uses the full height between the top and bottom bars; the root AnimatedContent and main NavHost use fillMaxSize() so there is no extra margin above or below the content area.
  • Offline sync coroutine scopeOfflineNotesRepository uses SupervisorJob + CoroutineExceptionHandler so background work is not torn down by a single failure. Optional initialOnlineOverride and registerNetworkCallback support unit tests without ConnectivityManager.
  • init block — Replaced invalid return@init with if (registerNetworkCallback) { … } so Kotlin compiles cleanly.
  • Lifecycle cleanup — Offline notes repository lifecycle is now ViewModel-owned with explicit cleanup so network callbacks/scopes are released correctly on destination teardown.
  • Category chips overflow — Replaced fixed chip rows with scrollable LazyRow behavior so all categories remain reachable.

Technical

  • build.ps1: renamed Ensure-AndroidSdk to Initialize-AndroidSdk for naming clarity and consistency.
  • gradle.properties / wrapper: build scripts download gradle-wrapper.jar matching the version in gradle-wrapper.properties (e.g. 9.1.0) and validate the JAR manifest; build.ps1 updated the same way.
  • app/build.gradle.kts: testOptions.unitTests.isIncludeAndroidResources, Room testing, Robolectric, coroutines-test; androidTest deps + testInstrumentationRunner for Compose UI tests.
  • OfflineNotesRepository.kt: constructor parameters for tests only (defaults unchanged for app use).

Credits

  • Offline improvements listed above were merged from #4. Thanks @Emilien-Etadam for the contribution.

Don't miss a new jotty-android release

NewReleases is sending notifications on new releases.