📎 Read the WASM replay's query parameters as the page loads

A replayed step that navigates replaces the page's query string, so the
replay read its `debug` and `watch` parameters as unset from then on and
logged no shapes at the end of such a program. It reads them once, as
the page loads.

Harness only; the benchmark is not run.

AI-assisted-by: claude-opus-5-5
This commit is contained in:
alonso.torres 2026-11-17 03:27:50 +01:00
parent 4d78f3d9ec
commit c94ab1a05f

View File

@ -34,9 +34,13 @@
[potok.v2.core :as ptk]
[promesa.core :as p]))
;; the page's query parameters as it loads, before a replayed step navigates
(def ^:private page-params
(js/URLSearchParams. (.. js/globalThis -location -search)))
(defn- query-param
[name]
(.get (js/URLSearchParams. (.. js/globalThis -location -search)) name))
(.get page-params name))
(defn- programs-uri
"The programs file the page names in its `programs` query parameter: EDN