(runId)
| 128 | } |
| 129 | |
| 130 | async function selectRun(runId) { |
| 131 | state.selectedId = runId; |
| 132 | state.selectedSource = "api"; |
| 133 | renderRunList(); |
| 134 | |
| 135 | const response = await fetch(`/api/runs/${encodeURIComponent(runId)}`, { cache: "no-store" }); |
| 136 | if (!response.ok) { |
| 137 | throw new Error(`Failed to load run ${runId}`); |
| 138 | } |
| 139 | |
| 140 | state.currentRun = await response.json(); |
| 141 | state.compareCache[runId] = state.currentRun; |
| 142 | renderDashboard(state.currentRun); |
| 143 | } |
| 144 | |
| 145 | async function handleRunSelection(runId) { |
| 146 | if (!state.compareMode) { |
no test coverage detected