(runId)
| 198 | } |
| 199 | |
| 200 | async function fetchRunDetail(runId) { |
| 201 | const response = await fetch(`/api/runs/${encodeURIComponent(runId)}`, { cache: "no-store" }); |
| 202 | if (!response.ok) { |
| 203 | throw new Error(`Failed to load run ${runId}`); |
| 204 | } |
| 205 | return response.json(); |
| 206 | } |
| 207 | |
| 208 | async function ensureRunDetail(runId) { |
| 209 | if (state.selectedSource === "api" && state.currentRun?.id === runId) { |