Revert "feat: persist sort param in URL for bookmarkability"

This reverts commit c8a267f10d.
This commit is contained in:
Nick Tindle
2026-02-01 17:21:57 -06:00
committed by Otto (AGPT)
parent 59b5e64c29
commit 1ace125395
2 changed files with 3 additions and 9 deletions

View File

@@ -2,7 +2,7 @@
import { LibraryAgentSort } from "@/app/api/__generated__/models/libraryAgentSort";
import { parseAsStringEnum, useQueryState } from "nuqs";
import { useCallback, useEffect, useMemo, useState } from "react";
import { useCallback, useMemo, useState } from "react";
const sortParser = parseAsStringEnum(Object.values(LibraryAgentSort));
@@ -11,12 +11,6 @@ export function useLibraryListPage() {
const [uploadedFile, setUploadedFile] = useState<File | null>(null);
const [librarySortRaw, setLibrarySortRaw] = useQueryState("sort", sortParser);
useEffect(() => {
if (!librarySortRaw) {
setLibrarySortRaw(LibraryAgentSort.lastExecuted, { shallow: false });
}
}, [librarySortRaw, setLibrarySortRaw]);
const librarySort = librarySortRaw || LibraryAgentSort.lastExecuted;
const setLibrarySort = useCallback(

View File

@@ -182,7 +182,7 @@ test("logged in user is redirected from /login to /copilot", async ({
await hasUrl(page, "/marketplace");
await page.goto("/login");
await hasUrl(page, "/library?sort=lastExecuted");
await hasUrl(page, "/library");
});
test("logged in user is redirected from /signup to /library", async ({
@@ -195,5 +195,5 @@ test("logged in user is redirected from /signup to /library", async ({
await hasUrl(page, "/marketplace");
await page.goto("/signup");
await hasUrl(page, "/library?sort=lastExecuted");
await hasUrl(page, "/library");
});