╭ changed ──────────╮ │src/embed/script.js│ ╰───────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │62 // never touched by this wipe, so we don't need to save and │ │63 // restore focus across the swap. │ │64 grid.innerHTML = html; │ │65 + }, │ │66 + _pushState: function (ptr, len) { │ │67 + const url = readWasmString(ptr, len); │ │68 + // idempotent: wasm tells us its current page every tick after a│ │69 + // change, but we don't want to add history entries for a URL │ │70 + // the browser is already on (e.g., right after the page loaded │ │71 + // from a server-side render of the same route). │ │72 + if (window.location.pathname !== url) { │ │73 + history.pushState({}, "", url); │ │74 + } │ │75 }, │ │76 _setOverlay: function (ptr, len) { │ │77 const html = readWasmString(ptr, len); │ ╰────────────────────────────────────────────────────────────────────────────────╯