(runId)
| 143 | } |
| 144 | |
| 145 | async function handleRunSelection(runId) { |
| 146 | if (!state.compareMode) { |
| 147 | await selectRun(runId); |
| 148 | return; |
| 149 | } |
| 150 | |
| 151 | const existingIndex = state.compareIds.indexOf(runId); |
| 152 | if (existingIndex > -1) { |
| 153 | state.compareIds.splice(existingIndex, 1); |
| 154 | } else if (state.compareIds.length < 2) { |
| 155 | state.compareIds.push(runId); |
| 156 | } else { |
| 157 | state.compareIds = [state.compareIds[1], runId]; |
| 158 | } |
| 159 | |
| 160 | renderCompareButton(); |
| 161 | renderRunList(); |
| 162 | await renderCompareMode(); |
| 163 | } |
| 164 | |
| 165 | async function toggleCompareMode() { |
| 166 | state.compareMode = !state.compareMode; |
no test coverage detected