diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-21 10:58:44 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-21 10:58:44 +0800 |
| commit | 7a4e0b4677e0241ab19489ef40a462810f841415 (patch) | |
| tree | b33d7ca5fb8d9527989696da52be8e47d26a5198 /public/App.js | |
| parent | b8e49e1b8b57393f47bcc9a29664a7f509584ba2 (diff) | |
| download | somhairles-dream-fsharp-7a4e0b4677e0241ab19489ef40a462810f841415.tar.gz | |
fix(boot): failed live attempt no longer shadows pre-published history; boot-default submit picks a fresh live run id
Diffstat (limited to 'public/App.js')
| -rw-r--r-- | public/App.js | 16 |
1 files changed, 15 insertions, 1 deletions
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(); |
