fix(react): support core v3 load path in built-in loaderPlugin#732
Conversation
…tion Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RkQPcZ4F1fCmmEuDP4qcmr
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RkQPcZ4F1fCmmEuDP4qcmr
🦋 Changeset detectedLatest commit: 4df3865 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📝 WalkthroughWalkthroughChangesReact loader core v3 support
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant CoreInit
participant LoaderPlugin
participant ActivityLoader
participant DeferredPromise
CoreInit->>LoaderPlugin: call overrideInitialEvents with load initInfo
LoaderPlugin->>DeferredPromise: attach deferred loaderData
CoreInit->>LoaderPlugin: call onInit with final stack
LoaderPlugin->>ActivityLoader: run renderable activity loaders
ActivityLoader-->>LoaderPlugin: return loader results
LoaderPlugin->>DeferredPromise: resolve loaderData
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@stackflow/link
@stackflow/plugin-basic-ui
@stackflow/plugin-blocker
@stackflow/plugin-google-analytics-4
@stackflow/plugin-history-sync
@stackflow/plugin-lifecycle
@stackflow/plugin-renderer-basic
@stackflow/plugin-renderer-web
@stackflow/react-ui-core
@stackflow/react
commit: |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
stackflow-docs | 4df3865 | Commit Preview URL | Jul 22 2026, 03:15 PM |
Deploying stackflow-demo with
|
| Latest commit: |
4df3865
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4dee66fd.stackflow-demo.pages.dev |
| Branch Preview URL: | https://feature-fep-2598.stackflow-demo.pages.dev |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@integrations/react/src/loader/loaderPlugin.tsx`:
- Around line 185-187: Remove the initialization-time call to
resolvePausedEventLoaderData in the loader setup, while retaining
resolveRestoredStackLoaderData. Resolve paused Pushed/Replaced entry deferreds
only from the lifecycle path that materializes or activates the paused entry, so
inactive entries remain pending until resume, push, or replace.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 21af8a28-d865-4501-b6dc-0d36a18a1374
📒 Files selected for processing (5)
.changeset/fep-2598-react-loader-core-v3.mdintegrations/react/src/loader/loaderPlugin.tsxintegrations/react/src/utils/SyncInspectablePromise.tsplans/fep-2598-react-loader-core-v3/plan.mdplans/fep-2598-react-loader-core-v3/run-plan.md
| const stack = actions.getStack(); | ||
| resolveRestoredStackLoaderData(stack); | ||
| resolvePausedEventLoaderData(stack.pausedEvents); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
Keep paused-entry deferreds pending until they materialize.
Line 187 eagerly resolves every paused Pushed/Replaced event during initialization, invoking loaders for inactive entries and deleting their deferreds before resume/push/replace can materialize them. Resolve these only from the lifecycle path that activates the paused entry.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@integrations/react/src/loader/loaderPlugin.tsx` around lines 185 - 187,
Remove the initialization-time call to resolvePausedEventLoaderData in the
loader setup, while retaining resolveRestoredStackLoaderData. Resolve paused
Pushed/Replaced entry deferreds only from the lifecycle path that materializes
or activates the paused entry, so inactive entries remain pending until resume,
push, or replace.
@stackflow/react의 내장loaderPlugin이 core v3의 load path(직렬화된 스택 스냅샷으로부터의 복원)에서 loader 데이터를 올바르게 복원하도록 대응시킵니다.