Releases: softartdev/NoteDelight
Releases · softartdev/NoteDelight
desktop/8.4.9
refactor: Stabilize and multiplatform UI tests
This commit refactors the UI testing infrastructure to improve stability and enable multiplatform testing. It introduces a new `ui:test` module for common UI test logic and stabilizes tests by using idling resources.
### Key Changes
- **New `ui:test` Module**
- A new Gradle module, `ui:test`, has been created to house multiplatform UI tests.
- Existing UI test cases (`CrudTestCase`, `SettingPasswordTestCase`, etc.) and screen objects have been moved from `ui/test-jvm` to `ui:test/src/commonMain` to enable them to run on all platforms (Android, iOS, Desktop, and Web).
- `ui:test-jvm` now contains only JVM-specific utilities, such as the bridge between `ComposeContentTestRule` and the multiplatform `ComposeUiTest`.
- **UI Test Stabilization with Idling Resources**
- Introduced `CountingIdlingRes`, a new utility in `core/domain` to track the state of long-running asynchronous operations in ViewModels.
- ViewModels now increment/decrement this counter during operations like database access or encryption changes.
- A `ComposeCountingIdlingResource` has been added to `ui/test-jvm` to integrate with the Compose test framework, making tests wait for async operations to complete, thus preventing flakiness.
- **Test Tagging and Navigation**
- Added explicit test tags to UI components in security dialogs (`EnterPasswordDialog`, `ConfirmPasswordDialog`, `ChangePasswordDialog`) and the `SignInScreen` for more reliable test node selection.
- Improved the `RouterImpl` by setting `launchSingleTop = true` for all navigation actions to prevent duplicate screen instances.
- Added abstract navigation tests (`AbstractNavigationTest`) for Android and Desktop to verify router behavior.
- **Dependency and Version Updates**
- Upgraded Kotlin to version `2.3.0` and updated various other dependencies like `androidx.activityCompose` and `androidx.paging`.
- Bumped the application version to `8.4.9` for Android, iOS, and Desktop.
- Added a `CHANGELOG.md` file to document project changes.
- **Minor Refinements**
- Removed the `android_ui_test_job` dependency on `build_job` in the GitHub Actions workflow.
- Cleaned up and improved formatting in `.podspec` files.
- Added a "Save" string resource used in password dialogs.
desktop/8.4.8
feat: Enable SQLCipher encryption for Desktop JVM
This commit introduces database encryption support for the Desktop JVM target using SQLCipher, achieving feature parity with the Android and iOS versions. This was accomplished by replacing the standard `sqlite-jdbc` driver with `sqlite-jdbc-crypt`, a fork that bundles SQLCipher.
Key changes include:
- **feat(db-sqldelight):**
- Added `sqlite-jdbc-crypt` as the JDBC driver for the `jvmMain` source set.
- Updated `JdbcDatabaseHolder` to construct an encrypted JDBC URL with SQLCipher parameters (`cipher=sqlcipher`, `legacy=4`, and `key`) when a password is provided.
- Implemented `JvmCipherUtils` to handle the encryption and decryption of the database file by leveraging SQLCipher's `ATTACH` and `sqlcipher_export` functionalities.
- Added `JvmCipherUtilsEncryptionTest` to provide robust testing for the encryption/decryption logic.
- **test(desktop):**
- Enabled previously ignored encryption-related UI tests for the desktop module (`flowAfterCryptTest`, `settingPasswordTest`).
- Improved the reliability of UI tests by adding descriptive logging, explicit waits, and ensuring `requireNotNull` checks in the navigation router for better error reporting.
- **refactor(ui-test):**
- Enhanced UI test helpers (`waitUntilDisplayed`, `waitAssert`, etc.) with descriptions for better debugging and logging.
- Added logging to UI test cases (`SettingPasswordTestCase`, `FlowAfterCryptTestCase`) to trace test execution flow.
- **chore(deps):**
- Bumped various dependencies, including AGP, Firebase, Compose, and SQLCipher.
- Updated package versions for Android, iOS, and Desktop to `8.4.8`.
- **docs:**
- Updated `README.md` and `ARCHITECTURE.md` files to reflect that encryption is now supported on the Desktop JVM platform.
- **fix(android):**
- Configured the Crashlytics log writer to capture logs from `Debug` severity and higher in release builds to improve remote diagnostics.
desktop/8.4.7
feat: Add settings navigation from SignIn screen and BackHandler
- A settings icon button has been added to the `SignInScreen` top app bar, allowing navigation to the settings screen.
- The `SignInViewModel` now handles `OnSettingsClick` and `OnSignInClick` actions.
- A `BackHandler` has been added to the `SettingsScreen` to handle back navigation, returning to the splash/main screen if the back stack is empty.
feat: Introduce macOS code signing
- Added macOS code signing to the desktop build process.
- Introduced a new script (`import_macos_dev_id_cert.sh`) to import the Developer ID certificate into a temporary keychain on macOS runners.
- Created `keystore.properties` for desktop and encrypted it for CI.
- Updated the `desktop.yaml` workflow to decrypt secrets and execute the certificate import script for macOS jobs.
- Added `macOS_development.p12` to `.gitignore`.
refactor: Replace Napier with Kermit for logging
- The logging library has been migrated from Napier to Kermit across the entire project.
- Napier dependencies (`io.github.aakira:napier`) have been replaced with Kermit (`co.touchlab:kermit`).
- `Napier.x(...)` calls have been updated to `Logger.x { ... }` using lambda syntax for lazy message evaluation.
- `CrashlyticsAntilog` has been replaced with `kermit-crashlytics`.
- `NapierKoinLogger` has been replaced with `kermit-koin`.
- Custom `PrintAntilog` for tests has been replaced with a Kermit `PrintLogWriter`.
chore: Update dependencies and Gradle version
- Upgraded Gradle Wrapper from `9.2.0` to `9.2.1`.
- Bumped various library versions in `libs.versions.toml`, including KSP, Room, and AndroidX libraries.
- Bumped app version to `8.4.7`.
- Enabled Gradle's type-safe project accessors in `settings.gradle.kts`.
chore: Update GitHub Actions and CI scripts
- Updated `actions/checkout` from `v5` to `v6` in all workflows.
- Added caching for Kotlin/Native to the `kmp.yml` workflow.
- Introduced a script to extract the Kotlin version for more precise cache keys.
- Renamed encrypted `keystore.properties.gpg` to `android.keystore.properties.gpg` for clarity.
- Added a `build_quick.sh` script to speed up local builds by excluding iOS-specific tasks.
- Added `desktop.keystore.properties.gpg` and `macOS_development.p12.gpg` to encryption/decryption scripts.
docs: Improve documentation and clean up README
- Moved detailed screenshots from the main `README.md` to a separate `docs/screenshoots/screenshots.md` file.
- Added a `MANUAL_BUILD_INSTALL.md` guide with detailed instructions for all platforms.
- Updated `CONTRIBUTING.md`, `ARCHITECTURE.md`, `AGENTS.md`, and module READMEs to reflect the new logging library and build process changes.
desktop/8.4.6
feat: Implement in-app language switching - Add a language selection dialog to the settings screen, allowing users to switch between English and Russian. - Introduce `LocaleInteractor` as an `expect` class with platform-specific `actual` implementations for Android, iOS, JVM, and WasmJs to manage locale changes. - Implement `LanguageViewModel` to handle the logic for the language dialog. - Create a `LanguageDialog` composable in the `ui/shared` module. - Add UI tests (`LocaleTestCase`) to verify the language switching functionality. - Update dependencies, including Kotlin, KSP, Accompanist, and Firebase. - Refactor the `SettingsViewModel` to include a centralized error handler.
desktop/7.0.0
feat: Add in-app file explorer - Introduce a hidden file explorer screen, accessible via a secret tap gesture in the settings. - Create a new `core:data:file-explorer` module to handle multiplatform file system interactions using `Okio`. - Define `FileRepo` and `AbstractFileRepo` for navigating directories and viewing file contents. - Implement platform-specific `FileRepo` for Android, iOS, JVM, and a no-op version for WasmJS. - Add `FilesViewModel` to manage file explorer state and user actions. - Integrate `accompanist-permissions` for handling storage permissions on Android. - Refactor the `SignInScreen` to use an `AdaptiveFrame` for better layout on different screen sizes. Dependency Updates: - `actions/checkout` to `v5` - `agp` to `8.13.1` - `sqlDelight` to `2.2.1` - `okio` to `3.16.2` - `accompanist-permissions` to `0.36.0`
desktop/6.0.0
feat: Update dependencies and improve Android UI - Update various GitHub Actions to newer versions (`setup-java`, `setup-gradle`, `upload-artifact`, `action-gh-release`, `upload-pages-artifact`). - Upgrade `compose` to `1.9.3` and `androidx.core.splashscreen` to `1.2.0`. - Increment app versions for Android, iOS, and Desktop releases. - Add new adaptive icons and a splash screen theme for the Android app. - Move UI composables into `main` and `settings` subpackages for better organization. - Create `AdaptiveMainScreen` and `AdaptiveSettingsScreen` for better large-screen layouts. - Introduce `MainDetailPanePlaceholder` and `SettingsDetailPanePlaceholder` for empty detail panes.
desktop/5.0.0
Refactor: Decouple Snackbar logic and implement OPFS for Web - Introduce `SnackbarInteractor` to decouple Snackbar logic from ViewModels and Composables. - Create a `GlobalSnackbarHost` to provide a single, app-wide `SnackbarHostState`. - Make the `App` composable parameterless by using `koinInject()` for dependencies. - Remove `SnackbarHostState` passing from all screens and dialogs. - Update ViewModels to use `SnackbarInteractor` for showing messages, removing direct state manipulation. - Move `AdaptiveInteractor` to the presentation layer and `SnackbarInteractor` to a new `interactorModule`. - feat(web): Implement OPFS (Origin-Private FileSystem) for persistent database storage, replacing the previous in-memory solution. - Add a Gradle task to download the official SQLite WASM build. - Configure webpack and a custom service worker (`coi-serviceworker.js`) to set required cross-origin headers. - Update `WebDatabaseHolder` to use a custom worker (`sqlite.worker.js`) that initializes the database with the OPFS VFS. - build: Upgrade various dependencies, including Compose, Firebase, and Gradle wrapper.
desktop/4.0.0
feat: Implement adaptive UI for tablets and large screens This commit introduces a major feature enhancement by implementing an adaptive user interface that provides a two-pane layout for tablets and larger screens, significantly improving the user experience on these devices. The presentation layer has been refactored to use a unidirectional data flow with sealed `Action` interfaces, simplifying event handling and making the UI more predictable. ### Adaptive UI - Implemented `AdaptiveScreen` using `ListDetailPaneScaffold` to display a list-detail layout. - Integrated `ThreePaneScaffoldNavigator` for managing navigation between the list and detail panes. - Introduced `AdaptiveInteractor` to coordinate the selected note state between `MainViewModel` and `NoteViewModel`. - Updated `MainScreen` and `NoteDetail` to work within the adaptive layout, including selection highlighting in the note list. - Added a placeholder for the detail pane when no note is selected. ### Refactor: Unidirectional Data Flow with Action Interfaces - Refactored all ViewModels (`Main`, `Note`, `Settings`, `Security`, `Dialogs`) to use a single `onAction(Action)` method for handling UI events. - Defined sealed `Action` interfaces for each screen to provide type-safe, explicit event handling. - Removed multiple lambda callbacks from `Result` state classes, simplifying Composable function signatures and improving state management. ### Web (WASM) - Fixed the WebAssembly compilation error by implementing a robust Webpack plugin (`SQLJsWasmFixPlugin`) to normalize `sql-wasm.wasm` paths. - The plugin handles various incorrect path patterns and ensures all required `sql.js` files are correctly copied and referenced. - The web app is now fully functional on GitHub Pages. ### Documentation & Housekeeping - Added comprehensive `README.md` files for every module in the project, detailing their architecture, purpose, and usage. - Created guides for architecture, testing, version management, and AI agent contributions in the `/docs` directory. - Upgraded Gradle and multiple library dependencies to their latest versions. - Cleaned up the CI workflow for the web build and removed redundant build attempts in the KMP workflow.
desktop/3.0.0
Remove dependency on ui_test_job in build unit test publish job
desktop/2.1.0
Add wasmJs target; refactor project structure; rename files and direc…