From 6d1d4bfeb52f446e089ccbd9283603d1239c81cd Mon Sep 17 00:00:00 2001 From: Marius Mutu Date: Wed, 29 Apr 2026 14:16:32 +0000 Subject: [PATCH] fix(files): support ?file= param as login-safe alternative to #hash Hash fragments never reach the server so they're lost during login redirects. ?file= survives the ?next= flow; #hash still works for direct access when already logged in. Co-Authored-By: Claude Sonnet 4.6 --- dashboard/files.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dashboard/files.html b/dashboard/files.html index f4cf40b..4c455b4 100644 --- a/dashboard/files.html +++ b/dashboard/files.html @@ -1807,10 +1807,13 @@ }); function getPathFromURL() { + // ?file= survives login redirects; #hash works when already logged in. + const qp = new URLSearchParams(window.location.search).get('file'); + if (qp) return decodeURIComponent(qp); const hash = window.location.hash; return hash ? decodeURIComponent(hash.slice(1)) : ''; } - + window.addEventListener('hashchange', () => loadPath(getPathFromURL())); document.getElementById('codeEditor').addEventListener('input', function() {