From 4bbceac4391541219f3e78df9da5b88cd78ed891 Mon Sep 17 00:00:00 2001 From: Jason Liu Date: Tue, 7 Jul 2026 15:10:22 +0200 Subject: [PATCH] Studio: Use model name instead of test.json, so saving becomes more targetted --- graphwalker-studio/frontend/src/App.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/graphwalker-studio/frontend/src/App.tsx b/graphwalker-studio/frontend/src/App.tsx index 308c142..51ffe8b 100644 --- a/graphwalker-studio/frontend/src/App.tsx +++ b/graphwalker-studio/frontend/src/App.tsx @@ -428,7 +428,11 @@ export default function App() { const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; - a.download = 'test.json'; + + const rawName = models[0]?.name?.trim() || 'test'; + const safeName = rawName.replace(/[^a-z0-9_-]+/gi, '_'); + a.download = `${safeName}.json`; + a.click(); URL.revokeObjectURL(url); }, [models]);