Conversation
# Conflicts: # samples/catalog-app-shared/src/commonMain/kotlin/com/metacto/catalogapp/di/ViewModelsModule.kt # samples/catalog-app-shared/src/commonMain/kotlin/com/metacto/catalogapp/presentation/main/components/MainContent.kt
…eature/phone-number
add phone number
Fix/app image issue
| fun updateVersion() { | ||
| val versionProperties = Properties().apply { | ||
| load(File(project.rootDir, "versions.properties").inputStream()) | ||
| } |
There was a problem hiding this comment.
Input stream never closed causing resource leak
Low Severity
The inputStream() created from versions.properties is passed directly to Properties.load() without using .use {} or explicitly closing it. This leaves the file handle open until garbage collection, which could exhaust file descriptors if the task runs repeatedly or in resource-constrained environments.
|
|
||
| file.writeText(content) | ||
| return file.absolutePath | ||
| } |
There was a problem hiding this comment.
Android createFile can crash while iOS handles errors gracefully
Medium Severity
The Android createFile implementation lacks error handling, while the iOS implementation wraps the operation in a try-catch and returns an empty string on failure. The IFileManager interface does not declare @Throws(Throwable::class) for createFile, indicating it should not throw. When file.writeText(content) fails on Android (disk full, permission denied, etc.), an unhandled IOException will crash the app, whereas iOS would gracefully return an empty string. This platform inconsistency could cause production crashes on Android.
|
|
||
| @Throws(Throwable::class) | ||
| suspend fun updateVideoPreviewUrl(id: Int, previewUrl: String) { | ||
| uploadService.put<Unit> { |
There was a problem hiding this comment.
Unchecked cast and array access in upload response parsing
Medium Severity
The uploadMedia function casts response.body() directly to JsonArray without validation, then accesses [0] without checking if the array is empty. If the server returns an error response (typically a JsonObject), an empty array, or any non-array response, this will crash with ClassCastException or IndexOutOfBoundsException. Upload failures would surface as cryptic parsing errors rather than meaningful error messages.
| logoutUseCase = get(), | ||
| enforceDefaultDataWrapper = configs.strapiVersion == StrapiVersion.V5 | ||
| ) | ||
| } |
There was a problem hiding this comment.
Missing DI registrations for required service dependencies
High Severity
The DI module attempts to resolve userService for CoreUserRepository and appConfigurationService for CoreAppConfigurationRepository, but neither service is registered in the module. Only HttpService is registered (from RepositoriesFactory.httpService), which is a different type. This causes Koin to throw NoBeanDefFoundException at runtime when these repositories are resolved.
Additional Locations (1)
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| fun updateVersion() { | ||
| val versionProperties = Properties().apply { | ||
| load(File(project.rootDir, "versions.properties").inputStream()) | ||
| } |
There was a problem hiding this comment.
File input stream not closed after loading properties
Medium Severity
The FileInputStream created by File(...).inputStream() is passed to Properties.load() but never closed afterward. The Properties.load() method does not close the stream—that responsibility belongs to the caller. In Gradle daemon environments where the JVM persists across builds, these leaked file descriptors accumulate and can eventually cause "Too many open files" errors when the system limit is reached.
| includes(platformModule()) | ||
| } | ||
|
|
||
| internal expect fun platformModule(): Module No newline at end of file |
There was a problem hiding this comment.
Unused empty sample module adds no functionality
Low Severity
The core/sample module was added as an empty placeholder, providing no actual functionality. It's included in the build but unused, and its build.gradle.kts contains a large commented-out publishing configuration, adding unnecessary clutter and dead code.
Additional Locations (1)
…network-core 2.0.59
…SerializableNetworkError
…not the AppException type
…he stroke width to minHeight
…dp touch target minimum
Note
High Risk
High risk due to a large-scale refactor that restructures modules/packages, replaces core configuration + networking/publishing wiring, and adds CI that mutates the repo (auto-commits version catalog updates) while publishing artifacts to GitHub Packages.
Overview
Introduces a new modular “new core” KMM layout (e.g.
core:core,core:files,core:notifications,core:phone-core,core:sample) and removes the previouscoreapp/androidAppsample app implementation, alongside broad package renames fromcom.metacto.core.utils.*tocom.metacto.core.*/com.metacto.core.extensions.Refactors core configuration and DI: replaces environment-style inputs with
CoreConfigs, adds a newcoreModule()+ platform modules, updates repositories to usecom.metacto.kmm.network/HttpService, and adds new date wrappers/serializers (CoreDate,CoreDateTime,CoreTime) plus updated relative-date APIs that acceptTimeZone.Updates build/publishing automation: switches root buildscript classpaths to the version catalog, adds
UpdateVersionCatalogTaskto bumpmetacto-coreingradle/libs.versions.tomlfromversions.properties, and adds a new GitHub Actions workflow (deployNewCore.yml) that generates versions, commits the catalog, and publishes;deployRelease.ymlis aligned toPUBLISH_CORE_VERSIONand publishes:CmpCore.Written by Cursor Bugbot for commit 124bc4b. This will update automatically on new commits. Configure here.