Skip to content
sysout.dev

Sort-Derived Grouping And Calmer Metadata

Delivered section grouping and compact metadata derived from Treeger's active sort choice.

Outcome

Folder contents and search results use the active Sort choice to create visible sections in both List and Grid. Grouping is not a second preference and cannot contradict the selected ordering.

The initial Sort for users without a stored preference is Newest. Existing stored Sort choices remain unchanged.

Group Rules

Directories remain first in one Folders section because directory sizes are not available and directory modified dates are often misleading. The active Sort still orders directories inside that section.

Files use these groups:

  • Newest / Oldest: Today, Yesterday, then one localized heading for each day.

  • Name A-Z / Z-A: one locale-aware letter heading; names beginning with a number, symbol, or other non-letter use #, which remains last.

  • Type A-Z / Z-A: one friendly extension/type heading. Common aliases such as JPG and JPEG share JPEG; files without usable type information use Other.

  • Smallest / Largest: 0-1 MB, 1-10 MB, 10-100 MB, 100 MB-1 GB, and 1 GB+, using binary file-size boundaries. Direction reverses the section order.

Items remain ordered by the active Sort inside their derived section. An unknown date or size has an explicit fallback group.

Information Density

Ordinary files show size as their single supporting value. Date moves to the section heading, avoiding the same date on every item. Directories do not repeat a Folder supporting label.

Grid retains two filename lines because generated camera and screenshot names often share a long prefix. Every Grid filename reserves two lines so neighboring tiles align even when one name is short. List and Grid reserve enough trailing scroll space for the create-folder action.

Recursive search results continue to show In <location> instead of size when location context is needed. The same sort-derived section model is used for normal browsing, current-folder search, and recursive search.

Delivery Boundary

Sort remains a global persisted preference. Per-folder Sort memory and density are still deferred. Thumbnail decoding and crop behavior are unchanged by this polish.

Verification Boundary

Unit coverage fixes locale, time zone, current time, threshold values, direction, unknown metadata, type aliases, and the Folders exception. Build verification covers unit tests, lint, and a debug APK. Device checks cover List/Grid section headers, Sort changes, calmer metadata, search results, selection, and final-row clearance above the floating action.