diff --git a/orchestrator/src/client/pages/OrchestratorPage.tsx b/orchestrator/src/client/pages/OrchestratorPage.tsx index 95539e0..c6fc6ee 100644 --- a/orchestrator/src/client/pages/OrchestratorPage.tsx +++ b/orchestrator/src/client/pages/OrchestratorPage.tsx @@ -80,14 +80,18 @@ export const OrchestratorPage: React.FC = () => { const sort = useMemo((): JobSort => { const s = searchParams.get("sort"); if (!s) return DEFAULT_SORT; - const [key, direction] = s.split(":"); + const [key, direction] = s.split("-"); return { key: key as any, direction: direction as any }; }, [searchParams]); const setSort = (newSort: JobSort) => { setSearchParams( (prev) => { - prev.set("sort", `${newSort.key}:${newSort.direction}`); + if (newSort.key === DEFAULT_SORT.key && newSort.direction === DEFAULT_SORT.direction) { + prev.delete("sort"); + } else { + prev.set("sort", `${newSort.key}-${newSort.direction}`); + } return prev; }, { replace: true },