Commit e2c76a5
Wrap RSCRoute in local Suspense to prevent whole-page collapse
Without a local Suspense boundary, RSCRoute's in-flight fetch
suspension bubbles up to whatever outer Suspense the Pro
stream_react_component infrastructure provides. That outer fallback
wipes the entire rendered tree, so during a Refresh or Simulate Error
click, the whole page collapsed to viewport height for ~500ms and the
browser snapped scrollY to 0 (since the page wasn't tall enough to
preserve the prior scroll position).
Verified empirically via window.scrollY + document.body.scrollHeight
sampling on the deployed review-app: pre-fix, pageHeight went from
2193px to 764px between +50ms and +500ms after click. Local Suspense
boundary contains the suspension to the LiveActivity section; same-
shape skeleton fallback keeps the section's height stable so the
surrounding layout doesn't shift.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f23beba commit e2c76a5
1 file changed
Lines changed: 22 additions & 2 deletions
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
8 | 26 | | |
9 | 27 | | |
10 | 28 | | |
| |||
67 | 85 | | |
68 | 86 | | |
69 | 87 | | |
70 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
71 | 91 | | |
72 | 92 | | |
73 | 93 | | |
| |||
0 commit comments