From 7a4e0b4677e0241ab19489ef40a462810f841415 Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Mon, 21 Sep 2026 10:58:44 +0800 Subject: fix(boot): failed live attempt no longer shadows pre-published history; boot-default submit picks a fresh live run id --- public/App.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'public') diff --git a/public/App.js b/public/App.js index a401102..c98b708 100644 --- a/public/App.js +++ b/public/App.js @@ -841,6 +841,20 @@ export function selectedRun() { return new RunSelection(inputValue("project-id-input"), inputValue("run-id-input"), inputValue("base-id-input"), inputValue("target-id-input"), element("run-render-input").checked); } +export function freshLiveRunId(base_) { + const arg_1 = ~~(Date.now() % 1000000) | 0; + return toText(printf("%s-live-%d"))(base_)(arg_1); +} + +export function selectionForLiveStart(selection) { + if (selection.RunId === "run-probe-real-2") { + return new RunSelection(selection.ProjectId, freshLiveRunId(selection.RunId), selection.BaseId, selection.TargetId, selection.Render); + } + else { + return selection; + } +} + export function startRun(selection) { const requestBody = { projectId: selection.ProjectId, @@ -960,7 +974,7 @@ export function boot() { }); element("run-controls").addEventListener("submit", (event) => { event.preventDefault(); - startRun(selectedRun()); + startRun(selectionForLiveStart(selectedRun())); }); loadBootHistory(); renderTimeline(); -- cgit v1.2.3