Repository navigation
fix(octane): observe async component SSR replays - #506
Merged
leonidaz merged 4 commits intoAug 3, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
leonidaz
marked this pull request as draft
August 2, 2026 22:28
leonidaz
marked this pull request as ready for review
August 3, 2026 03:42
jonkwheeler
marked this pull request as draft
August 3, 2026 03:51
leonidaz
marked this pull request as ready for review
August 3, 2026 03:51
2 of 5 tasks
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@try, repeated, concurrent, and mixed async-component replays in development and productionWhy
Buffered SSR discovery re-invokes plain async components. When
use()found the earlier string-keyed result, it returned or threw before observing the newly created Promise. Fresh rejected replay Promises therefore escaped as duplicateunhandledRejectionevents even though the authored@catchrendered the error.Verification
pnpm sync, and diff checks passedProvenance
agent-authored)Note
Medium Risk
Touches core server
use()/suspense replay and settlement paths used on every SSR render; behavior is narrowly scoped but correctness-sensitive for async boundaries and hydration seeds.Overview
Fixes SSR replay for plain async components that return a new Promise on each re-invocation: when
use()reads a cached string-key outcome, it still subscribes to the replacement thenable with a no-op handler so late rejections do not become duplicateunhandledRejectionevents, while the first-pass settled value or reason stays authoritative and@catchstill renders.Suspense settlement now stores the originating thenable on each cached outcome (string-key map entries and parallel-use paths), enabling that identity check without re-observing the same thenable on every replay.
Reviewed by Cursor Bugbot for commit 17c7a9c. Bugbot is set up for automated code reviews on this repo. Configure here.