Repository navigation
audit: sort Search results by displayed name - #149
Merged
Merged
Conversation
StanleyLl0yd
force-pushed
the
audit/search-basename-sort
branch
from
October 12, 2026 13:23
b7b2095 to
79646ff
Compare
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.
Repository-wide audit correctness fix for #145.
Original exact audit baseline:
a866d398b3337ccb71e8aec4d671847e39b3f169.Updated exact base after #148 merge:
2b5972dfd6328da9283830d36a3c339293afc626.Current re-synced exact PR head:
79646ff4bd8e53b47209031001f20a5e50e83db1.Finding:
SortOption.namecompares the entireFolderUsage.path. Tree siblings usually have a shared prefix, but flattened Search results may come from different parents; the chosen Name sort then follows parent directories instead of the displayed basename.Changes:
lhs.namevsrhs.namewith the existing localized case-insensitive comparison;FolderUsage.namelastPathComponent once per access, rather than twice (same fallback semantics);SortOption.nameand the actual Search presentation preprocessor.Exactly three files:
Utilities.swift,FolderUsage.swift, andDiskUsageTests/FolderUsageTests.swift.No scanner, filesystem, Trash, pagination, persistence, localization resources, dependencies, workflows or release changes.
Merge only after full exact-head CI/Security/Dependency Review/CodeQL and zero review threads, and after preceding merged-main gates are green. Verify exact-main after merge.