Commit b473264
authored
fix(ui): show live run detail view immediately without config retries (#196)
## Summary
Clicking a live run row previously stalled for ~6s before the live
detail view appeared. `useRunConfig` would fetch `config.json` (which
doesn't exist yet on the storage backend for live runs), get a 404, and
then react-query would retry the default 3 times with exponential
backoff before allowing the fallback branch to render
`LiveRunDetailView`.
This PR:
- **Short-circuits the render flow**: when `useLiveRuns` returns a
match, render `LiveRunDetailView` immediately — before the on-disk
config/result fetches have a chance to run their retry budget.
- **Disables `useRunConfig` / `useRunResult` entirely** when we already
know the run is live. No point fetching a file we know doesn't exist.
- **Reduces `useRunConfig` retry** from the default 3 → 1 for the
fallback case. A 404 on `config.json` is the deterministic "not uploaded
yet" state, not a transient error worth retrying with backoff.
End result: live runs open in ~200ms (the latency of `useLiveRuns`)
instead of ~6s.
## Test plan
- [x] TypeScript + ESLint clean
- [x] Manual: click a live run row, confirm `LiveRunDetailView` appears
immediately
- [x] Manual: click a completed indexed run row, confirm the normal
`RunDetailPage` still loads (and still retries once on transient 404)
- [x] Manual: navigate to a `runId` that doesn't exist at all — confirm
the error state shows without excessive delay1 parent 6dd7577 commit b473264
3 files changed
Lines changed: 34 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
6 | 13 | | |
7 | 14 | | |
8 | 15 | | |
| |||
12 | 19 | | |
13 | 20 | | |
14 | 21 | | |
15 | | - | |
| 22 | + | |
| 23 | + | |
16 | 24 | | |
17 | 25 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | | - | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
148 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
149 | 156 | | |
150 | 157 | | |
151 | | - | |
152 | | - | |
153 | 158 | | |
154 | 159 | | |
155 | 160 | | |
| |||
162 | 167 | | |
163 | 168 | | |
164 | 169 | | |
165 | | - | |
| 170 | + | |
166 | 171 | | |
167 | 172 | | |
168 | 173 | | |
| |||
285 | 290 | | |
286 | 291 | | |
287 | 292 | | |
288 | | - | |
289 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
290 | 300 | | |
291 | 301 | | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
| 302 | + | |
| 303 | + | |
298 | 304 | | |
299 | 305 | | |
300 | 306 | | |
| |||
0 commit comments