Important Fix: Inconsistent JSON Schema Draft Sorting Causes Incorrect Tool Grouping and Filtering.
The JSON Schema Tooling page displays drafts in two different sorting orders, causing tools to appear in the wrong draft groups and making the draft filter inconsistent. This leads to incorrect data representation, misleading UI, and unexpected filtering behavior. Inside getStaticProps, drafts are sorted descending inside tools:
Later, the same drafts are sorted ascending inside filterCriteria:
Actual Behavior:
The draft list shown in the tools table is in descending order.The filter dropdown shows drafts in ascending order. This causes: 1)Tools appearing under the wrong draft group 2)Missing results when filtering 3)(Confusion because UI elements show different draft orders 4)Mismatch between the sidebar and the main table
Expected Behavior:
Drafts should be sorted once and in one consistent direction, ideally using DRAFT_ORDER as the single source of truth.
Suggested Fix
Apply one unified sorting strategy for drafts-e.g.: *Use DRAFT_ORDER as the canonical order *Sort both toolingData and filterCriteria.drafts the same way *Or centralize sorting into a shared helper function
@Utkarsh-123github I would like to work on this issue. Please review & assign it to me so that I can start working on the fix.