-
Notifications
You must be signed in to change notification settings - Fork 112
chore(react): Prioritize ongoing rendering works over anticipated next activities prefetching works. #667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 127ff5f 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 |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
stackflow-docs | 127ff5f | Commit Preview URL | Dec 17 2025, 08:47 AM |
📝 WalkthroughSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughDefers Activity preparation from synchronous render to passive React effects and memoizes the prepare function with React.useCallback. Adds a changeset declaring a minor release for Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧬 Code graph analysis (2)integrations/react/src/future/usePrepare.ts (3)
integrations/react/src/future/useActivityPreparation.ts (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (3)
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 |
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.changeset/solid-pillows-laugh.md(1 hunks)integrations/react/src/future/useActivityPreparation.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Write source in TypeScript with strict typing enabled across the codebase
Files:
integrations/react/src/future/useActivityPreparation.ts
.changeset/*.md
📄 CodeRabbit inference engine (AGENTS.md)
Include a Changeset entry for any user-facing package change
Files:
.changeset/solid-pillows-laugh.md
🧬 Code graph analysis (1)
integrations/react/src/future/useActivityPreparation.ts (2)
config/src/RegisteredActivityName.ts (1)
RegisteredActivityName(3-6)integrations/react/src/future/usePrepare.ts (1)
usePrepare(15-53)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Workers Builds: stackflow-docs
🔇 Additional comments (2)
integrations/react/src/future/useActivityPreparation.ts (1)
2-2: LGTM!The
useEffectimport is necessary for the new deferred execution approach..changeset/solid-pillows-laugh.md (1)
1-5: LGTM!The changeset correctly declares a minor version bump for
@stackflow/reactwith an appropriate description of the scheduling improvement. This follows the coding guideline requirement to include a changeset entry for user-facing package changes.
Deploying stackflow-demo with
|
| Latest commit: |
127ff5f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9dc15847.stackflow-demo.pages.dev |
| Branch Preview URL: | https://lazy-use-activity-preparatio.stackflow-demo.pages.dev |
Marking activity preparation tasks as passive effects, stackflow now prioritize ongoing rendering works than activity preparation tasks requested by activities currently being rendered. This patch prevents script evaluation tasks for anticipated next activities from blocking ongoing transition updates.
(an example of the issue)
