feat(sort): enable versions_count sort in non-grouped mode

Sort by Most/Fewest versions first now works when Group by model is off.

- Backend: group items by modelId (respecting version_grouping setting),
  count versions per group, sort groups by count, expand groups with
  versions sorted by version id descending
- CSS: remove rule that hid the sort option in non-grouped mode
- Tests: add 3 tests covering desc, asc, and same_base variants
This commit is contained in:
Will Miao
2026-06-24 17:14:39 +08:00
parent 7a71b34b54
commit 609dc5d783
3 changed files with 175 additions and 15 deletions

View File

@@ -60,7 +60,4 @@
margin-bottom: var(--space-2);
}
/* Hide versions_count sort option when group-by-model is off */
body:not(.group-by-model) .sort-option-versions-count {
display: none;
}
/* ---------- reused from shared styles ---------- */