fix: open a script's runs from All runs on an older version's page (#12488)

On the page of a script version that is not HEAD, the inputs library is keyed by
the HEAD hash, and the All runs button linked to /runs/<hash>. The runs page
filters by path, so it listed no jobs. Link to the script or flow path instead.
This commit is contained in:
Raunak Burrows
2026-11-18 18:08:32 +01:00
committed by GitHub
parent e1ac1fddf6
commit 3e3d7d1192
@@ -47,6 +47,8 @@
let historicInputs: HistoricInputs | undefined = $state(undefined)
let runnableId = $derived(scriptHash || scriptPath || flowPath || undefined)
// The runs page filters by path, and on an older version of a script runnableId is a hash.
let runsPath = $derived(scriptPath || flowPath || '')
let runnableType: RunnableType | undefined = $derived(
scriptHash ? 'ScriptHash' : scriptPath ? 'ScriptPath' : flowPath ? 'FlowPath' : undefined
@@ -158,7 +160,7 @@
<Button
unifiedSize="sm"
endIcon={{ icon: ExternalLink }}
href={`/runs/${runnableId}`}
href={`/runs/${runsPath}`}
target="_blank"
>
All runs