Found during review of #456.
The index is sorted server-side with byte order (items.sort_by on name in src/web/builders.rs), so uppercase names sort before lowercase and "Recipe 10" sorts before "Recipe 9". The client-side sorter in templates/recipes.html then re-sorts with Intl.Collator (numeric, case-insensitive) on load. Two consequences: the no-JS first paint of the static site shows a different order from what JS settles on, and there is a theoretical reorder flash.
Fix: sort server-side with a case-insensitive natural key so both agree, or drop the client re-sort on load.
Found during review of #456.
The index is sorted server-side with byte order (
items.sort_byonnameinsrc/web/builders.rs), so uppercase names sort before lowercase and "Recipe 10" sorts before "Recipe 9". The client-side sorter intemplates/recipes.htmlthen re-sorts withIntl.Collator(numeric, case-insensitive) on load. Two consequences: the no-JS first paint of the static site shows a different order from what JS settles on, and there is a theoretical reorder flash.Fix: sort server-side with a case-insensitive natural key so both agree, or drop the client re-sort on load.