From 959194e207ecd43003737fe8f32d559278e08637 Mon Sep 17 00:00:00 2001 From: BlueManCZ Date: Wed, 6 May 2026 20:24:38 +0200 Subject: [PATCH] fix(filters): pin filter sort to a stable locale `localeCompare()` and `toLocaleLowerCase()` use the host locale by default, which makes the resulting filter checkbox order machine-dependent. Under `cs_CZ.UTF-8`, for example, "Check Suite" sorts after "Co...", "De..." entries because Czech treats "ch" as a digraph that collates after "h", causing the `SubjectTypeFilter` and `Filters` snapshot tests to fail for non-English contributors while passing in CI. Pin the comparator to `'en'` and use `toLowerCase()` so the order is stable across machines. The filter type labels are hardcoded English strings (no i18n in this app), so sorting them in English is semantically correct. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/renderer/components/filters/FilterSection.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/filters/FilterSection.tsx b/src/renderer/components/filters/FilterSection.tsx index c313bf3be..403a9de01 100644 --- a/src/renderer/components/filters/FilterSection.tsx +++ b/src/renderer/components/filters/FilterSection.tsx @@ -74,9 +74,10 @@ const FilterSectionComponent = ({ .sort((a, b) => filter .getTypeDetails(a) - .title.toLocaleLowerCase() + .title.toLowerCase() .localeCompare( - filter.getTypeDetails(b).title.toLocaleLowerCase(), + filter.getTypeDetails(b).title.toLowerCase(), + 'en', ), ) .map((type) => {