diff --git a/apps/yaak-proxy/components/Sidebar.tsx b/apps/yaak-proxy/components/Sidebar.tsx index 47241f5f..903b19d2 100644 --- a/apps/yaak-proxy/components/Sidebar.tsx +++ b/apps/yaak-proxy/components/Sidebar.tsx @@ -154,7 +154,10 @@ function buildTree(exchanges: HttpExchange[]): TreeNode { children: [], draggable: false, }; - for (const child of trie.children.values()) { + const sortedChildren = [...trie.children.values()].sort((a, b) => + a.label.localeCompare(b.label), + ); + for (const child of sortedChildren) { node.children?.push(toTreeNode(child, node, depth + 1)); } return node;