Improvements & fixes - #26
Merged
Merged
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Two moderate success-feedback rendering issues remain, along with a storage discovery and permission coverage gap.
Pull request overview
Adds Android storage discovery and permission handling for PRoot mount profiles, supports duplicate destinations, and improves terminal-stop progress feedback.
Changes:
- Discovers internal, removable, and USB storage with hot-plug refresh.
- Adds selected volumes to editable mount profiles.
- Allows ordered duplicate destinations.
- Declares storage permissions and shows terminal stopping progress.
File summaries
| File | Summary |
|---|---|
app/src/test/java/org/randomcoder/udroid/runtime/ProotMountProfilesTest.kt |
Tests duplicate mount destinations. |
app/src/test/java/org/randomcoder/udroid/runtime/AndroidStorageMountsTest.kt |
Tests storage target generation. |
app/src/main/java/org/randomcoder/udroid/ui/ProotMountProfilesPage.kt |
Adds storage selection UI. Moderate issue: successful additions are rendered with the error color. |
app/src/main/java/org/randomcoder/udroid/ui/ProotMountProfileDialog.kt |
Adds storage selection to profile dialogs. Moderate issue: successful additions are rendered with the error color. |
app/src/main/java/org/randomcoder/udroid/ui/LinuxSystemPage.kt |
Shows terminal stopping progress. |
app/src/main/java/org/randomcoder/udroid/runtime/ProotMountProfiles.kt |
Allows ordered duplicate destinations. |
app/src/main/java/org/randomcoder/udroid/runtime/AndroidStorageMounts.kt |
Handles storage discovery, permissions, and guest path mapping. Nit: add coverage for discovery paths and permission results. |
app/src/main/AndroidManifest.xml |
Declares storage permissions. |
Review details
Suppressed comments (3)
app/src/main/java/org/randomcoder/udroid/runtime/AndroidStorageMounts.kt:34
- The new discovery and permission branches are only exercised indirectly by the UI; the added unit test covers
guestTargetonly. Please add platform/unit coverage forStorageManager.storageVolumesenumeration (including mounted and unavailable directories), the API 30+ versus legacy discovery paths, and both permission-result branches, since regressions here can silently hide storage or leave the add controls in the wrong state.
fun discover(context: Context): List<AndroidStorageVolume> {
val manager = context.getSystemService(StorageManager::class.java)
val volumes = manager.storageVolumes
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
return volumes.mapNotNull { volume ->
app/src/main/java/org/randomcoder/udroid/ui/ProotMountProfileDialog.kt:157
validationMessageis rendered withMaterialTheme.colorScheme.errorbelow, so this success confirmation makes every storage-volume addition appear as a validation failure in the dialog. Keep success feedback separate from validation errors or render this confirmation with a success color.
onAdd = { mount ->
draft = draft.copy(customMounts = draft.customMounts + mount)
validationMessage =
"${mount.hostSource} will be available at ${mount.guestTarget}"
},
onMessage = { validationMessage = it },
app/src/main/java/org/randomcoder/udroid/ui/ProotMountProfilesPage.kt:620
- This stores a successful add confirmation in
message, but the editor renders every message that is not prefixed withConfiguration savedusing the error color (lines 707-716). Adding an Android volume is therefore shown as a failure even though the mapping was added; keep success feedback separate from validation/error messages or update that rendering branch.
onAdd = { mount ->
draft = draft.copy(customMounts = draft.customMounts + mount)
message = "${mount.hostSource} will be available at ${mount.guestTarget}"
},
- Files reviewed: 8/8 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
SaicharanKandukuri
marked this pull request as ready for review
September 18, 2026 06:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #15