Repository navigation
[ai] properties: Show total size for local selections. - #4748
Open
carrerasdarren-cell wants to merge 1 commit into
Open
carrerasdarren-cell wants to merge 1 commit into
carrerasdarren-cell wants to merge 1 commit into
Conversation
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.
Addresses #4266.
Description
Add Properties to the selection action menu for ordinary local files and folders. Multiple selected entries show their item count and combined recursive size, calculated asynchronously using the existing size utility. Snapshot the selection before action mode closes, and discard the displayed result if the dialog is dismissed while calculation is queued.
This addresses
OpenMode.FILEselections. Other batch backends remain unavailable. The single-item action retains its established Properties dialog. This PR deliberately does not claim batch support for remote/document backends.Issue tracker
Addresses #4266.
Automatic tests
Test plan:
The selection menu must contain Properties. This is one actual assertion failure; no full original SDK matrix is claimed../gradlew :app:testFdroidDebugUnitTest --tests com.amaze.filemanager.adapters.BatchPropertiesActionModeTest: all 24 actual cases pass, with zero failures, errors or skips.These headless tests seed the real selection model, then exercise the owner's action-mode/menu/callback and asynchronous dialog. The separate emulator run below exercises actual row selection.
Manual tests
Done — physical-device testing and human manual review are not claimed.
Device: AOSP arm64 emulator, AVD
amaze3040_api29.OS: Android 10 / API 29, verified from the running image.
UI evidence
The external Espresso test long-presses a real folder row, selects a real file row, opens the contextual Properties command and checks the actual dialog. Its three synthetic files total 229,376 bytes including nested files; the dialog displays
2 itemsandTotal: 229 kB. All fixture bytes remain unchanged. Result:OK (1 test).Screenshots show the actual selection and resulting dialog:
Build tasks success
Successfully ran the following owner tasks locally:
./gradlew assembleDebug— FDroid and Play debug APKs rebuilt with changed hashes../gradlew spotlessCheck.Validation used an external SSD resource/report init script with owner tasks, dependencies and fail-fast behavior retained. No permanent build/dependency configuration changed. The entire application test suite was not run.
Generative code
This PR used generative code tools (GenAI, LLMs, etc.).
Model: OpenAI Codex; the exact model identifier is not exposed in this session.
Version: Not exposed; no specific version is claimed.
Provider: OpenAI.
Codex assisted with source inspection, implementation, tests and evidence review. AI review is not presented as human validation.