Skip to content

fix(react): support core v3 load path in built-in loaderPlugin#732

Merged
ENvironmentSet merged 9 commits into
mainfrom
feature/fep-2598
Jul 22, 2026
Merged

fix(react): support core v3 load path in built-in loaderPlugin#732
ENvironmentSet merged 9 commits into
mainfrom
feature/fep-2598

Conversation

@ENvironmentSet

@ENvironmentSet ENvironmentSet commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

@stackflow/react의 내장 loaderPlugin이 core v3의 load path(직렬화된 스택 스냅샷으로부터의 복원)에서 loader 데이터를 올바르게 복원하도록 대응시킵니다.

@changeset-bot

changeset-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4df3865

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@stackflow/react Patch

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

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

React loader core v3 support

Layer / File(s) Summary
Load-path specification and execution plan
plans/fep-2598-react-loader-core-v3/*
Documents deferred loader injection during load initialization, final-stack-based resolution, create-path behavior, validation scope, and implementation workflow.
Inspectable deferred contract
integrations/react/src/utils/SyncInspectablePromise.ts
Adds SyncInspectableDeferred<T> and defer<T>() for externally settled, synchronously inspectable promises.
Snapshot loader restoration
integrations/react/src/loader/loaderPlugin.tsx, .changeset/fep-2598-react-loader-core-v3.md
Injects deferred loader data for load-time pushed and replaced events, then resolves loaders for renderable restored and paused activities; records a patch release.

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
Loading

Possibly related PRs

  • daangn/stackflow#723: Adds the core initialization and initInfo contracts consumed by the loader plugin changes.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: core v3 load-path support in the built-in loaderPlugin.
Description check ✅ Passed The description is directly related to restoring loader data during the core v3 load path.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fep-2598

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Jul 22, 2026

Copy link
Copy Markdown
@stackflow/link

yarn add https://pkg.pr.new/@stackflow/link@732.tgz

@stackflow/plugin-basic-ui

yarn add https://pkg.pr.new/@stackflow/plugin-basic-ui@732.tgz

@stackflow/plugin-blocker

yarn add https://pkg.pr.new/@stackflow/plugin-blocker@732.tgz

@stackflow/plugin-google-analytics-4

yarn add https://pkg.pr.new/@stackflow/plugin-google-analytics-4@732.tgz

@stackflow/plugin-history-sync

yarn add https://pkg.pr.new/@stackflow/plugin-history-sync@732.tgz

@stackflow/plugin-lifecycle

yarn add https://pkg.pr.new/@stackflow/plugin-lifecycle@732.tgz

@stackflow/plugin-renderer-basic

yarn add https://pkg.pr.new/@stackflow/plugin-renderer-basic@732.tgz

@stackflow/plugin-renderer-web

yarn add https://pkg.pr.new/@stackflow/plugin-renderer-web@732.tgz

@stackflow/react-ui-core

yarn add https://pkg.pr.new/@stackflow/react-ui-core@732.tgz

@stackflow/react

yarn add https://pkg.pr.new/@stackflow/react@732.tgz

commit: 4df3865

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 22, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
stackflow-docs 4df3865 Commit Preview URL Jul 22 2026, 03:15 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 22, 2026

Copy link
Copy Markdown

Deploying stackflow-demo with  Cloudflare Pages  Cloudflare Pages

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

View logs

@ENvironmentSet
ENvironmentSet marked this pull request as ready for review July 22, 2026 15:40
@ENvironmentSet
ENvironmentSet enabled auto-merge (squash) July 22, 2026 15:41
@ENvironmentSet
ENvironmentSet disabled auto-merge July 22, 2026 15:42
@ENvironmentSet
ENvironmentSet merged commit f0987d1 into main Jul 22, 2026
8 of 9 checks passed
@ENvironmentSet
ENvironmentSet deleted the feature/fep-2598 branch July 22, 2026 15:42

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between f52b5f4 and 4df3865.

📒 Files selected for processing (5)
  • .changeset/fep-2598-react-loader-core-v3.md
  • integrations/react/src/loader/loaderPlugin.tsx
  • integrations/react/src/utils/SyncInspectablePromise.ts
  • plans/fep-2598-react-loader-core-v3/plan.md
  • plans/fep-2598-react-loader-core-v3/run-plan.md

Comment on lines +185 to +187
const stack = actions.getStack();
resolveRestoredStackLoaderData(stack);
resolvePausedEventLoaderData(stack.pausedEvents);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant