diff --git a/src/renderer/navigation/history.ts b/src/renderer/navigation/history.ts index 522cb86b21..cfa11cb2f6 100644 --- a/src/renderer/navigation/history.ts +++ b/src/renderer/navigation/history.ts @@ -1,6 +1,15 @@ import { ipcRenderer } from "electron"; import { createBrowserHistory, createMemoryHistory } from "history"; import { createObservableHistory } from "mobx-observable-history"; +import { getHostedClusterId } from "../../common/cluster-store"; +import logger from "../../main/logger"; export const history = ipcRenderer ? createBrowserHistory() : createMemoryHistory(); export const navigation = createObservableHistory(history); + +navigation.listen((location, action) => { + const clusterId = getHostedClusterId(); + const frame = clusterId ?? "root"; + + logger.debug(`[NAVIGATION]: ${action}`, { location, frame }); +});