Repository navigation
fix(architectures): pin the tag and card sort to English collation - #2033
Merged
mrbobbytables merged 1 commit intoOct 31, 2026
Merged
Conversation
cncf#2016 pinned eight filter-option comparators to English collation and left the tag dropdown and the alphabetical card order on the runtime default. A visitor whose locale collates the digraph ch as one letter (Czech, traditional Spanish) hydrates a different option order than the HTML served to them, so React re-renders the tag select client-side. Route both through compareLabels and pin the order with a child-process run under cs_CZ. Refs cncf#2031 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
✅ Deploy Preview for endusers ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
[scanner] Verified locally against the PR head (8e2df6c):
LGTM from the scanner lane. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=kimi-k3 copilot=1.0.88 |
Contributor
There was a problem hiding this comment.
Read the change against the tree at the PR head; this looks correct to me.
src/components/ArchitectureFilters/index.js:34-38and:70-71were the only two comparators in the component still on barelocaleCompare; both now route throughcompareLabels(src/components/shared/compareLabels.js:14,localeCompare(b, 'en')), matching the other option lists pinned by #2016. No caller ofsortArchitectures/useArchitectureFilterOptionsdepends on locale-sensitive order.- The claimed hydration mechanism checks out:
tagKeylowercases but keeps thechdigraph, so a cs-collating runtime really would orderchaos engineeringafterci-cddifferently from the build host. - Tests discriminate: the child-process probe in
tests/architecture-filters.test.mjsruns the sort underLC_ALL=cs_CZ.UTF-8, and the UI test self-checks that its fixture pair actually separates undercsbefore pinning the literal order — so neither can go stale silently.
No findings. All checks green at 8e2df6c.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88
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.
Summary
#2016 pinned eight of the nine comparators in
src/components/ArchitectureFilters/index.jsto English collation. The tag dropdown andcompareAlphabetical(the card order under both sort options) stayed on the barelocaleCompare, so they order by the runtime's default locale. Czech collates the digraphchas one letter afterh, so a visitor on a cs-family or traditional-Spanish locale hydratesChaos engineeringafterci-cdwhile the served HTML has it before, and React recovers from the mismatch by re-rendering the tag select client-side.Both now go through the existing
compareLabels.Remit: a rendering defect on
/architecturesfor visitors on cs-family and traditional-Spanish collations (hydration mismatch and a tag dropdown ordered on a different rule from the three beside it).Refs #2031 (the tag-sort finding folded onto it on 2026-10-31; the industry-guard half of that issue is not in this diff).
Tests
tests/architecture-filters.test.mjs: runssortArchitecturesin a child process underLC_ALL=cs_CZ.UTF-8and requires the English order. Fails before the fix, passes after.tests/architecture-filters-ui.test.mjs: pins theChaos engineering/ci-cd/cloud nativeorder as a literal, with a self-check that the pair discriminates undercs.Verification
node --test tests/architecture-filters.test.mjs tests/architecture-filters-ui.test.mjs: 52 pass; 51 pass / 1 fail with thesrc/change revertednpm run test:mutation -- --mutate src/components/ArchitectureFilters/index.js: 100.00 (142 killed, 0 survived)check:format,check:lint(changed files),check:spelling,check:duplication(244/245, 37/37, unchanged) clean