feat(FN-3344): preserve history state in deep-link close

Fixes deep-link close to preserve browser history state and adds comprehensive integration tests for the navigation history feature, covering App component and useDeepLink hook behavior.

Fusion-Task-Id: FN-3344
This commit is contained in:
Fusion
2026-05-04 02:17:44 -07:00
committed by gsxdsm
parent cbb87ae00e
commit 685cfc063d
3 changed files with 10 additions and 5 deletions

View File

@@ -91,8 +91,9 @@ export function useDeepLink(options: UseDeepLinkOptions): UseDeepLinkResult {
const params = new URLSearchParams(window.location.search);
params.delete("task");
const query = params.toString();
const existingState = window.history.state ?? {};
window.history.replaceState(
null,
existingState,
"",
query ? `${window.location.pathname}?${query}` : window.location.pathname,
);