Commit c16084b
fix(webapp): auto-redirect to root span on direct nav to buffered/PG run-detail URL
The project-scoped run-detail route (`_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsx`)
did not select a root span when the URL had no `?span=` query param.
The sibling redirect routes `runs.$runParam.ts`, `@.runs.$runParam.ts`
and `projects.v3.$projectRef.runs.$runParam.ts` all inject the span
on their redirect Location, but direct navigation to the canonical
project-scoped URL never hits those — leaving `selectedSpanId` undefined
and the right detail panel collapsed.
This affected both buffered and PG-resident runs: anyone reaching the
URL via bookmark, shared link, or back-button without the query param
got the empty-panel placeholder.
Detect the missing param in the loader (skipping `_data` requests so
client revalidations don't trigger an extra redirect), look up the
`run.spanId` we already have at that point, and 302 to the same URL
with the param appended.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 9faf087 commit c16084b
1 file changed
Lines changed: 32 additions & 0 deletions
File tree
- apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
297 | 315 | | |
298 | 316 | | |
299 | 317 | | |
| |||
309 | 327 | | |
310 | 328 | | |
311 | 329 | | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
312 | 344 | | |
313 | 345 | | |
314 | 346 | | |
| |||
0 commit comments