Skip to content

Commit 46baac9

Browse files
committed
✨ Newer translations w/o llm ranks are listed first
1 parent 9e2f5f9 commit 46baac9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

components/jargon/translation-list.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,13 @@ export default function TranslationList({
3434
copy.sort((a, b) => b.name.localeCompare(a.name, "ko"));
3535
} else if (sort === "llm") {
3636
copy.sort((a, b) => {
37-
const aRank = a.llm_rank ?? Number.POSITIVE_INFINITY;
38-
const bRank = b.llm_rank ?? Number.POSITIVE_INFINITY;
39-
if (aRank !== bRank) return aRank - bRank; // lower rank first; nulls last
37+
const aRank = a.llm_rank ?? Number.NEGATIVE_INFINITY;
38+
const bRank = b.llm_rank ?? Number.NEGATIVE_INFINITY;
39+
if (aRank !== bRank) return aRank - bRank; // lower rank first; nulls first
4040
// Stable fallback by name for ties
41+
const aTime = a.created_at ?? "";
42+
const bTime = b.created_at ?? "";
43+
if (aTime !== bTime) return aTime.localeCompare(bTime);
4144
return a.name.localeCompare(b.name, "ko");
4245
});
4346
}

0 commit comments

Comments
 (0)