Sortable Extension column in search results
Problem¶
Search results expose a "Type" column (broad file-type group) but no column for the
raw file extension, so results cannot be grouped or sorted by extension (e.g. pdf).
Decision / scope¶
- Add a new sortable Extension column to the search results list showing each result's lowercase filename extension without the leading dot (empty when none).
- Sort is case-insensitive with extensionless results at the bottom. Reuses the
existing
IDS_SEARCHEXTENTION("Extension") label, so no new localization. - Visible by default (placed after Type in the view-preset order); no eD2K/Kad wire change.
Key files¶
srchybrid\SearchListCtrl.cpp(SEARCH_COLUMN_EXTENSION,GetSearchFileExtensionhelper,InsertColumn,iSubItems,Localize, render, both sort comparators),srchybrid\MuleListCtrlViewPresets.h(kSearchExtendedOrder).
Acceptance criteria¶
- Search results show an "Extension" column with the dot-less lowercase extension
(e.g.
pdf); clicking the header sorts ascending/descending; extensionless rows sort to the bottom. - Saved layouts and the other columns are unaffected; the column is filterable via the existing filter box.
- Debug|x64, Release|x64, Release|x64 diagnostics build clean;
validategreen.
Outcome (2026-06-11)¶
SearchListCtrl.cpp: addedSEARCH_COLUMN_EXTENSION(16) +GetSearchFileExtensionhelper (dot-less lowercase extension); wiredInsertColumn,iSubItems,Localize(reusingIDS_SEARCHEXTENTION), the render switch, and both sort comparators (CompareLocaleStringNoCasefor children,CompareOptLocaleStringNoCaseUndefinedAtBottomfor the main list).MuleListCtrlViewPresets.h:kSearchExtendedOrdernow places column 16 after Type, visible by default. No new localization strings.- Verification: Debug/Release/Release-diagnostics x64 builds clean;
validategreen.