Commit e08dfcd
fix(webapp): span detail panel renders for buffered runs
The right-side span detail panel on the run-detail page calls into
`SpanPresenter.call` via the `resources.../runs.$runParam.spans.$spanParam`
resource route. The presenter's first step is a Prisma `findFirst` for
the parent run; for a buffered run that returns null and the whole
`call()` returns undefined.
The route loader interprets undefined as "event not found" and
redirects with that toast. The browser hops back to the run-detail URL
which the previous F2 fix redirects to the `?span=` form, which hits
this resource route again, which returns undefined, which redirects...
the visible symptom is a permanent loading spinner on the detail panel
plus an "Event not found." toast pop on every poll.
Add a buffered fallback inside `SpanPresenter.call`: when the
`parentRun` Prisma lookup misses, resolve the env from
`(projectId, envSlug)`, call
`findRunByIdWithMollifierFallback({runId, envId, orgId})`, and
synthesise the SpanRun with `buildSyntheticSpanRun` (reusing the
existing helper). The resource route now passes `envSlug` through
so the presenter can find the env without an extra round trip.
`envSlug` is optional on `call()`'s arg type to preserve every existing
caller — only the dashboard-side path needs the buffer fallback;
other call sites (cached-span lookups, etc.) keep their existing
PG-only behaviour.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 199f370 commit e08dfcd
2 files changed
Lines changed: 35 additions & 1 deletion
File tree
- apps/webapp/app
- presenters/v3
- routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| 89 | + | |
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
93 | 101 | | |
94 | 102 | | |
95 | 103 | | |
| |||
127 | 135 | | |
128 | 136 | | |
129 | 137 | | |
130 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
131 | 164 | | |
132 | 165 | | |
133 | 166 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
0 commit comments