From 2a77856a4e0a3f7cf8eb975ea11b5f14ef9b6d83 Mon Sep 17 00:00:00 2001 From: cc Date: Tue, 14 Apr 2026 19:58:15 +0200 Subject: [PATCH] Persist diff state in URL and simplify binary detail header - Store compareWith version in URL as diff param for shareable links - Remove redundant Entitlements title - Show full path as muted subtitle --- src/app/os/bin/page.tsx | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/app/os/bin/page.tsx b/src/app/os/bin/page.tsx index 3921766..10fc750 100644 --- a/src/app/os/bin/page.tsx +++ b/src/app/os/bin/page.tsx @@ -44,10 +44,22 @@ export default function BinaryDetail() { const [xml, setXML] = useState(""); const [xmlKeys, setXMLKeys] = useState>(new Set()); const [history, setHistory] = useState([]); - const [compareWith, setCompareWith] = useState(null); const [compareXml, setCompareXml] = useState(""); const [compareLoading, setCompareLoading] = useState(false); + // Read compareWith from URL + const compareWith = params.get("diff"); + + const setCompareWith = (value: string | null) => { + const newParams = new URLSearchParams(params.toString()); + if (value) { + newParams.set("diff", value); + } else { + newParams.delete("diff"); + } + router.replace(`/os/bin?${newParams.toString()}`, { scroll: false }); + }; + useEffect(() => { setMounted(true); }, []); @@ -220,16 +232,9 @@ export default function BinaryDetail() { {/* Main content */}
-
-
-

Entitlements

-

- - {path} - -

-
-
+

+ {path} +

{loading && (